way_of_working 2.1.0 → 2.2.0
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 +4 -4
- data/CHANGELOG.md +27 -1
- data/CLAUDE.md +48 -0
- data/CODE_OF_CONDUCT.md +55 -104
- data/CONTRIBUTING.md +4 -4
- data/README.md +68 -24
- data/exe/way_of_working +6 -1
- data/lib/way_of_working/audit/github/auditor.rb +3 -0
- data/lib/way_of_working/audit/github/generators/exec.rb +63 -12
- data/lib/way_of_working/audit/github/rules/base.rb +29 -4
- data/lib/way_of_working/audit/github/rules/registry.rb +8 -0
- data/lib/way_of_working/changelog/keepachangelog/generators/init.rb +1 -1
- data/lib/way_of_working/changelog/keepachangelog/github_audit_rule.rb +1 -1
- data/lib/way_of_working/changelog/keepachangelog.rb +2 -6
- data/lib/way_of_working/cli.rb +13 -0
- data/lib/way_of_working/code_of_conduct/contributor_covenant/generators/init.rb +33 -3
- data/lib/way_of_working/code_of_conduct/contributor_covenant/github_audit_rule.rb +3 -2
- data/lib/way_of_working/code_of_conduct/contributor_covenant/templates/CODE_OF_CONDUCT.md.tt +55 -105
- data/lib/way_of_working/code_of_conduct/contributor_covenant/templates/docs/way_of_working/code-of-conduct.md +21 -20
- data/lib/way_of_working/code_of_conduct/contributor_covenant.rb +3 -7
- data/lib/way_of_working/completion.rb +60 -0
- data/lib/way_of_working/config.rb +45 -0
- data/lib/way_of_working/decision_record/madr/github_audit_rule.rb +0 -13
- data/lib/way_of_working/decision_record/madr/templates/docs/way_of_working/decision-records.md +1 -1
- data/lib/way_of_working/decision_record/madr.rb +2 -6
- data/lib/way_of_working/inclusive_language/alex/generators/init.rb +25 -0
- data/lib/way_of_working/inclusive_language/alex/github_audit_rule.rb +12 -5
- data/lib/way_of_working/inclusive_language/alex/templates/.github/workflows/inclusive-language.yml +1 -1
- data/lib/way_of_working/inclusive_language/alex.rb +4 -6
- data/lib/way_of_working/pull_request_template/hdi.rb +2 -6
- data/lib/way_of_working/readme_badge/generators/init.rb +11 -1
- data/lib/way_of_working/readme_badge.rb +2 -6
- data/lib/way_of_working/sub_commands/base.rb +12 -0
- data/lib/way_of_working/sub_commands/config.rb +25 -0
- data/lib/way_of_working/sub_commands/init.rb +1 -1
- data/lib/way_of_working/version.rb +1 -1
- data/lib/way_of_working/versioning/semver/github_audit_rule.rb +0 -11
- data/lib/way_of_working/versioning/semver.rb +2 -6
- data/lib/way_of_working.rb +18 -11
- data/way_of_working.gemspec +2 -1
- metadata +23 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e80c5de893433da7e31dbdbf63240fd0cc2fba4fbdf4a5ca95d4402537273487
|
|
4
|
+
data.tar.gz: ae9e09728422fefbd4ca909dc59fae0032b7508b8aa1a2548c781c6ace3d8ffb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ae36d59c5b5f8aaa715b240b3b47974f8d34d4cde064748e6fd158e6d411050989446626d0a377e14ffe66ef6c0dd25364430be8fbc57855c013204a9785833
|
|
7
|
+
data.tar.gz: 6af4793bf00e9bb706008b1f3d7d9d000b2cd4f5ecf9a17bfc6703dc80b5fde37b4cf53adf7464192cecf108c9a8b7e817c666e013563c1328d4a2178e1c9f4d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- markdownlint-disable-file MD024 -->
|
|
1
2
|
# Changelog
|
|
2
3
|
|
|
3
4
|
All notable changes to this project will be documented in this file.
|
|
@@ -7,6 +8,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
8
|
|
|
8
9
|
## [Unreleased]
|
|
9
10
|
|
|
11
|
+
## [2.2.0] - 2026-11-25
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **CLI:** added bash and zsh Tab completion of commands and options, including those from plugins. Enable it with `eval "$(way_of_working completion zsh)"` (or `bash`).
|
|
16
|
+
- **GitHub Audit:** added `--rule` and `--tag` to run (and `--fix`) only the named audit rules or rules with a given tag, e.g. `--rule versioning/semver` or `--tag cis_level1`, and `--list-rules` to list the rule IDs and tags. Each audit result line now shows its rule ID, e.g. `Passed Semantic Versioning (versioning/semver)`. Plugins can give their rules shorter IDs by overriding `Rules::Base.rule_id`.
|
|
17
|
+
- **Config:** added `way_of_working config get`/`set` for persisting values (e.g. the Code of Conduct contact method) in `~/.config/way_of_working/config.yaml`, namespaced by dotted feature keys. `--contact-method` now falls back to the stored value and offers to remember a newly-provided one.
|
|
18
|
+
- **Inclusive Language:** `way_of_working init inclusive_language` now adds its GitHub Actions status badge to the README badge panel (created by `init readme_badge`) when the project has a GitHub remote.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Inclusive Language:** the GitHub audit rule now checks that the workflow, `.alexignore`, `.alexrc` and documentation files match the templates, instead of only checking for a workflow named "Inclusive Language".
|
|
23
|
+
- **Code of Conduct:** upgraded Contributor Covenant 2.1 → 3 in place; `code_of_conduct/contributor_covenant` now generates v3 and v2.1 is no longer available. The GitHub audit rule now fails repos still on an older version.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **README Badge:** rerunning `way_of_working init readme_badge` after the badge version or name changes (e.g. after upgrading the gem) now updates the existing badge instead of adding another badge holder to the README.
|
|
28
|
+
- **Audit:** built-in GitHub audit rules are no longer loaded inside `rescue LoadError`, so a rule that fails to load (e.g. a missing dependency) now raises instead of silently disappearing from the audit. `base64` is now a declared dependency.
|
|
29
|
+
- **CLI:** errors such as an unknown command now exit with status 1 instead of 0, and no longer print a Thor deprecation warning. Scripts that relied on a 0 exit status after an error will now see the failure.
|
|
30
|
+
- **CLI:** every command now starts about 0.2s faster: Octokit and the full set of ActiveSupport core extensions are loaded only when the GitHub audit runs, not whenever `way_of_working` is required.
|
|
31
|
+
- **Gem:** the gemspec homepage now points to the README on GitHub instead of the HDI-specific GitHub Pages site.
|
|
32
|
+
- **CLI:** `--help` now lists the options of generator commands, e.g. `way_of_working exec audit_github --help` shows `--all`, `--fix`, `--name`, `--public` and `--topic`.
|
|
33
|
+
- **Zeitwerk:** eager loading (e.g. a Rails app in production) no longer enables the opt-in built-in features or registers their GitHub audit rules; they now load only when explicitly required.
|
|
34
|
+
|
|
10
35
|
## [2.1.0] - 2026-06-08
|
|
11
36
|
|
|
12
37
|
### Added
|
|
@@ -74,7 +99,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
74
99
|
|
|
75
100
|
- Corrected use of relative paths in the rubocop config file
|
|
76
101
|
|
|
77
|
-
[unreleased]: https://github.com/HealthDataInsight/way_of_working/compare/v2.
|
|
102
|
+
[unreleased]: https://github.com/HealthDataInsight/way_of_working/compare/v2.2.0...HEAD
|
|
103
|
+
[2.2.0]: https://github.com/HealthDataInsight/way_of_working/compare/v2.1.0...v2.2.0
|
|
78
104
|
[2.1.0]: https://github.com/HealthDataInsight/way_of_working/compare/v2.0.1...v2.1.0
|
|
79
105
|
[2.0.1]: https://github.com/HealthDataInsight/way_of_working/compare/v2.0.0...v2.0.1
|
|
80
106
|
[2.0.0]: https://github.com/HealthDataInsight/way_of_working/compare/v1.0.0...v2.0.0
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Commands
|
|
4
|
+
|
|
5
|
+
- `bin/setup` to install dependencies
|
|
6
|
+
- `bundle exec rake test` to run all tests
|
|
7
|
+
- `bundle exec ruby -Ilib -Itest test/way_of_working/decision_record/madr/generators/init_test.rb` to test one file
|
|
8
|
+
- `bundle exec ruby -Ilib -Itest test/path/to/file_test.rb -n "/files_are_created/"` to run on one test (names use underscores)
|
|
9
|
+
- `bundle exec rake rubocop` to lint Ruby
|
|
10
|
+
- `bundle exec exe/way_of_working help` to run the CLI from source
|
|
11
|
+
|
|
12
|
+
## Architecture
|
|
13
|
+
|
|
14
|
+
`way_of_working` is a Thor CLI (`exe/way_of_working` → `WayOfWorking::Cli`) with four subcommands: `init`, `new`, `exec` and `config`. Each is a `Thor` class in `lib/way_of_working/sub_commands/`.
|
|
15
|
+
Features add commands by reopening those classes and calling `register(GeneratorClass, name, usage, long_desc)`. `SubCommands::Base.register` copies a `Thor::Group`'s `class_options` onto the wrapper command so they show in `--help`.
|
|
16
|
+
|
|
17
|
+
**Features** follow a `category/variant` namespace (`decision_record/madr`, `code_of_conduct/contributor_covenant`). Each has:
|
|
18
|
+
|
|
19
|
+
- `<variant>.rb`: requires its generators, registers them with the subcommands and requires its audit rule unguarded, so a broken rule fails loudly.
|
|
20
|
+
- `<variant>/generators/*.rb`: `Thor::Group` + `Thor::Actions` generators whose `source_root` is `<variant>/templates/`. The templates mirror the target project's layout, and files ending `.tt` are ERB templates.
|
|
21
|
+
- `<variant>/github_audit_rule.rb`: a `Audit::Github::Rules::Base` subclass that registers itself with `Audit::Github::Rules::Registry`. It usually checks that the target repo contains the feature's template files verbatim.
|
|
22
|
+
|
|
23
|
+
**Opt-in loading:** `require 'way_of_working'` loads only `readme_badge`. Every other built-in feature (including `audit/github`) is enabled with an explicit `require 'way_of_working/<category>/<variant>'`. External plugins are gems named `way_of_working-*`, and `lib/way_of_working.rb` auto-requires their `<name with / for ->/plugin.rb`.
|
|
24
|
+
|
|
25
|
+
**Zeitwerk:** the gem uses `Zeitwerk::Loader.for_gem`, so file paths must match constant names. `lib/way_of_working.rb` ignores every `github_audit_rule.rb` with a glob, because those files register themselves on load and are required explicitly by their feature.
|
|
26
|
+
`zeitwerk_gem_loader_test.rb` and `zeitwerk_test_loader_test.rb` eager-load `lib/` and `test/` to enforce this. That means test files must declare the constant their path implies.
|
|
27
|
+
|
|
28
|
+
**Config:** `WayOfWorking::Config` stores values the user chooses to keep in `~/.config/way_of_working/config.yaml` (or under `$XDG_CONFIG_HOME`). Keys are namespaced by feature (`code_of_conduct.contact_method`).
|
|
29
|
+
A generator falls back to the stored value when an option isn't passed and offers to save new values (see `contributor_covenant/generators/init.rb`). `WayOfWorking::Configuration` is something else: organisation gems set the badge name and version there.
|
|
30
|
+
|
|
31
|
+
## Tests
|
|
32
|
+
|
|
33
|
+
The tests are Minitest with ActiveSupport and mocha. Generator tests subclass `Rails::Generators::TestCase` and write into `tmp/generators`. They usually check both `run_generator` and `run_generator [], behavior: :revoke`. Audit rule tests stub the Octokit client with mocha.
|
|
34
|
+
|
|
35
|
+
## Versioning and changelog
|
|
36
|
+
|
|
37
|
+
SemVer covers the gem's **interface**: CLI commands and options, feature require paths, and the plugin registration API. It doesn't cover generated content ([ADR-0001](docs/decisions/0001-version-the-gem-interface-not-generated-content.md)).
|
|
38
|
+
|
|
39
|
+
- Refreshing an embedded standard or adding a feature or variant is **MINOR**. A generation bug fix is **PATCH**. Breaking the interface is **MAJOR**.
|
|
40
|
+
- If a standard upgrade is drastic enough to surprise existing users, add a **new variant** next to the existing one instead of changing it.
|
|
41
|
+
- `CHANGELOG.md` follows Keep a Changelog. Add entries under `[Unreleased]` with a bold feature prefix, e.g. `- **Code of Conduct:** …`.
|
|
42
|
+
- Release by bumping `lib/way_of_working/version.rb`, moving the `[Unreleased]` entries under the new version, then running `bundle exec rake release`.
|
|
43
|
+
|
|
44
|
+
The repo uses its own generators: `docs/decisions/` and `docs/way_of_working/` are generated output, and the source templates live under `lib/**/templates/`.
|
|
45
|
+
|
|
46
|
+
## Pull requests
|
|
47
|
+
|
|
48
|
+
Write PR descriptions using the sections in `.github/pull_request_template.md` (What, Why, How, Testing, optional Screenshots, Anything Else).
|
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,133 +1,84 @@
|
|
|
1
1
|
<!--alex disable sex sexual-->
|
|
2
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
+
# Contributor Covenant 3.0 Code of Conduct
|
|
3
3
|
|
|
4
4
|
## Our Pledge
|
|
5
5
|
|
|
6
|
-
We
|
|
7
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
9
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
10
|
-
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
11
|
-
identity and orientation.
|
|
6
|
+
We pledge to make our community welcoming, safe, and equitable for all.
|
|
12
7
|
|
|
13
|
-
We
|
|
14
|
-
diverse, inclusive, and healthy community.
|
|
8
|
+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
|
15
9
|
|
|
16
|
-
##
|
|
10
|
+
## Encouraged Behaviors
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
community include:
|
|
12
|
+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
23
|
-
* Giving and gracefully accepting constructive feedback
|
|
24
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
25
|
-
and learning from the experience
|
|
26
|
-
* Focusing on what is best not only for us as individuals, but for the overall
|
|
27
|
-
community
|
|
14
|
+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
|
28
15
|
|
|
29
|
-
|
|
16
|
+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
|
17
|
+
2. Engaging **kindly and honestly** with others.
|
|
18
|
+
3. Respecting **different viewpoints** and experiences.
|
|
19
|
+
4. **Taking responsibility** for our actions and contributions.
|
|
20
|
+
5. Gracefully giving and accepting **constructive feedback**.
|
|
21
|
+
6. Committing to **repairing harm** when it occurs.
|
|
22
|
+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
any kind
|
|
33
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
34
|
-
* Public or private harassment
|
|
35
|
-
* Publishing others' private information, such as a physical or email address,
|
|
36
|
-
without their explicit permission
|
|
37
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
38
|
-
professional setting
|
|
24
|
+
## Restricted Behaviors
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
or
|
|
28
|
+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
|
29
|
+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
|
30
|
+
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
|
|
31
|
+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
|
32
|
+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
|
33
|
+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
|
34
|
+
7. Behaving in other ways that **threaten the well-being** of our community.
|
|
46
35
|
|
|
47
|
-
|
|
48
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
49
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
50
|
-
decisions when appropriate.
|
|
36
|
+
### Other Restrictions
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Examples of representing our community include using an official e-mail address,
|
|
57
|
-
posting via an official social media account, or acting as an appointed
|
|
58
|
-
representative at an online or offline event.
|
|
59
|
-
|
|
60
|
-
## Enforcement
|
|
61
|
-
|
|
62
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
63
|
-
reported to the community leaders responsible for enforcement at
|
|
64
|
-
report.complaints@healthdatainsight.org.uk.
|
|
65
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
66
|
-
|
|
67
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
-
reporter of any incident.
|
|
69
|
-
|
|
70
|
-
## Enforcement Guidelines
|
|
38
|
+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
|
39
|
+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
|
40
|
+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
|
41
|
+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
|
71
42
|
|
|
72
|
-
|
|
73
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
43
|
+
## Reporting an Issue
|
|
74
44
|
|
|
75
|
-
|
|
45
|
+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
|
76
46
|
|
|
77
|
-
|
|
78
|
-
unprofessional or unwelcome in the community.
|
|
47
|
+
When an incident does occur, it is important to report it promptly. To report a possible violation, contact the Community Moderators at report.complaints@healthdatainsight.org.uk.
|
|
79
48
|
|
|
80
|
-
|
|
81
|
-
clarity around the nature of the violation and an explanation of why the
|
|
82
|
-
behavior was inappropriate. A public apology may be requested.
|
|
49
|
+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
|
83
50
|
|
|
84
|
-
|
|
51
|
+
## Addressing and Repairing Harm
|
|
85
52
|
|
|
86
|
-
|
|
87
|
-
actions.
|
|
53
|
+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
|
88
54
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
55
|
+
1) Warning
|
|
56
|
+
1) Event: A violation involving a single incident or series of incidents.
|
|
57
|
+
2) Consequence: A private, written warning from the Community Moderators.
|
|
58
|
+
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
|
59
|
+
2) Temporarily Limited Activities
|
|
60
|
+
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
|
61
|
+
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
|
62
|
+
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
|
63
|
+
3) Temporary Suspension
|
|
64
|
+
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
|
65
|
+
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
|
66
|
+
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
|
67
|
+
4) Permanent Ban
|
|
68
|
+
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
|
69
|
+
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
|
70
|
+
3) Repair: There is no possible repair in cases of this severity.
|
|
95
71
|
|
|
96
|
-
|
|
72
|
+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
|
97
73
|
|
|
98
|
-
|
|
99
|
-
sustained inappropriate behavior.
|
|
100
|
-
|
|
101
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
-
communication with the community for a specified period of time. No public or
|
|
103
|
-
private interaction with the people involved, including unsolicited interaction
|
|
104
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
-
Violating these terms may lead to a permanent ban.
|
|
106
|
-
|
|
107
|
-
### 4. Permanent Ban
|
|
108
|
-
|
|
109
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
74
|
+
## Scope
|
|
112
75
|
|
|
113
|
-
|
|
114
|
-
community.
|
|
76
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
115
77
|
|
|
116
78
|
## Attribution
|
|
117
79
|
|
|
118
|
-
This Code of Conduct is adapted from the
|
|
119
|
-
version 2.1, available at
|
|
120
|
-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
121
|
-
|
|
122
|
-
Community Impact Guidelines were inspired by
|
|
123
|
-
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
80
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
|
124
81
|
|
|
125
|
-
|
|
126
|
-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
127
|
-
[https://www.contributor-covenant.org/translations][translations].
|
|
82
|
+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
|
128
83
|
|
|
129
|
-
[
|
|
130
|
-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
131
|
-
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
132
|
-
[FAQ]: https://www.contributor-covenant.org/faq
|
|
133
|
-
[translations]: https://www.contributor-covenant.org/translations
|
|
84
|
+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
|
data/CONTRIBUTING.md
CHANGED
|
@@ -35,10 +35,10 @@ rationale.
|
|
|
35
35
|
| Drastic standard upgrade shipped as a **new variant** alongside the existing one | **MINOR** (additive) |
|
|
36
36
|
| Bug fix in generation or generated output | **PATCH** |
|
|
37
37
|
|
|
38
|
-
For a standard update drastic enough to surprise existing users
|
|
39
|
-
2.1 → 3, effectively a rewrite), add a **new variant** under the feature's `category/variant`
|
|
38
|
+
For a standard update drastic enough to surprise existing users, add a **new variant** under the feature's `category/variant`
|
|
40
39
|
namespace rather than mutating the existing one. Both variants then coexist and consumers opt in by
|
|
41
|
-
require path — keeping the change additive and leaving existing users untouched.
|
|
40
|
+
require path — keeping the change additive and leaving existing users untouched. Where we deliberately drop the old
|
|
41
|
+
version instead (as with Contributor Covenant 2.1 → 3), upgrade the existing variant in place.
|
|
42
42
|
|
|
43
43
|
### Changelog convention
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ All notable changes are recorded in `CHANGELOG.md` following
|
|
|
47
47
|
bold feature prefix so each feature's history stays greppable within the single file, e.g.:
|
|
48
48
|
|
|
49
49
|
```text
|
|
50
|
-
- **Code of Conduct:** upgraded Contributor Covenant 2.1 → 3
|
|
50
|
+
- **Code of Conduct:** upgraded Contributor Covenant 2.1 → 3
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## Releasing
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Way of Working
|
|
2
2
|
|
|
3
3
|
<!-- Way of Working: Main Badge Holder Start -->
|
|
4
|
-

|
|
5
5
|
<!-- Way of Working: Additional Badge Holder Start -->
|
|
6
6
|
<!-- Way of Working: Badge Holder End -->
|
|
7
7
|
|
|
@@ -14,27 +14,28 @@
|
|
|
14
14
|
|
|
15
15
|
This tool underpins the Way of Working framework, used to describe a consistent, high-quality approach to Software Engineering. It is intended as an opinionated approach supporting rapid development, across numerous projects, by a fungible workforce who can swap between assignments with the minimum friction.
|
|
16
16
|
|
|
17
|
-
It consists command line tool that uses a modular, plugin-based system to gain functionality, allowing for organisations to pick and choose different solutions for the same feature.
|
|
17
|
+
It consists of a command line tool that uses a modular, plugin-based system to gain functionality, allowing for organisations to pick and choose different solutions for the same feature.
|
|
18
18
|
Organisations can create their own gem which defines the specific plugin dependencies which form their way of working. See the [Way of Working for HDI](https://github.com/HealthDataInsight/way_of_working-for-hdi) as an example.
|
|
19
19
|
|
|
20
20
|
There are subcommands that plugins hook into which enable them to add GitHub actions, configuration and other files to a project and GitHub pages outlining the tooling choice and thinking behind it.
|
|
21
21
|
|
|
22
22
|
Below is a list of plugins that have been implemented so far:
|
|
23
23
|
|
|
24
|
-
| Feature | Plugin
|
|
25
|
-
|
|
26
|
-
| Audit | Built-in (audit/github)
|
|
27
|
-
| Changelog | Built-in (changelog/keepachangelog)
|
|
28
|
-
| Code Linting | [code_linting-hdi]
|
|
29
|
-
| Code of Conduct | Built-in (code_of_conduct/contributor_covenant) | Implements [Contributor Covenant
|
|
30
|
-
| Decision Records | Built-in (decision_record/madr)
|
|
31
|
-
| Inclusive Language | Built-in (inclusive_language/alex)
|
|
32
|
-
| Pull Request Template | Built-in (pull_request_template/hdi)
|
|
33
|
-
|
|
|
24
|
+
| Feature | Plugin | Description |
|
|
25
|
+
|-----------------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
26
|
+
| Audit | Built-in (audit/github) | A framework for rules to check for incorrect content and configuration of GitHub repos — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
27
|
+
| Changelog | Built-in (changelog/keepachangelog) | Implements [keepachangelog v1.1] — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
28
|
+
| Code Linting | [code_linting-hdi] | Implements a combination of [MegaLinter] and [RuboCop] built on NDRS standards |
|
|
29
|
+
| Code of Conduct | Built-in (code_of_conduct/contributor_covenant) | Implements [Contributor Covenant v3] — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
30
|
+
| Decision Records | Built-in (decision_record/madr) | Implements [MADR v3] — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
31
|
+
| Inclusive Language | Built-in (inclusive_language/alex) | Implements [alex] — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
32
|
+
| Pull Request Template | Built-in (pull_request_template/hdi) | Implements a bespoke PR template — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
33
|
+
| README Badge | Built-in (readme_badge) | Adds a README badge panel and a Way of Working badge — bundled and always loaded, no `require` needed (see [README Badge](#readme-badge)) |
|
|
34
|
+
| Versioning | Built-in (versioning/semver) | Implements [Semantic Versioning v2.0.0] — bundled, opt in by `require` (see [Built-in Features](#built-in-features)) |
|
|
34
35
|
|
|
35
36
|
Some features are **Built-in** — they ship inside this gem and are enabled by requiring them (see [Built-in Features](#built-in-features)); the others are separate plugin gems that you add as dependencies.
|
|
36
37
|
|
|
37
|
-
The standard versions cited above (Contributor Covenant
|
|
38
|
+
The standard versions cited above (Contributor Covenant v3, MADR v3, and so on) describe the content a feature generates, not the gem's interface. They advance through **minor** releases — see [Versioning Policy](#versioning-policy).
|
|
38
39
|
|
|
39
40
|
## Installation
|
|
40
41
|
|
|
@@ -60,7 +61,33 @@ To add all the Way of Working components to your project, run:
|
|
|
60
61
|
way_of_working init all --contact-method [CONTACT METHOD]
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
You will need to provide the Code of Conduct `[CONTACT METHOD]`, usually an email address, for community leaders to receive reports of unacceptable behavior.
|
|
64
|
+
You will need to provide the Code of Conduct `[CONTACT METHOD]`, usually an email address, for community leaders to receive reports of unacceptable behavior. Once you've provided it, you'll be offered the chance to remember it (see [Config](#config)) so you don't need to pass it again next time.
|
|
65
|
+
|
|
66
|
+
### Config
|
|
67
|
+
|
|
68
|
+
Some options, like the Code of Conduct `--contact-method`, are more about you or your organisation than about the specific project you're running the command in. Rather than typing them in every time, `way_of_working` can remember them in `~/.config/way_of_working/config.yaml` (or `$XDG_CONFIG_HOME/way_of_working/config.yaml`):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Store a value once
|
|
72
|
+
way_of_working config set code_of_conduct.contact_method conduct@example.org
|
|
73
|
+
|
|
74
|
+
# Read it back
|
|
75
|
+
way_of_working config get code_of_conduct.contact_method
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Keys are dotted paths namespaced by feature (`code_of_conduct.contact_method`), so unrelated features — a future security contact, say — can store their own values (`security.contact_method`) without clashing.
|
|
79
|
+
When a feature that supports this looks for an option and it isn't passed on the command line, it falls back to the stored value; if you pass the option explicitly and it's new or different, you'll be asked whether to remember it for next time.
|
|
80
|
+
|
|
81
|
+
### README Badge
|
|
82
|
+
|
|
83
|
+
The README badge panel is a set of HTML comments at the top of your README that other generators find and add their badges to. It also shows a Way of Working badge with the version of the way of working your project has adopted. This feature is always loaded, so no `require` is needed:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Add the badge panel, Way of Working badge and documentation to your project
|
|
87
|
+
way_of_working init readme_badge
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Re-running it after upgrading updates the Way of Working badge to the new version. Features such as [Inclusive Language](#inclusive-language) add their own badges to the panel when you initialise them.
|
|
64
91
|
|
|
65
92
|
### Built-in Features
|
|
66
93
|
|
|
@@ -105,6 +132,11 @@ way_of_working exec audit_github --all --public
|
|
|
105
132
|
|
|
106
133
|
# Attempt to automatically fix issues where rules support it
|
|
107
134
|
way_of_working exec audit_github --fix
|
|
135
|
+
|
|
136
|
+
# List the rule IDs and tags, then audit (and fix) only some of them
|
|
137
|
+
way_of_working exec audit_github --list-rules
|
|
138
|
+
way_of_working exec audit_github --rule versioning/semver changelog/keepachangelog --fix
|
|
139
|
+
way_of_working exec audit_github --tag cis_level1 --fix
|
|
108
140
|
```
|
|
109
141
|
|
|
110
142
|
#### Changelog
|
|
@@ -128,12 +160,14 @@ way_of_working init changelog
|
|
|
128
160
|
|
|
129
161
|
A code of conduct sets clear expectations for acceptable behaviour within a community or project, helping to create a safer, more welcoming and inclusive environment and giving maintainers a basis for addressing inappropriate behaviour.
|
|
130
162
|
|
|
131
|
-
This feature installs the [Contributor Covenant
|
|
163
|
+
This feature installs the [Contributor Covenant v3] code of conduct along with its accompanying documentation. Enable it by requiring it:
|
|
132
164
|
|
|
133
165
|
```ruby
|
|
134
166
|
require 'way_of_working/code_of_conduct/contributor_covenant'
|
|
135
167
|
```
|
|
136
168
|
|
|
169
|
+
Previous Contributor Covenant versions (e.g. v2.1) are no longer generated; re-running the generator replaces them with v3.
|
|
170
|
+
|
|
137
171
|
Once required, a subcommand becomes available:
|
|
138
172
|
|
|
139
173
|
```bash
|
|
@@ -141,7 +175,7 @@ Once required, a subcommand becomes available:
|
|
|
141
175
|
way_of_working init code_of_conduct --contact-method [CONTACT METHOD]
|
|
142
176
|
```
|
|
143
177
|
|
|
144
|
-
You will need to provide a `[CONTACT METHOD]`, usually an email address, for community leaders to receive reports of unacceptable behavior.
|
|
178
|
+
You will need to provide a `[CONTACT METHOD]`, usually an email address, for community leaders to receive reports of unacceptable behavior — or store one under `code_of_conduct.contact_method` (see [Config](#config)) so you don't need to pass it every time.
|
|
145
179
|
|
|
146
180
|
#### Decision Records
|
|
147
181
|
|
|
@@ -225,18 +259,32 @@ More help on using the command line tool is found by using:
|
|
|
225
259
|
way_of_working help
|
|
226
260
|
```
|
|
227
261
|
|
|
262
|
+
### Shell Completion
|
|
263
|
+
|
|
264
|
+
Tab completion of commands and options is available for bash and zsh. Add the matching line to your shell's startup file:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# ~/.bashrc
|
|
268
|
+
eval "$(way_of_working completion bash)"
|
|
269
|
+
|
|
270
|
+
# ~/.zshrc (after compinit)
|
|
271
|
+
eval "$(way_of_working completion zsh)"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Completions come from the installed commands each time you press Tab, so commands added by plugins appear without regenerating anything.
|
|
275
|
+
|
|
228
276
|
## Development
|
|
229
277
|
|
|
230
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
278
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
231
279
|
This RubyGem was created using `bundle gem --exe way_of_working`.
|
|
232
280
|
|
|
233
281
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
234
282
|
|
|
235
|
-
When creating plugins, the convention is to create them within the WayOfWorking and feature namespaces. E.g.
|
|
283
|
+
When creating plugins, the convention is to create them within the WayOfWorking and feature namespaces. E.g. the [code_linting-hdi] plugin is the gem `way_of_working-code_linting-hdi`, defines its generators under `WayOfWorking::CodeLinting::Hdi`, and is loaded automatically from `lib/way_of_working/code_linting/hdi/plugin.rb` (the gem name with `-` replaced by `/`).
|
|
236
284
|
|
|
237
285
|
### Versioning Policy
|
|
238
286
|
|
|
239
|
-
This project follows [Semantic Versioning][Semantic Versioning v2.0.0], but SemVer governs the gem's **public interface** — the CLI commands and their options, the require paths of built-in features, and the plugin registration API — not the content of the artefacts its generators emit.
|
|
287
|
+
This project follows [Semantic Versioning][Semantic Versioning v2.0.0], but SemVer governs the gem's **public interface** — the CLI commands and their options (including GitHub audit rule IDs), the require paths of built-in features, and the plugin registration API (including `Rules::Base.rule_id`) — not the content of the artefacts its generators emit.
|
|
240
288
|
|
|
241
289
|
Consequently:
|
|
242
290
|
|
|
@@ -258,12 +306,8 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for development setup, the versioning p
|
|
|
258
306
|
|
|
259
307
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
260
308
|
|
|
261
|
-
## Code of Conduct
|
|
262
|
-
|
|
263
|
-
Everyone interacting in the WayOfWorking project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/HealthDataInsight/way_of_working/blob/main/CODE_OF_CONDUCT.md).
|
|
264
|
-
|
|
265
309
|
[alex]:https://alexjs.com
|
|
266
|
-
[Contributor Covenant
|
|
310
|
+
[Contributor Covenant v3]: https://www.contributor-covenant.org/version/3/0/code_of_conduct/
|
|
267
311
|
[keepachangelog v1.1]: https://keepachangelog.com/en/1.1.0/
|
|
268
312
|
[MADR v3]: https://adr.github.io/madr/
|
|
269
313
|
[MegaLinter]: https://megalinter.io/
|
data/exe/way_of_working
CHANGED
|
@@ -2,4 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
require 'way_of_working'
|
|
4
4
|
|
|
5
|
-
WayOfWorking::
|
|
5
|
+
# Called by the shell completion scripts on every Tab (see WayOfWorking::Completion)
|
|
6
|
+
if ARGV.first == '__complete'
|
|
7
|
+
puts WayOfWorking::Completion.candidates(ARGV.drop(1))
|
|
8
|
+
else
|
|
9
|
+
WayOfWorking::Cli.start(ARGV)
|
|
10
|
+
end
|
|
@@ -27,8 +27,40 @@ module WayOfWorking
|
|
|
27
27
|
class_option :topic, type: :string, default: nil,
|
|
28
28
|
desc: 'Filter repositories by topic (e.g., way-of-working)'
|
|
29
29
|
|
|
30
|
+
class_option :rule, type: :array, default: nil,
|
|
31
|
+
desc: 'Only run (and --fix) these rules (e.g., versioning/semver)'
|
|
32
|
+
|
|
33
|
+
class_option :tag, type: :array, default: nil,
|
|
34
|
+
desc: 'Only run (and --fix) rules with any of these tags (e.g., cis_level1)'
|
|
35
|
+
|
|
36
|
+
class_option :list_rules, type: :boolean, default: false,
|
|
37
|
+
desc: 'List the rule IDs and tags that --rule and --tag accept, and exit'
|
|
38
|
+
|
|
30
39
|
desc 'This runs the github audit on this project'
|
|
31
40
|
|
|
41
|
+
def list_rules_if_requested
|
|
42
|
+
return unless options[:list_rules]
|
|
43
|
+
|
|
44
|
+
width = rule_catalogue.keys.map(&:length).max.to_i
|
|
45
|
+
rule_catalogue.each { |id, (name, tags)| say "#{id.ljust(width)} #{name} #{tags.inspect}" }
|
|
46
|
+
exit
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def check_rule_option
|
|
50
|
+
unknown = Array(options[:rule]) - rule_catalogue.keys
|
|
51
|
+
return if unknown.empty?
|
|
52
|
+
|
|
53
|
+
abort(Rainbow("\nUnknown rule: #{unknown.join(', ')}. Valid rules: #{rule_catalogue.keys.join(', ')}").red)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def check_tag_option
|
|
57
|
+
known = rule_catalogue.values.flat_map(&:last).uniq.map(&:to_s)
|
|
58
|
+
unknown = Array(options[:tag]) - known
|
|
59
|
+
return if unknown.empty?
|
|
60
|
+
|
|
61
|
+
abort(Rainbow("\nUnknown tag: #{unknown.join(', ')}. Valid tags: #{known.join(', ')}").red)
|
|
62
|
+
end
|
|
63
|
+
|
|
32
64
|
def check_for_github_token_environment_variables
|
|
33
65
|
@github_token = ENV.fetch('GITHUB_TOKEN', nil)
|
|
34
66
|
return unless @github_token.nil?
|
|
@@ -97,17 +129,8 @@ module WayOfWorking
|
|
|
97
129
|
@audit_ok = true
|
|
98
130
|
unarchived_repos.each do |repo|
|
|
99
131
|
@auditor.audit(repo) do |rule|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# Do nothing
|
|
103
|
-
when :passed
|
|
104
|
-
say " ✅ #{rule.tags.inspect} Passed #{rule.name}"
|
|
105
|
-
when :failed
|
|
106
|
-
say " ❌ #{rule.tags.inspect} Failed #{rule.name}: #{rule.errors.to_sentence}"
|
|
107
|
-
@audit_ok = false
|
|
108
|
-
else
|
|
109
|
-
abort(Rainbow("Unknown response #{rule.status.inspect}").red)
|
|
110
|
-
end
|
|
132
|
+
id = Rules::Registry.id_for(rule.class, rule.name)
|
|
133
|
+
report(rule, id) if rule_selected?(rule, id)
|
|
111
134
|
end
|
|
112
135
|
end
|
|
113
136
|
end
|
|
@@ -124,6 +147,34 @@ module WayOfWorking
|
|
|
124
147
|
|
|
125
148
|
private
|
|
126
149
|
|
|
150
|
+
# Maps each registered rule's ID to its display name and tags.
|
|
151
|
+
# ponytail: allocate skips initialize (which needs a repo), so tags must not depend on instance state
|
|
152
|
+
def rule_catalogue
|
|
153
|
+
@rule_catalogue ||= Array(Rules::Registry.rules).to_h do |name, klass|
|
|
154
|
+
[Rules::Registry.id_for(klass, name), [name, klass.allocate.tags]]
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# ponytail: rules are still built for every repo, only status (the API calls) is skipped
|
|
159
|
+
def rule_selected?(rule, id)
|
|
160
|
+
(options[:rule].nil? || options[:rule].include?(id)) &&
|
|
161
|
+
(options[:tag].nil? || rule.tags.map(&:to_s).intersect?(options[:tag]))
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def report(rule, id)
|
|
165
|
+
case rule.status
|
|
166
|
+
when :not_applicable
|
|
167
|
+
# Do nothing
|
|
168
|
+
when :passed
|
|
169
|
+
say " ✅ #{rule.tags.inspect} Passed #{rule.name} (#{id})"
|
|
170
|
+
when :failed
|
|
171
|
+
say " ❌ #{rule.tags.inspect} Failed #{rule.name} (#{id}): #{rule.errors.to_sentence}"
|
|
172
|
+
@audit_ok = false
|
|
173
|
+
else
|
|
174
|
+
abort(Rainbow("Unknown response #{rule.status.inspect}").red)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
127
178
|
def unarchived_repos(&block)
|
|
128
179
|
return to_enum(__method__) unless block_given?
|
|
129
180
|
|
|
@@ -131,7 +182,7 @@ module WayOfWorking
|
|
|
131
182
|
next if repo.archived?
|
|
132
183
|
|
|
133
184
|
say
|
|
134
|
-
say("#{repo.name} #{
|
|
185
|
+
say("#{repo.name} #{'🔒' if repo.private?}", :bold)
|
|
135
186
|
say("#{repo.description} [#{repo.language}]")
|
|
136
187
|
say(repo.topics.join(' '), :cyan) unless repo.topics.empty?
|
|
137
188
|
|