Skip to content

Commit ecb653b

Browse files
authored
Merge pull request #294 from github/422
fix(github_team): rescue all UnprocessableEntity
2 parents 03740a8 + 31c762c commit ecb653b

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
entitlements-github-plugin (1.2.2)
4+
entitlements-github-plugin (1.2.3)
55
contracts (~> 0.17.0)
66
faraday (~> 2.0)
77
faraday-retry (~> 2.0)

lib/entitlements/backend/github_team/service.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,6 @@ def add_user_to_team(user:, team:, role: "member")
477477

478478
result[:state] == "active" || result[:state] == "pending"
479479
rescue Octokit::UnprocessableEntity => e
480-
raise e unless ignore_not_found && e.message =~ /Enterprise Managed Users must be part of the organization to be assigned to the team/
481-
482480
Entitlements.logger.warn "User #{user} not found in organization #{org}, ignoring."
483481
false
484482
rescue Octokit::NotFound => e

lib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module Entitlements
44
module Version
5-
VERSION = "1.2.2"
5+
VERSION = "1.2.3"
66
end
77
end

0 commit comments

Comments
 (0)