lib/github_api/orgs/teams.rb in github_api-0.4.4 vs lib/github_api/orgs/teams.rb in github_api-0.4.5
- old
+ new
@@ -140,11 +140,11 @@
def team_member?(team_name, member_name, params={})
_validate_presence_of team_name, member_name
_normalize_params_keys(params)
get("/teams/#{team_name}/members/#{member_name}", params)
true
- rescue Github::ResourceNotFound
+ rescue Github::Error::NotFound
false
end
# Add a team member
# In order to add a user to a team, the authenticated user must have ‘admin’ permissions to the team or be an owner of the org that the team is associated with.
@@ -202,10 +202,10 @@
def team_repo?(team_name, user_name, repo_name, params={})
_validate_presence_of team_name, user_name, repo_name
_normalize_params_keys(params)
get("/teams/#{team_name}/repos/#{user_name}/#{repo_name}", params)
true
- rescue Github::ResourceNotFound
+ rescue Github::Error::NotFound
false
end
alias :team_repository? :team_repo?
# Add a team repository