Skip to content

Commit e541d39

Browse files
authored
Merge branch 'main' into auto-action-ln
2 parents 41ba340 + ecb653b commit e541d39

92 files changed

Lines changed: 150 additions & 87 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/acceptance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
has_change: ${{ steps.diff.outputs.has_change}}
1818

1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v7
2121

2222
- id: fetch-base
2323
if: github.event_name == 'pull_request'
@@ -68,7 +68,7 @@ jobs:
6868
6969
- name: checkout
7070
if: ${{ needs.changes.outputs.has_change == 'true' }}
71-
uses: actions/checkout@v5
71+
uses: actions/checkout@v7
7272

7373
# Use Docker layer caching for 'docker build' and 'docker-compose build' commands.
7474
# https://github.com/satackey/action-docker-layer-caching/releases/tag/v0.0.11

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323

2424
steps:
2525
- name: checkout
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v7
2727

28-
- uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # pin@v1.263.0
28+
- uses: ruby/setup-ruby@8e41b362d2589a22a44c1cfa214b3c83052c195b # pin@v1.318.0
2929
with:
3030
bundler-cache: true
3131

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: checkout
28-
uses: actions/checkout@v5
28+
uses: actions/checkout@v7
2929

3030
# Initializes the CodeQL tools for scanning.
3131
- name: Initialize CodeQL

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
steps:
1818
- name: checkout
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@v7
2020

21-
- uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # pin@v1.263.0
21+
- uses: ruby/setup-ruby@8e41b362d2589a22a44c1cfa214b3c83052c195b # pin@v1.318.0
2222
with:
2323
bundler-cache: true
2424

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818

1919
steps:
2020
- name: checkout
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v7
2222

23-
- uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # pin@v1.263.0
23+
- uses: ruby/setup-ruby@8e41b362d2589a22a44c1cfa214b3c83052c195b # pin@v1.318.0
2424
with:
2525
bundler-cache: true
2626

@@ -46,7 +46,7 @@ jobs:
4646
GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem
4747
4848
- name: release
49-
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # pin@v1.20.0
49+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # pin@v1.21.0
5050
with:
5151
artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem"
5252
tag: "v${{ env.GEM_VERSION }}"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020

2121
steps:
2222
- name: checkout
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@v7
2424

25-
- uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # pin@v1.263.0
25+
- uses: ruby/setup-ruby@8e41b362d2589a22a44c1cfa214b3c83052c195b # pin@v1.318.0
2626
with:
2727
bundler-cache: true
2828
ruby-version: ${{ matrix.ruby }}

Gemfile.lock

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
entitlements-github-plugin (1.2.0)
4+
entitlements-github-plugin (1.2.3)
55
contracts (~> 0.17.0)
66
faraday (~> 2.0)
77
faraday-retry (~> 2.0)
@@ -24,117 +24,119 @@ GEM
2424
mutex_m
2525
securerandom (>= 0.3)
2626
tzinfo (~> 2.0)
27-
addressable (2.8.7)
28-
public_suffix (>= 2.0.2, < 7.0)
27+
addressable (2.9.0)
28+
public_suffix (>= 2.0.2, < 8.0)
2929
ast (2.4.3)
3030
base64 (0.3.0)
3131
benchmark (0.4.1)
32-
bigdecimal (3.2.2)
33-
concurrent-ruby (1.3.5)
32+
bigdecimal (4.0.1)
33+
concurrent-ruby (1.3.7)
3434
connection_pool (2.5.3)
35-
contracts (0.17.2)
36-
crack (1.0.0)
35+
contracts (0.17.3)
36+
crack (1.0.1)
3737
bigdecimal
3838
rexml
3939
diff-lcs (1.6.2)
4040
docile (1.4.0)
4141
drb (2.2.3)
42-
entitlements-app (1.2.0)
42+
entitlements-app (1.2.1)
4343
concurrent-ruby (~> 1.3, >= 1.3.1)
4444
faraday (~> 2.0)
4545
logger (~> 1.6)
4646
net-ldap (~> 0.19)
4747
octokit (~> 4.18)
4848
optimist (~> 3.1)
4949
ostruct (~> 0.6.0)
50-
faraday (2.13.4)
50+
faraday (2.14.3)
5151
faraday-net_http (>= 2.0, < 3.5)
5252
json
5353
logger
54-
faraday-net_http (3.4.1)
55-
net-http (>= 0.5.0)
56-
faraday-retry (2.3.2)
54+
faraday-net_http (3.4.4)
55+
net-http (~> 0.5)
56+
faraday-retry (2.4.0)
5757
faraday (~> 2.0)
58-
hashdiff (1.2.0)
58+
hashdiff (1.2.1)
5959
i18n (1.14.7)
6060
concurrent-ruby (~> 1.0)
61-
json (2.13.2)
62-
language_server-protocol (3.17.0.5)
61+
json (2.21.1)
62+
language_server-protocol (3.17.0.6)
6363
lint_roller (1.1.0)
6464
logger (1.7.0)
6565
minitest (5.25.5)
6666
mutex_m (0.3.0)
67-
net-http (0.6.0)
68-
uri
69-
net-ldap (0.19.0)
67+
net-http (0.9.1)
68+
uri (>= 0.11.1)
69+
net-ldap (0.20.0)
70+
base64
71+
ostruct
7072
octokit (4.25.1)
7173
faraday (>= 1, < 3)
7274
sawyer (~> 0.9)
7375
optimist (3.2.1)
74-
ostruct (0.6.2)
75-
parallel (1.27.0)
76-
parser (3.3.9.0)
76+
ostruct (0.6.3)
77+
parallel (1.28.0)
78+
parser (3.3.11.1)
7779
ast (~> 2.4.1)
7880
racc
79-
prism (1.4.0)
81+
prism (1.9.0)
8082
public_suffix (6.0.2)
8183
racc (1.8.1)
82-
rack (3.1.17)
84+
rack (3.2.6)
8385
rainbow (3.1.1)
84-
rake (13.3.0)
86+
rake (13.4.2)
8587
rbs (3.6.1)
8688
logger
87-
regexp_parser (2.11.2)
89+
regexp_parser (2.12.0)
8890
retryable (3.0.5)
89-
rexml (3.4.2)
90-
rspec (3.13.1)
91+
rexml (3.4.4)
92+
rspec (3.13.2)
9193
rspec-core (~> 3.13.0)
9294
rspec-expectations (~> 3.13.0)
9395
rspec-mocks (~> 3.13.0)
94-
rspec-core (3.13.5)
96+
rspec-core (3.13.6)
9597
rspec-support (~> 3.13.0)
9698
rspec-expectations (3.13.5)
9799
diff-lcs (>= 1.2.0, < 2.0)
98100
rspec-support (~> 3.13.0)
99-
rspec-mocks (3.13.5)
101+
rspec-mocks (3.13.7)
100102
diff-lcs (>= 1.2.0, < 2.0)
101103
rspec-support (~> 3.13.0)
102-
rspec-support (3.13.4)
103-
rubocop (1.80.2)
104+
rspec-support (3.13.6)
105+
rubocop (1.88.2)
104106
json (~> 2.3)
105107
language_server-protocol (~> 3.17.0.2)
106108
lint_roller (~> 1.1.0)
107-
parallel (~> 1.10)
109+
parallel (>= 1.10)
108110
parser (>= 3.3.0.2)
109111
rainbow (>= 2.2.2, < 4.0)
110112
regexp_parser (>= 2.9.3, < 3.0)
111-
rubocop-ast (>= 1.46.0, < 2.0)
113+
rubocop-ast (>= 1.49.0, < 2.0)
112114
ruby-progressbar (~> 1.7)
113115
unicode-display_width (>= 2.4.0, < 4.0)
114-
rubocop-ast (1.46.0)
116+
rubocop-ast (1.50.0)
115117
parser (>= 3.3.7.2)
116-
prism (~> 1.4)
118+
prism (~> 1.7)
117119
rubocop-github (0.23.0)
118120
rubocop (>= 1.72)
119121
rubocop-performance (>= 1.24)
120122
rubocop-rails (>= 2.23)
121-
rubocop-performance (1.26.0)
123+
rubocop-performance (1.26.1)
122124
lint_roller (~> 1.1)
123125
rubocop (>= 1.75.0, < 2.0)
124-
rubocop-ast (>= 1.44.0, < 2.0)
126+
rubocop-ast (>= 1.47.1, < 2.0)
125127
rubocop-rails (2.32.0)
126128
activesupport (>= 4.2.0)
127129
lint_roller (~> 1.1)
128130
rack (>= 1.1)
129131
rubocop (>= 1.75.0, < 2.0)
130132
rubocop-ast (>= 1.44.0, < 2.0)
131-
ruby-lsp (0.26.1)
133+
ruby-lsp (0.26.10)
132134
language_server-protocol (~> 3.17.0)
133135
prism (>= 1.2, < 2.0)
134136
rbs (>= 3, < 5)
135137
ruby-progressbar (1.13.0)
136-
rugged (1.9.0)
137-
sawyer (0.9.2)
138+
rugged (1.9.6)
139+
sawyer (0.9.3)
138140
addressable (>= 2.3.5)
139141
faraday (>= 0.17.3, < 3)
140142
securerandom (0.3.2)
@@ -148,13 +150,12 @@ GEM
148150
simplecov_json_formatter (0.1.4)
149151
tzinfo (2.0.6)
150152
concurrent-ruby (~> 1.0)
151-
unicode-display_width (3.1.5)
152-
unicode-emoji (~> 4.0, >= 4.0.4)
153-
unicode-emoji (4.0.4)
154-
uri (1.0.3)
155-
vcr (6.3.1)
156-
base64
157-
webmock (3.25.1)
153+
unicode-display_width (3.2.0)
154+
unicode-emoji (~> 4.1)
155+
unicode-emoji (4.2.0)
156+
uri (1.1.1)
157+
vcr (6.4.0)
158+
webmock (3.26.2)
158159
addressable (>= 2.8.0)
159160
crack (>= 0.3.2)
160161
hashdiff (>= 0.4.0, < 2.0.0)
@@ -167,7 +168,7 @@ DEPENDENCIES
167168
entitlements-app (~> 1.0)
168169
entitlements-github-plugin!
169170
rake (~> 13.2, >= 13.2.1)
170-
rspec (= 3.13.1)
171+
rspec (= 3.13.2)
171172
rubocop (~> 1.64)
172173
rubocop-github (~> 0.20)
173174
rubocop-performance (~> 1.21)

entitlements-github-plugin.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
2424

2525
s.add_development_dependency "entitlements-app", "~> 1.0"
2626
s.add_development_dependency "rake", "~> 13.2", ">= 13.2.1"
27-
s.add_development_dependency "rspec", "= 3.13.1"
27+
s.add_development_dependency "rspec", "= 3.13.2"
2828
s.add_development_dependency "rubocop", "~> 1.64"
2929
s.add_development_dependency "rubocop-github", "~> 0.20"
3030
s.add_development_dependency "rubocop-performance", "~> 1.21"

lib/entitlements/backend/github_org/service.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def add_user_to_organization(user, role)
5454

5555
Entitlements.logger.warn "User #{user} not found in GitHub instance #{identifier}, ignoring."
5656
return false
57+
rescue Octokit::UnprocessableEntity => e
58+
Entitlements.logger.warn "Unprocessable entity when adding #{user} to organization #{org} with role #{role}: #{e.message}. This likely means the user blocked the invite, so we're ignoring them, but someone should check it."
59+
return false
5760
end
5861

5962
# Happy path

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

0 commit comments

Comments
 (0)