Skip to content

feat(workflow): relax branch naming — guard main, allow any feature branch#74

Merged
Mpfk merged 3 commits into
mainfrom
issue/73
May 13, 2026
Merged

feat(workflow): relax branch naming — guard main, allow any feature branch#74
Mpfk merged 3 commits into
mainfrom
issue/73

Conversation

@Mpfk
Copy link
Copy Markdown
Owner

@Mpfk Mpfk commented May 13, 2026

Summary

  • Adds an explicit guard in workflow-policy.yml that rejects PRs opened directly from main (defense-in-depth alongside the local branch-guard hook)
  • Removes the issue/{N} branch-naming prescription from the 010-branch-guard.sh error message — any feature branch with a closing reference now works first-class
  • Adds two new bats tests: main branch source is rejected; any named feature branch with a closing reference passes

The linkage logic was already branch-agnostic (issue/{N} OR closing reference). This change fills the one gap (no main-branch guard) and updates messaging to match.

Test plan

  • bats tests/ — 65/65 pass
  • New test: PR from main branch fails even with closing reference
  • New test: any named feature branch with closing reference passes
  • Existing issue/{N} tests unchanged (backwards compatible)

Closes #73

🤖 Generated with Claude Code

@Mpfk Mpfk marked this pull request as ready for review May 13, 2026 19:13
@Mpfk Mpfk merged commit 42ce9a8 into main May 13, 2026
4 checks passed
@github-actions github-actions Bot deleted the issue/73 branch May 13, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(workflow): relax branch naming requirement in PR checks

1 participant