You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.
teachers_pet doesn't fail gracefully for nonexisting users.
This issue probably exists for some other commands too.
My current workaround for create_student_teams is this, which just catches the error and continues.
--- a/lib/teachers_pet/client_decorator.rb
+++ b/lib/teachers_pet/client_decorator.rb
@@ -52,8 +52,12 @@ moduleTeachersPetputs" -> @#{username} is already on @#{organization}/#{team[:name]}"else# https://github.com/octokit/octokit.rb/pull/518
- self.add_team_membership(team[:id],username,accept: 'application/vnd.github.the-wasp-preview+json')
- puts" -> @#{username} has been added to @#{organization}/#{team[:name]}"
+ begin
+ self.add_team_membership(team[:id],username,accept: 'application/vnd.github.the-wasp-preview+json')
+ puts" -> @#{username} has been added to @#{organization}/#{team[:name]}"
+ rescue
+ puts" -> Error adding user to team. #{username} might not exist."
+ endendendend
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
teachers_pet doesn't fail gracefully for nonexisting users.
This issue probably exists for some other commands too.
My current workaround for create_student_teams is this, which just catches the error and continues.
The text was updated successfully, but these errors were encountered: