Skip to content

feat(publish): support glob and regex patterns for branch validation#138

Merged
Tecvan-fe merged 1 commit intomainfrom
feat/allow-branches-pattern-matching
Mar 19, 2026
Merged

feat(publish): support glob and regex patterns for branch validation#138
Tecvan-fe merged 1 commit intomainfrom
feat/allow-branches-pattern-matching

Conversation

@Tecvan-fe
Copy link
Collaborator

  • Add minimatch dependency for flexible pattern matching
  • Implement isBranchAllowed function supporting exact, glob, and regex patterns
  • Remove SKIP_BRANCH_CHECK environment variable
  • Remove hardcoded branch check in publish action
  • Add comprehensive test cases for pattern matching

This allows users to configure branch restrictions using patterns like:

  • Glob patterns: 'chore/*', 'release/**'
  • Regex patterns: '/^(main|master)$/'
  • Exact matches: 'main'

- Add minimatch dependency for flexible pattern matching
- Implement isBranchAllowed function supporting exact, glob, and regex patterns
- Remove SKIP_BRANCH_CHECK environment variable
- Remove hardcoded branch check in publish action
- Add comprehensive test cases for pattern matching

This allows users to configure branch restrictions using patterns like:
- Glob patterns: 'chore/*', 'release/**'
- Regex patterns: '/^(main|master)$/'
- Exact matches: 'main'

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Tecvan-fe Tecvan-fe added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit a9cb49e Mar 19, 2026
10 checks passed
@Tecvan-fe Tecvan-fe deleted the feat/allow-branches-pattern-matching branch March 19, 2026 11:36
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.

2 participants