entitlements-github-plugin 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 693affbe3d5a82f2de418c8d892e3348543de2b11ade01021c5d70e1604e7737
4
- data.tar.gz: a1275a50c6e8c02b9394b4198f88aeb8a2fe5916182e02784c32ea81ef095a97
3
+ metadata.gz: 684563b348978cba23282a6ea80a590b5a7335ec3ebf0278abb6a7a7b891c8ce
4
+ data.tar.gz: 360ddce764d1e3077216e066a3bdaba44a37e8df61c817f9df0eb887fcb3beca
5
5
  SHA512:
6
- metadata.gz: 1a1da49e107045a502174d53e751fba158fe76712d2f777027b12648f9587cdfef265fcfef65228a03f7ce426d0ceaa6d10b58d74628ed2f2f7f9b07f6cdf483
7
- data.tar.gz: 98bf9fbf07473e4cf09da1a2d44433ff7801a52fd7073e8e5042a33fb15438f11a88647d1c71fbb4c893a0219ae209d4089d621e48619d4839562057af9ba0de
6
+ metadata.gz: c5d0ed6468aff36d7ca1047218273dc86173063896eaf4cbf88d47189c6daeb73e3eac8f84c6ecabc82b4293079bc06b0f6edb146a6168043cfe0629ecb5c014
7
+ data.tar.gz: a79d07768d11a62362b6dfe55a897805d763c4b493475b8e1607a211b0c82066aa284effb191554cabaaaf8b7ba2c94fc1d6712d706afba4bbbab98ff5cc9ddb
@@ -459,6 +459,11 @@ module Entitlements
459
459
  begin
460
460
  result = octokit.add_team_membership(team.team_id, user, role:)
461
461
  result[:state] == "active" || result[:state] == "pending"
462
+ rescue Octokit::UnprocessableEntity => e
463
+ raise e unless ignore_not_found && e.message =~ /Enterprise Managed Users must be part of the organization to be assigned to the team/
464
+
465
+ Entitlements.logger.warn "User #{user} not found in organization #{org}, ignoring."
466
+ false
462
467
  rescue Octokit::NotFound => e
463
468
  raise e unless ignore_not_found
464
469
 
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Entitlements
4
4
  module Version
5
- VERSION = "1.0.0"
5
+ VERSION = "1.1.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-github-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc. Security Ops
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-30 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 3.8.0
109
+ version: 3.13.0
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - '='
115
115
  - !ruby/object:Gem::Version
116
- version: 3.8.0
116
+ version: 3.13.0
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rubocop
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -162,14 +162,14 @@ dependencies:
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 0.16.7
165
+ version: 0.19.1
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: 0.16.7
172
+ version: 0.19.1
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: rugged
175
175
  requirement: !ruby/object:Gem::Requirement