cloud-platform-repository-checker 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2b4aca4d981216824e51df4da42c15698739e92113d4d20c942a8e1c6ee2351
4
- data.tar.gz: 222a26a71b7f78e4ae6b14b725b50310513f0bab1511a93ffb93fdf56b0431fb
3
+ metadata.gz: 60d229973369bc0c5340def8a8e75649c381264b514ed62621c1e035dbde224e
4
+ data.tar.gz: d881956db6b61be7f794869f983cab1658a4c90437a6567467d251a86aa28961
5
5
  SHA512:
6
- metadata.gz: b2ab3ded011bed4820ac322e71264699c82e147bf73e0f4a5c0b19c1fb6328c69d719f5bbda0b80c8f4db7db5a4a434cd8cb3913d5c388c8988eeac5708c35c7
7
- data.tar.gz: c40911cafba83133022983f040cd3e2f8ba20e4d604a90220652853faa0295dce1928196f1bcf61908da1171db2fe4cfa83705f8233b39e78ca49b09f7babb5f
6
+ metadata.gz: a893a66211f292b3058e6715d6ecb0bd93b2c54217978a6a1eec6b25ff57913fe2c7747671c0a3f936b6af7cbebd2b41fb51f8ada5b7cc56f624c94f6b9181ea
7
+ data.tar.gz: 8bb942f8268191031e92640492d0a9e4c5e99947bf73afacf1e86b5aa6a745a203b18035a4aec777dc657c7f3bd243f04b92b8944c4165347b756b0bad8c764b
@@ -12,7 +12,7 @@ class RepositoryLister < GithubGraphQlClient
12
12
  # Returns a list of repository names which match `regexp`
13
13
  def repository_names
14
14
  list_repos
15
- .filter { |repo| repo["name"] =~ regexp }
15
+ .select { |repo| repo["name"] =~ regexp }
16
16
  .map { |repo| repo["name"] }
17
17
  end
18
18
 
@@ -101,7 +101,7 @@ class RepositoryReport < GithubGraphQlClient
101
101
  def is_team_admin?
102
102
  client = Octokit::Client.new(access_token: github_token)
103
103
 
104
- client.repo_teams([organization, repo_name].join("/")).filter do |team|
104
+ client.repo_teams([organization, repo_name].join("/")).select do |team|
105
105
  team[:name] == team && team[:permission] == ADMIN
106
106
  end.any?
107
107
  rescue Octokit::NotFound
@@ -117,7 +117,7 @@ class RepositoryReport < GithubGraphQlClient
117
117
  requiring_branch_protection_rules do |rules|
118
118
 
119
119
  rules
120
- .filter { |edge| edge.dig("node", "pattern") == MASTER }
120
+ .select { |edge| edge.dig("node", "pattern") == MASTER }
121
121
  .any?
122
122
  end
123
123
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud-platform-repository-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Salgado