feat(cli): add governance subcommand for repo maturity scoring#52
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4b881b323
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ci_dirs = [ | ||
| repo_path / ".github" / "workflows", | ||
| repo_path / ".circleci", | ||
| repo_path / ".gitlab-ci.yml", | ||
| ] |
There was a problem hiding this comment.
Detect .gitlab-ci.yml as CI file
Repositories that rely solely on GitLab CI are currently scored as missing CI/CD because .gitlab-ci.yml is placed in ci_dirs and only checked with is_dir(), which can never succeed for this file. In that case the CI_CD check incorrectly fails and the total governance score is understated by 5 points. Move .gitlab-ci.yml into the file checks (or add a dedicated is_file() check) so GitLab-based repos are scored correctly.
Useful? React with 👍 / 👎.
a4b881b to
ee8f713
Compare
Scores repos 0-100 on governance artifacts: LICENSE, CONTRIBUTING, SECURITY, README, CODE_OF_CONDUCT, issue/PR templates, CHANGELOG, DCO/CLA process, and CI/CD config. Supports --json output. 11 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1f028f4 to
072c5e3
Compare
Summary
arbiter governance /path/to/repocommand scoring repos 0-100 on governance artifacts--jsonflag for structured outputTest plan
test_empty_repo_scores_zero— empty repo gets 0test_full_governance— all artifacts present = 100test_license_detection— MIT/Apache/GPL/unknown detectiontest_partial_governance— LICENSE + README = 30 pointstest_json_output— valid JSON with correct structuretest_governance_help— CLI help renderstest_readme_too_short— README under 100 chars failstest_signed_off_by_detection— DCO from git logtest_alternative_license_names— LICENCE varianttest_ci_cd_travis— .travis.yml detectiontest_dataclass_fields— dataclass construction🤖 Generated with Claude Code