entitlements-github-plugin 0.4.3 → 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: '0987a803d14c6ea071918561b6295665e0e72c41b4888ea796d73809e5befb91'
4
- data.tar.gz: 52a80360a3dc15c5248228fa64aae7bb1afde55b3248bf2048ed26b64117d8c2
3
+ metadata.gz: 98d2e4c18c22025d89bb53a24f87340596ed2add64b5b72d401ee31202636da4
4
+ data.tar.gz: 602d1bd2dc77e02c19edb346ab8bbea6aed61c3a480d33fca3d082346cf2b1ee
5
5
  SHA512:
6
- metadata.gz: 6bb6d37eee52744b52af7303b60101f12e21b387d9526fad08f9c77e98d5c9b98724be9104b730c31b89b8ed9c1052051f2a2acb7b73cbfc6190ddf567771f05
7
- data.tar.gz: 48545ac1774a659e90dc0303bd4d51b5a6619012a1d1ded25f8ed52472e774b9547abd6a462c37e2d318c73eb7e04d16b27346c83e502c1cb8b0771a77f6f727
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.3"
5
+ VERSION = "0.4.4"
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: 0.4.3
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-27 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