Repository navigation
chore(ci): version-control branch rulesets and label taxonomy - #2
Conversation
Branch protection and labels lived only as ad-hoc API calls, which made them
invisible to review. Store them as data in the repository instead.
- .github/rulesets/{dev,main-release}.json — ruleset definitions
- .github/rulesets/README.md — how to apply them, and the two settings that
must change later (approval count once a second maintainer exists, the
Flutter check once M0 lands)
- .github/labels.sh — idempotent label sync
- Document both in .agents/docs/workflow.md
The rulesets are not applied yet. GitHub rejects ruleset creation on a private
repository on the free plan, so they land when the repository goes public.
Closes #1
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
sjungwon03-ai
left a comment
There was a problem hiding this comment.
Solid move to version-control the rulesets and label taxonomy instead of ad-hoc API calls. Both JSON files are schema-valid, the labels script is idempotent, and the README documents the two deferred settings (review count → 1, Flutter gate as required check) with the exact edit to make later. CI is green. LGTM.
Review feedback on #2: the script ran with `set -u` and chained the success message with `&&`, so a failing `gh label create` printed nothing and the sync still exited 0. A partial sync looked identical to a complete one. Use `set -euo pipefail`, branch explicitly on the create result, count failures, and exit non-zero from an EXIT trap. Also allow overriding the target repository with LABELS_REPO so the script can be tested against a scratch repo. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
|
Addressed the On |
Summary
Branch protection and the label taxonomy existed only as ad-hoc API calls. This stores both as
data in the repository so they are reviewable and reproducible.
Closes #1
Validation
dart format .— N/A, no Dart code yetflutter analyzereports no warnings — N/A, pre-scaffoldingflutter testpasses — N/A, pre-scaffoldingbuild_runner— N/A, no modelsdev; ruleset JSON was rejected only by the private-repo plan limit, not by schemaChecklist
devCloses #git commit -s(DCO)Notes for reviewers
Two settings are deliberately not matching the reference repository:
required_approving_review_countis0, not1. With one maintainer and no bypass actors,requiring an approval would make every pull request unmergeable.
Flutter quality gateis not a required check, because it is skipped until M0 landspubspec.yaml.Both are documented in
.github/rulesets/README.mdwith the exact change to make later.