chore(governance): branch-protection policy + versions manifest fix#16
Draft
beengud wants to merge 1 commit into
Draft
chore(governance): branch-protection policy + versions manifest fix#16beengud wants to merge 1 commit into
beengud wants to merge 1 commit into
Conversation
Completes the remaining file-creatable parts of the docs governance scaffolding (#5, #6, #7). The bulk of the scaffolding (CODEOWNERS, release.yml, docs-lint.yml, CONTRIBUTING/STRUCTURE/RELEASE, versioned docs) already exists on main; this fills the concrete gaps. #6 Release Pipeline & Branch Protection - Add .github/branch-protection.json: machine-readable ruleset for `main` (required PR + Code Owner review, the five docs-lint status checks by job name, linear history, no force-push/deletion). - Add scripts/apply-branch-protection.sh: admin-token helper that PUTs the ruleset via the GitHub API (gh). - Add docs/BRANCH_PROTECTION.md: documents the policy, required-check job names, apply (script + UI) and verify steps, and that applying it is an admin-only / human action. - RELEASE.md: correct the required-check names to the actual job names and link the new policy doc; CODEOWNERS + README updated to reference them. #5 / #7 Versioning manifest fix - docs/versions.json: `latest` pointed at vNEXT (a development build) and omitted the on-disk v1.0.0 (which the `latest` symlink targets). Point `latest` at v1.0.0 and list it as stable so the manifest matches reality. Validation: versions.json + branch-protection.json valid JSON; docs-lint.yml valid YAML; apply script bash -n clean; jq payload matches the GitHub branch-protection API schema; markdownlint clean on the new doc; structure and phage-policy checks pass locally; no new markdownlint errors introduced. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #5 #6 #7.
Context
Most of the docs-governance scaffolding from these issues already exists on
main(CODEOWNERS,release.yml,docs-lint.ymlwith markdownlint/link-check/front-matter/structure/phage-policy jobs,docs/CONTRIBUTING.md,docs/STRUCTURE.md,docs/RELEASE.md, versioned docs underdocs/versions/, README references). This PR fills the remaining file-creatable gaps rather than re-creating what's there.What this PR adds/fixes
#6 — Release Pipeline & Branch Protection
.github/branch-protection.json— machine-readable ruleset formain: require PR + 1 approving Code Owner review, the fivedocs-lintstatus checks (referenced by their exact jobname:values), strict/up-to-date checks, linear history, conversation resolution, no force-push, no deletion.enforce_adminsandrequired_signaturesare off by default with inline notes on how to enable.scripts/apply-branch-protection.sh— admin helper that strips the doc-only fields andPUTs the ruleset to/repos/{owner}/{repo}/branches/main/protectionviagh api.docs/BRANCH_PROTECTION.md— policy summary table, the required-check job-name list, apply (script + GitHub UI) and verify steps, and an explicit callout that applying protection is admin-only.docs/RELEASE.md— corrected the "Required status checks" list (it listedmarkdown-lint/link-check/etc.; the real job names areMarkdown Linting,Link Validation,Front Matter Validation,Structure Validation,Phage Policy Enforcement) and linked the new policy doc..github/CODEOWNERS+README.md— reference the new governance files.#5 / #7 — Versioning manifest fix
docs/versions.json—latestpointed atvNEXT(a development build) and omittedv1.0.0, even thoughv1.0.0/exists on disk and thedocs/versions/latestsymlink targets it. Nowlatest=v1.0.0and the manifest lists it asstable, so the manifest matches reality.docs-lint.ymlphage-policy allowlist updated so the newBRANCH_PROTECTION.mdgovernance doc is permitted indocs/root.Human-only follow-ups (cannot be done from a PR)
main— run./scripts/apply-branch-protection.sh raibid-labs/docs mainwith an admin token, or configure it in Settings → Branches. The default ActionsGITHUB_TOKENcannot set this. Steps documented indocs/BRANCH_PROTECTION.md.enforce_adminsif the org mandates them (flip the flags inbranch-protection.jsonand re-apply).Validation
versions.jsonandbranch-protection.json: valid JSON; jq-extracted payload matches the GitHub branch-protection API schema.docs-lint.yml: valid YAML; structure + phage-policy checks pass locally.apply-branch-protection.sh:bash -nclean.docs/BRANCH_PROTECTION.mdis clean under repo.markdownlint.json; README/RELEASE error counts unchanged vsorigin/main(no new violations introduced — there are pre-existing markdownlint errors onmain, left untouched and out of scope).npm run buildnot run:node_modulesnot installed and changes are markdown/JSON/YAML/shell only, touching no Quartz code.🤖 Generated with Claude Code