feat: configurable branch ticket pattern and failure fix guidelines (#27, #29) - #30
Merged
oto-macenauer-absa merged 2 commits intoJul 15, 2026
Merged
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>
oto-macenauer-absa
requested review from
miroslavpojer and
tmikula-dev
as code owners
June 22, 2026 07:43
| | `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.
There was a problem hiding this comment.
I have removed the implementation until it's clean what should be the goal of the issue.
Remove the `branch-prefixes` implementation from this PR. To be handled in a separate PR if needed. Keeps branch-ticket-pattern (#27) and failure "How to fix" guidance (#29). - action.yml: drop branch-prefixes input and env mapping; branch-pattern is again the sole branch regex override - checks/branch_name.sh: remove prefix-list pattern builder - check.sh: branch-name remediation tip no longer references prefixes - tests: drop #26 cases; #27 ticket-pattern tests use default pattern - README: remove branch-prefixes row Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 two follow-up issues:
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.Tests
tests/test_branch_name.sh: 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 new/clarified inputs.
Closes #27
Closes #29
🤖 Generated with Claude Code