ops: enforce branch strategy and add config governance guide#793
ops: enforce branch strategy and add config governance guide#793ashleyshaw wants to merge 1 commit into
Conversation
Add a reusable branch-name validator, wire it into the required Validation job, document the agent branch protocol, and add the canonical configs guide.
|
Warning Review limit reached
More reviews will be available in 38 minutes and 10 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Reviewer Summary for PR #793CI Status: ❌ Recommendations
|
There was a problem hiding this comment.
Code Review
This pull request introduces branch name validation via a new script (validate-branch-name.js) integrated into package.json, updates the branching strategy documentation, and adds a new guide (CANONICAL_CONFIGS_GUIDE.md) mapping the interdependencies of canonical configuration files. The review feedback suggests improving the branch validation script to gracefully handle tag/release workflows and detached HEAD states, and recommends using relative paths instead of absolute URLs for local documentation links to ensure portability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| function main() { | ||
| const branchName = resolveBranchName(); | ||
|
|
||
| if (!branchName) { | ||
| console.error( | ||
| "No branch name provided. Use --branch or set BRANCH_NAME, GITHUB_HEAD_REF, or GITHUB_REF_NAME.", | ||
| ); | ||
| process.exit(1); | ||
| } |
There was a problem hiding this comment.
To prevent CI failures during tag/release workflows (where GITHUB_REF_TYPE is 'tag') and to provide a better developer experience locally when in a detached HEAD state, we should handle these cases gracefully instead of exiting with an error code.
| function main() { | |
| const branchName = resolveBranchName(); | |
| if (!branchName) { | |
| console.error( | |
| "No branch name provided. Use --branch or set BRANCH_NAME, GITHUB_HEAD_REF, or GITHUB_REF_NAME.", | |
| ); | |
| process.exit(1); | |
| } | |
| function main() { | |
| if (process.env.GITHUB_REF_TYPE === "tag" || (process.env.GITHUB_REF && process.env.GITHUB_REF.startsWith("refs/tags/"))) { | |
| console.log("Running on a tag. Skipping branch name validation."); | |
| process.exit(0); | |
| } | |
| const branchName = resolveBranchName(); | |
| if (!branchName) { | |
| console.warn( | |
| "No active branch detected (possibly detached HEAD). Skipping branch name validation." | |
| ); | |
| process.exit(0); | |
| } |
| - [docs/ISSUE_FIELDS.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/ISSUE_FIELDS.md) | ||
| - [docs/ISSUE_TYPES.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/ISSUE_TYPES.md) | ||
| - [docs/LABEL_STRATEGY.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/LABEL_STRATEGY.md) | ||
| - [docs/LABELING.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/LABELING.md) | ||
| - [docs/BRANCHING_STRATEGY.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/BRANCHING_STRATEGY.md) |
There was a problem hiding this comment.
Using absolute GitHub URLs for repository-local documentation links makes the files less portable (e.g., when viewed in forks or offline). It is highly recommended to use relative paths instead.
| - [docs/ISSUE_FIELDS.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/ISSUE_FIELDS.md) | |
| - [docs/ISSUE_TYPES.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/ISSUE_TYPES.md) | |
| - [docs/LABEL_STRATEGY.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/LABEL_STRATEGY.md) | |
| - [docs/LABELING.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/LABELING.md) | |
| - [docs/BRANCHING_STRATEGY.md](https://github.com/lightspeedwp/.github/blob/HEAD/docs/BRANCHING_STRATEGY.md) | |
| - [docs/ISSUE_FIELDS.md](./ISSUE_FIELDS.md) | |
| - [docs/ISSUE_TYPES.md](./ISSUE_TYPES.md) | |
| - [docs/LABEL_STRATEGY.md](./LABEL_STRATEGY.md) | |
| - [docs/LABELING.md](./LABELING.md) | |
| - [docs/BRANCHING_STRATEGY.md](./BRANCHING_STRATEGY.md) |
References
- Documentation and governance files in the
docs/directory must use UPPERCASE naming with underscores (e.g.,GOVERNANCE_REVISION_LOG.md).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6eac4fba2
ℹ️ 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".
| "config", | ||
| "migrate", | ||
| "qa", | ||
| "uat", | ||
| ]; |
There was a problem hiding this comment.
Keep existing labelled branch prefixes allowed
In this repo, .github/labeler.yml already maps ai/* and automation/* branches to canonical labels, and the AI ops/automation issue templates instruct contributors to use those prefixes. Because the new checks.yml Validation job runs this allow-list on every PR targeting develop, those existing ai/... and automation/... PR branches will now fail before they can merge. Add the supported prefixes here, or update the labeler/templates in the same change if those branch types are being retired.
Useful? React with 👍 / 👎.
Summary
Validation