Branch protection is a GitHub setting, not code. The repo admin (Owner role) must configure it manually after this PR merges.
- Go to Repo → Settings → Branches.
- Click Add branch protection rule (or edit the existing rule for
main). - Branch name pattern:
main - Tick Require a pull request before merging.
- Require approvals: 1
- Dismiss stale pull request approvals when new commits are pushed: ✓
- Tick Require status checks to pass before merging.
- Require branches to be up to date before merging: ✓
- Required status checks (after the first CI run completes, these become
selectable in the search box):
spec-lintjava-services (user-progress)java-services (catalog)java-services (chat)genaiweb-client
- Tick Do not allow bypassing the above settings.
- Click Create / Save changes.
Open a throwaway PR that intentionally breaks the spec (e.g., delete a required
field in api/openapi.yaml). Confirm:
spec-lintfails.- The PR cannot be merged.
Revert the change and confirm the same PR becomes mergeable after CI is green.