cloud-platform-repository-checker 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/lib/repository_report.rb +0 -1
- metadata +8 -9
- data/bin/check.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d306587c4bb81554d8dd4c6b37f9e8e74d2068274dab46250b6542fc37e4f168
|
4
|
+
data.tar.gz: 29eee854a7436f2ce24164dcf8216fe9011fa6ab5bc271b1b12b58743014a059
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39aa4323f868fc6115c0d6cc18dfa5d808bddf17beb163b52e20141fa4d3c19cca489c850b009bcb7ff211f64ab054155ba3630b155e85006818430f36d6b9a
|
7
|
+
data.tar.gz: df74b0297eab79237fbbb0c543802f5c251f262899fc48abda7deb7d497d479e553d54059202319342e382ff158908c557bffad9750ff45a76420d1fab5e753d
|
data/README.md
CHANGED
@@ -1,2 +1,21 @@
|
|
1
1
|
# cloud-platform-repository-checker
|
2
|
+
|
2
3
|
Checks all Cloud Platform repositories for compliance
|
4
|
+
|
5
|
+
## Updating
|
6
|
+
|
7
|
+
This code is published as a [ruby gem].
|
8
|
+
|
9
|
+
To publish a new version:
|
10
|
+
|
11
|
+
* Authenticate to `rubygems.org` as `ministryofjustice` (credentials are in LastPass)
|
12
|
+
* Update the `VERSION` value in the `makefile`
|
13
|
+
* Run `make publish`
|
14
|
+
|
15
|
+
This will repackage the gem using the latest code, and push a new release to
|
16
|
+
rubygems.org
|
17
|
+
|
18
|
+
> Please remember to keep the unit tests in `spec` up to date wrt. your code
|
19
|
+
> changes.
|
20
|
+
|
21
|
+
[ruby gem]: https://rubygems.org/gems/cloud-platform-repository-checker
|
data/lib/repository_report.rb
CHANGED
@@ -57,7 +57,6 @@ class RepositoryReport < GithubGraphQlClient
|
|
57
57
|
requires_code_owner_reviews: has_branch_protection_property?("requiresCodeOwnerReviews"),
|
58
58
|
administrators_require_review: has_branch_protection_property?("isAdminEnforced"),
|
59
59
|
dismisses_stale_reviews: has_branch_protection_property?("dismissesStaleReviews"),
|
60
|
-
requires_strict_status_checks: has_branch_protection_property?("requiresStrictStatusChecks"),
|
61
60
|
team_is_admin: is_team_admin?,
|
62
61
|
}
|
63
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud-platform-repository-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Salgado
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -24,10 +24,9 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email: platforms@digital.justice.gov.uk
|
29
29
|
executables:
|
30
|
-
- check.rb
|
31
30
|
- cloud-platform-repository-checker
|
32
31
|
- list-master-repos.rb
|
33
32
|
extensions: []
|
@@ -38,7 +37,6 @@ files:
|
|
38
37
|
- Gemfile.lock
|
39
38
|
- LICENSE
|
40
39
|
- README.md
|
41
|
-
- bin/check.rb
|
42
40
|
- bin/cloud-platform-repository-checker
|
43
41
|
- bin/list-master-repos.rb
|
44
42
|
- env.example
|
@@ -49,7 +47,7 @@ homepage: https://github.com/ministryofjustice/cloud-platform
|
|
49
47
|
licenses:
|
50
48
|
- MIT
|
51
49
|
metadata: {}
|
52
|
-
post_install_message:
|
50
|
+
post_install_message:
|
53
51
|
rdoc_options:
|
54
52
|
- "--main"
|
55
53
|
- README.md
|
@@ -67,7 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
65
|
version: '0'
|
68
66
|
requirements: []
|
69
67
|
rubygems_version: 3.0.3
|
70
|
-
signing_key:
|
68
|
+
signing_key:
|
71
69
|
specification_version: 4
|
72
|
-
summary:
|
70
|
+
summary: Check that ministryofjustice/cloud-platform-* github repositories comply
|
71
|
+
with our standards
|
73
72
|
test_files: []
|
data/bin/check.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Script to list repositories in the ministryofjustice organisation whose names
|
4
|
-
# match a regular expression, and output a JSON report of how well they
|
5
|
-
# do/don't comply with our team-wide standards for how github repositories
|
6
|
-
# should be configured.
|
7
|
-
|
8
|
-
require "json"
|
9
|
-
require "net/http"
|
10
|
-
require "uri"
|
11
|
-
require "octokit"
|
12
|
-
|
13
|
-
require_relative "../lib/github_graph_ql_client"
|
14
|
-
require_relative "../lib/repository_lister"
|
15
|
-
require_relative "../lib/repository_report"
|
16
|
-
|
17
|
-
############################################################
|
18
|
-
|
19
|
-
params = {
|
20
|
-
organization: ENV.fetch("ORGANIZATION"),
|
21
|
-
regexp: Regexp.new(ENV.fetch("REGEXP")),
|
22
|
-
team: ENV.fetch("TEAM"),
|
23
|
-
github_token: ENV.fetch("GITHUB_TOKEN")
|
24
|
-
}
|
25
|
-
|
26
|
-
repo_name = ARGV.shift
|
27
|
-
pp RepositoryReport.new(params.merge(repo_name: repo_name)).fetch_repo_data
|