Skip to content

ci(hooks): Adopt the shared branch-name standard - #182

Merged
mpaulosky merged 2 commits into
mainfrom
chore/standard-branch-names
Sep 30, 2026
Merged

mpaulosky merged 2 commits into
mainfrom
chore/standard-branch-names

Conversation

@mpaulosky

@mpaulosky mpaulosky commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every repo now uses one branch-name rule. The eight repos with git hooks had five different rules between them.

Branch Use
feature/{issue}-{slug} New behaviour
fix/{issue}-{slug} A bug fix (new prefix)
hotfix/{issue}-{slug} An urgent fix
chore/{slug} Work without an issue

A slug is lowercase letters and digits in words joined by -; a chore/ slug starts with a letter, so it can't pass for an issue-linked name. squad/ and sprint/ are retired along with the squad setup.

  • .github/hooks/pre-push enforces the standard and names it in its error message.
  • .github/hooks/tests/pre-push.test.sh: each accepted prefix runs the gate, slugs with digits are accepted (chore/upgrade-net10, feature/8-oauth2-login), and squad/, sprint/, prefixes missing an issue number, uppercase slugs, and a chore/ slug starting with a digit are refused.
  • CLAUDE.md lists the standard.

The other repos adopt it through the repo-ci-baseline skill's git-hooks part.

Testing

  • pre-push.test.sh: 47 cases pass. Before the hook changes, 4 failed: fix/ was refused, and squad/, sprint/ and chore/7-cleanup were accepted.
  • shellcheck and markdownlint are clean, and the pre-push gate passed.

Refs #144

🤖 Generated with Claude Code

Every repo now uses one branch-name rule: feature/{issue}-{slug},
fix/{issue}-{slug} and hotfix/{issue}-{slug} name their issue, and
chore/{slug} is for work without one. squad/ and sprint/ are retired
along with the squad setup, and fix/ is new. The eight repos with hooks
had five different rules between them.

The pre-push hook enforces the standard, its tests cover each accepted
prefix and each retired or malformed name, and CLAUDE.md lists it.

Refs #144

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The hook still permits numeric slug segments despite requiring lowercase words.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates repository branch naming to the shared standard.

Changes:

  • Adds fix/ support and retires squad/ and sprint/.
  • Updates hook tests and contributor documentation.
File Description
CLAUDE.md Documents the new branch standard.
.github/​hooks/​pre-push Enforces accepted branch prefixes.
.github/​hooks/​tests/​pre-push.test.sh Tests accepted and rejected branch names.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/hooks/pre-push Outdated
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results Summary

483 tests  ±0   483 ✅ ±0   20s ⏱️ +5s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit 3490ff7. ± Comparison against base commit bbd63ce.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.40%. Comparing base (bbd63ce) to head (3490ff7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #182   +/-   ##
=======================================
  Coverage   85.40%   85.40%           
=======================================
  Files          77       77           
  Lines        1596     1596           
  Branches      150      150           
=======================================
  Hits         1363     1363           
  Misses        189      189           
  Partials       44       44           

chore/7-cleanup passed as a chore/ branch while looking like an
issue-linked one. A chore/ slug now starts with a letter. Digits stay
allowed in slugs (chore/upgrade-net10, feature/8-oauth2-login), and the
hook's comment describes slugs as lowercase letters and digits.
Addresses Copilot review on #182.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 03:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation, tests, and documentation consistently enforce the stated branch-name standard.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@mpaulosky
mpaulosky merged commit 2204d88 into main Sep 30, 2026
31 checks passed
@mpaulosky
mpaulosky deleted the chore/standard-branch-names branch September 30, 2026 03:59
mpaulosky added a commit that referenced this pull request Sep 30, 2026
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mpaulosky added a commit to mpaulosky/atelier-store that referenced this pull request Sep 30, 2026
* ci(hooks): Adopt the shared branch-name standard

Add fix/{issue}-{slug} and make a chore/ slug start with a letter, so it
can't pass for an issue-linked name. This is the standard every repo now
shares (mpaulosky/IssueTracker#182). Tests cover each accepted prefix and
each retired or malformed name.

Refs #86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(hooks): Test uppercase slugs apart from the chore/ digit rule

chore/7-Upper was refused for its leading digit, so it never tested the
lowercase rule on its own. feature/9-Upper and chore/tidy-Up do; a hook
that allowed uppercase fails both.

Refs #86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mpaulosky added a commit to mpaulosky/IssueManager that referenced this pull request Sep 30, 2026
## Summary

Part 2 of #227, porting mpaulosky/IssueTracker#182 and #186: the
branch-name standard every repo now shares.

| Pattern | Use |
| --- | --- |
| `feature/{issue}-{slug}` | New behaviour |
| `fix/{issue}-{slug}` | A bug fix |
| `hotfix/{issue}-{slug}` | An urgent fix |
| `chore/{slug}` | Work without an issue |

- **Issue numbers:** `feature/`, `fix/` and `hotfix/` now name their
issue. The hook used to accept any slug.
- **`chore/` slugs start with a letter,** so `chore/7-cleanup` can't
pass for an issue-linked name.
- The hook's message lists all four patterns.
- **`docs/CONTRIBUTING.md`** now lists the standard, and says to branch
from and open PRs against `main`. It used to say `develop`, a branch
this repo doesn't have.

## Testing

- New hook cases: each accepted prefix runs the gate (including slugs
with digits). Each retired or malformed name is refused: `squad/`,
`sprint/`, a prefix without an issue number, an uppercase letter in an
otherwise valid name (`feature/9-Upper`, `chore/tidy-Up`), and a
`chore/` slug starting with a digit.
- Against the old hook, four of the new cases fail: the three prefixes
without an issue number, and `chore/7-cleanup`. With the change: 48
passed, 0 failed.
- `shellcheck` is clean. This branch went through the new pre-commit
hook, which linted the staged `docs/CONTRIBUTING.md`, and through the
pre-push gate.

Refs #227

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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