[repo] feat : add github branch policy checks - #8
Merged
Conversation
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.
Summary
branch policy / validatepull request check to enforce the allowed source-to-target branch flowdev-*,main-*, andmasterWhat this enforces in-repo
masteronly accepts pull requests from<module>/main-*<module>/main-*only accepts pull requests from the same module's<module>/dev-*What still needs repository admin setup
GitHub rulesets can require pull requests and block direct pushes on protected targets, but the source-branch restriction is enforced by the workflow in this PR.
After merging this PR, please add two repository rulesets in GitHub:
masterbranch policy / validate*/main-*branch policy / validateTesting
BASE_REF=master HEAD_REF=parser/main-gql-refactor python3 .github/scripts/validate_branch_policy.pyBASE_REF=parser/main-gql-refactor HEAD_REF=parser/dev-gql-query-root-followup python3 .github/scripts/validate_branch_policy.pyBASE_REF=parser/main-gql-refactor HEAD_REF=repo/dev-github-branch-policy python3 .github/scripts/validate_branch_policy.pygit diff --check -- .claude/CLAUDE.md .claude/learnings.md .github/scripts/validate_branch_policy.py .github/workflows/branch_policy.yml docs/development/github_branch_policy.mdChangelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Documentation entry for user-facing changes
Supersedes #7, which used a non-compliant
repo/dev-*head branch for amaster-targeted pull request.