feat: configurable branch prefixes/ticket pattern and failure fix guidelines (#26, #27, #29)#30
Open
oto-macenauer-absa wants to merge 1 commit into
Open
Conversation
…26, #27, #29) #26 branch-name: add `branch-prefixes` input to override just the allowed prefix list without rewriting the full regex. Takes precedence over `branch-pattern`, which remains the full-override escape hatch. #27 branch-name: add `branch-ticket-pattern` input to override the hardcoded numeric ticket regex, defaulting to current behavior for back-compat (supports schemes like feature/PROJ-123-...). #29 check.sh: append a "How to fix" section to the step summary when any check fails. Per-check remediation tips are built from the same configuration inputs the checks use, with concrete examples; passing runs are unchanged. Config values rendered as inert code spans. Adds tests for all three and documents the new inputs in README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| | `issue-reference-require-keyword` | `false` | Only keyword references count (`Fixes #123`, `Closes AB#12345`); bare `#123` / `AB#123` / URLs are rejected | | ||
| | `branch-pattern` | `^(feature|bugfix|hotfix|release|support|chore|docs|ci|dependabot)/[a-zA-Z0-9._-]+$` | Branch name regex | | ||
| | `branch-require-ticket` | `false` | Require ticket number after the branch prefix (`feature/123-user-login`) | | ||
| | `branch-prefixes` | *(empty)* | Comma-separated allowed branch prefixes, e.g. `feature,bugfix,hotfix`. When set, builds the branch pattern from this list and **takes precedence over `branch-pattern`** | |
Collaborator
There was a problem hiding this comment.
This is duplication - user can define his own setup in branch-pattern or keep empty to use default.
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
Implements three follow-up issues:
branch-prefixes: new input to override just the allowed branch-prefix list without rewriting the full regex. Comma-separated (e.g.feature,bugfix,hotfix), whitespace-trimmed. Builds^(p1|p2|...)/[a-zA-Z0-9._-]+$and takes precedence overbranch-pattern, which stays the full-override escape hatch.branch-ticket-pattern: new input to override the previously hardcoded ticket regex (^[^/]+/[0-9]+-). Defaults to the current numeric behavior for back-compat; supports schemes likefeature/PROJ-123-user-login.Precedence (#26)
branch-prefixes>branch-pattern. Setbranch-prefixesto tweak just the allowed prefixes; leave it empty and setbranch-patternto fully override the regex.Tests
tests/test_branch_name.sh: prefix override, precedence, whitespace trimming, custom + default ticket patterns.tests/test_check_orchestrator.sh: failure renders How to fix, lists failed-check tips, tips reflect configured inputs, passing runs omit the section.Docs
README input table updated with the three new/clarified inputs.
Closes #26
Closes #27
Closes #29
🤖 Generated with Claude Code