entitlements-github-plugin 0.4.2 → 0.4.4

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: 3c6ee79046e0d905bacf0c96d8dde4065be86a0e0c38c03b0056c90e9be33d16
4
- data.tar.gz: 6ea93769603533deb1fff5e5dc91f7664483c1c2021d1a3836679cbfab11512d
3
+ metadata.gz: 98d2e4c18c22025d89bb53a24f87340596ed2add64b5b72d401ee31202636da4
4
+ data.tar.gz: 602d1bd2dc77e02c19edb346ab8bbea6aed61c3a480d33fca3d082346cf2b1ee
5
5
  SHA512:
6
- metadata.gz: b9d1ea8afcd7139f51d85eee6286408fe98dbcd62913f79f944e9cb131c0b725774523ec08de86ad231f13e87c5f0371dfddcc72446c9648ac8907d97bf0ea29
7
- data.tar.gz: 6b31074867e389095bc34c33bcfa94dc954f2e2bdcaef8230417f1dd64bec66a0acec7fc896d0a7464b2025cba1b2f8e8e6faab3a81f12be5e1b1feff7924a15
6
+ metadata.gz: ee9a438713928741efb5c0d286ed91d774db024b460e349c60c2e81bd35c7c14f1e449022ce941178f89c188835f6533d906dea0250ae6e44010753636b94887
7
+ data.tar.gz: 71ecfaf9b149cd1509f0ec6d23322cf45f2462c221deb8f01a2c02756c12a04a41e1c4b30b3e4803079d143a6cfda5aa78426f49c8df50196914d7ce9fa014ae
@@ -210,8 +210,8 @@ module Entitlements
210
210
  login
211
211
  }
212
212
  role
213
- cursor
214
213
  }
214
+ pageInfo { endCursor }
215
215
  }
216
216
  }
217
217
  }".gsub(/\n\s+/, "\n")
@@ -222,14 +222,15 @@ module Entitlements
222
222
  raise "GraphQL query failure"
223
223
  end
224
224
 
225
- edges = response[:data].fetch("data").fetch("organization").fetch("membersWithRole").fetch("edges")
225
+ membersWithRole = response[:data].fetch("data").fetch("organization").fetch("membersWithRole")
226
+ edges = membersWithRole.fetch("edges")
226
227
  break unless edges.any?
227
228
 
228
229
  edges.each do |edge|
229
230
  result[edge.fetch("node").fetch("login").downcase] = edge.fetch("role")
230
231
  end
231
232
 
232
- cursor = edges.last.fetch("cursor")
233
+ cursor = membersWithRole.fetch("pageInfo").fetch("endCursor")
233
234
  next if cursor && edges.size == max_graphql_results
234
235
  break
235
236
  end
@@ -276,8 +277,8 @@ module Entitlements
276
277
  node {
277
278
  login
278
279
  }
279
- cursor
280
280
  }
281
+ pageInfo { endCursor }
281
282
  }
282
283
  }
283
284
  }".gsub(/\n\s+/, "\n")
@@ -288,14 +289,15 @@ module Entitlements
288
289
  raise "GraphQL query failure"
289
290
  end
290
291
 
291
- edges = response[:data].fetch("data").fetch("organization").fetch("pendingMembers").fetch("edges")
292
+ pendingMembers = response[:data].fetch("data").fetch("organization").fetch("pendingMembers")
293
+ edges = pendingMembers.fetch("edges")
292
294
  break unless edges.any?
293
295
 
294
296
  edges.each do |edge|
295
297
  result.add(edge.fetch("node").fetch("login").downcase)
296
298
  end
297
299
 
298
- cursor = edges.last.fetch("cursor")
300
+ cursor = pendingMembers.fetch("pageInfo").fetch("endCursor")
299
301
  next if cursor && edges.size == max_graphql_results
300
302
  break
301
303
  end
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Entitlements
4
4
  module Version
5
- VERSION = "0.4.2"
5
+ VERSION = "0.4.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-github-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
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: 2023-09-18 00:00:00.000000000 Z
11
+ date: 2023-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.17.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.17.0
27
27
  - !ruby/object:Gem::Dependency
@@ -70,168 +70,168 @@ dependencies:
70
70
  name: entitlements
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '='
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.2.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '='
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.2.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 13.0.6
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '='
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 13.0.6
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '='
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 3.8.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '='
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 3.8.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-core
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '='
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: 3.8.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '='
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 3.8.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '='
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: 1.29.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '='
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.29.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-github
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '='
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 0.17.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '='
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 0.17.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubocop-performance
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '='
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 1.13.3
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '='
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: 1.13.3
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rugged
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '='
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 0.27.5
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '='
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.27.5
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '='
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: 0.16.1
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - '='
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 0.16.1
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov-erb
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '='
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: 1.0.1
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '='
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: 1.0.1
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: vcr
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - '='
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
215
  version: 4.0.0
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - '='
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: 4.0.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: webmock
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - '='
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
229
  version: 3.4.2
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - '='
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: 3.4.2
237
237
  description: Entitlements plugin to manage GitHub Orgs and Team memberships and access