Skip to content

feat: configurable branch ticket pattern and failure fix guidelines (#27, #29) - #30

Merged
oto-macenauer-absa merged 2 commits into
mainfrom
feature/branch-config-and-fix-guidelines
Jul 15, 2026
Merged

feat: configurable branch ticket pattern and failure fix guidelines (#27, #29)#30
oto-macenauer-absa merged 2 commits into
mainfrom
feature/branch-config-and-fix-guidelines

Conversation

@oto-macenauer-absa

@oto-macenauer-absa oto-macenauer-absa commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements two follow-up issues:

  • branch-name: make ticket pattern configurable #27branch-ticket-pattern: new input to override the previously hardcoded ticket regex (^[^/]+/[0-9]+-). Defaults to the current numeric behavior for back-compat; supports schemes like feature/PROJ-123-user-login.
  • Add fix guidelines and examples for failed checks to the run summary #29 — "How to fix" guidance: when any check fails, the step summary now appends a How to fix section with a per-check remediation tip and concrete examples. Tips are built from the same configuration inputs the checks use (title types, allowed target branches, required labels, branch pattern, ticket pattern, etc.), so guidance stays accurate as rules change. Passing runs are unchanged. Config values are rendered as inert code spans.

Note: branch-prefixes (#26) was removed from this PR and will be implemented separately if needed. branch-pattern remains the full-override escape hatch.

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.
  • Full suite green locally.

Docs

README input table updated with the new/clarified inputs.

Closes #27
Closes #29

🤖 Generated with Claude Code

…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>
Comment thread README.md Outdated
| `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`** |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplication - user can define his own setup in branch-pattern or keep empty to use default.

@oto-macenauer oto-macenauer Jul 15, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@oto-macenauer-absa oto-macenauer-absa changed the title feat: configurable branch prefixes/ticket pattern and failure fix guidelines (#26, #27, #29) feat: configurable branch ticket pattern and failure fix guidelines (#27, #29) Jul 15, 2026
@oto-macenauer-absa
oto-macenauer-absa merged commit 340aedf into main Jul 15, 2026
9 checks passed
@oto-macenauer-absa
oto-macenauer-absa deleted the feature/branch-config-and-fix-guidelines branch July 15, 2026 11:55
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.

Add fix guidelines and examples for failed checks to the run summary branch-name: make ticket pattern configurable

3 participants