-
Notifications
You must be signed in to change notification settings - Fork 74
Error on create_student_teams #110
Comments
Looks like this issue has been addressed in the closed issue "create_student_teams fails due to GitHub API change" but id still does not work! |
I can take a look at this later tonight, can you give the full error and possibly the snippet of your file that failed? Thanks! |
@michaelfahy What version of teachers_pet do you have? You can run For reference, the issue referred to above is #88. |
I am using teachers_pet 0.3.5. |
@michaelfahy any luck with this? I have the same problem. It looks like the |
BTW, here is my workaround --- a/lib/teachers_pet/actions/create_student_teams.rb
+++ b/lib/teachers_pet/actions/create_student_teams.rb
@@ -21,8 +21,9 @@ module TeachersPet
if team
puts "Team @#{org_login}/#{team_name} already exists."
else
- team = JSON.parse(self.client.create_team(org_login, team_name))
- team.symbolize_keys!
+ res = self.client.create_team(org_login, team_name)
+ teams_by_name = self.client.existing_teams_by_name(org_login)
+ team = teams_by_name[team_name]
end
self.client.add_users_to_team(org_login, team, usernames)
end It makes extra calls to the GH API to get the new team ids, since they doesn't seem to be returned by the create_team call. |
Dear maintainers of |
create_student_teams reports the error:
json/common.rb:155:in `initialize': can't convert Sawyer::Resource to String (Sawyer::Resource#to_str gives NilClass) (TypeError)
It successfully creates a team for the first student on the list but does not continue.
The text was updated successfully, but these errors were encountered: