Skip to content

Commit 3e5e097

Browse files
committed
fixup: address Copilot PR review comments on branch-name validation
- Remove fragile bash snippet from create-feature-branch skill — the automation will be implemented in the Rust hooks runner (#1843) - Make T22 wording consistent with AC22: blocking is mandatory, not optional
1 parent 756284f commit 3e5e097

2 files changed

Lines changed: 15 additions & 22 deletions

File tree

.github/skills/dev/git-workflow/create-feature-branch/SKILL.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,13 @@ git checkout -b 42-add-peer-expiry-grace-period
8080

8181
## Branch Name Validation
8282

83-
Before creating a branch, verify that the issue number (if used) actually exists as an open issue
84-
spec in `docs/issues/open/`:
83+
Before creating a branch, verify that the issue number (if used) actually exists as an open
84+
issue in GitHub and has a matching spec in `docs/issues/open/`. This prevents accidentally
85+
referencing a wrong, closed, or non-existent issue number.
8586

86-
```bash
87-
# When creating a branch with an issue-number prefix, verify the spec exists:
88-
ISSUE_NUM=42
89-
if [ ! -d "docs/issues/open/${ISSUE_NUM}-*" ] && \
90-
[ ! -f "docs/issues/open/${ISSUE_NUM}-*" ]; then
91-
echo "WARNING: No open issue spec found for #${ISSUE_NUM} in docs/issues/open/."
92-
echo "Either use a chore/ prefix for untracked maintenance, or confirm the issue exists."
93-
fi
94-
```
95-
96-
This prevents accidentally referencing a wrong, closed, or non-existent issue number.
87+
> **Note**: The git hooks runner (issue #1843) will eventually automate this check. Until
88+
> then, verify manually by checking whether `docs/issues/open/` contains a spec file or
89+
> directory starting with the issue number.
9790
9891
## Complete Branch Lifecycle
9992

docs/issues/open/1843-migrate-git-hooks-scripts-from-bash-to-rust.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ Bash scripts are removed. **Phase 2** adds new capabilities on top of the alread
213213

214214
### Phase 2 — Enhancements (new features not present in the original Bash scripts)
215215

216-
| ID | Status | Task | Notes / Expected Output |
217-
| --- | ------ | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
218-
| T17 | TODO | Implement heartbeat emitter | Background ticker fires every 20–30s while a step is running; emits `heartbeat` NDJSON event (step name, elapsed seconds); extends T3 schema |
219-
| T18 | TODO | Implement staged file type analysis and smart step selection | `git diff --cached --name-only`; classify changeset (Markdown-only / docs-only / mixed); skip inapplicable steps; emit `step_skip` NDJSON events for skipped steps; extends T3 schema |
220-
| T19 | TODO | Implement pre-commit idempotency cache | Compute staged tree SHA (`git write-tree`) + step-config hash; check/write `.git/torrust-hooks/pre-commit-cache`; exit 0 immediately on cache hit |
221-
| T20 | TODO | Implement pre-push idempotency cache | Check/write per-commit-SHA records in `.git/torrust-hooks/pre-push-cache`; exit 0 immediately when all pushed commits have passing records |
222-
| T21 | TODO | Add Phase 2 unit and integration tests | Cover: heartbeat timing and event shape, staged file classification, smart step selection, cache read/write/invalidation, cache-and-smart-skip interaction |
223-
| T22 | TODO | Implement branch-name validation | When the branch uses an issue-number prefix (e.g. `42-some-description`), verify that `docs/issues/open/` contains a matching spec file or directory. If none found, emit a warning event and optionally block the commit. Prevents committing under a wrong, closed, or non-existent issue number. See `docs/issues/open/1774-automate-cleanup-completed-issues-skill-script.md` for context |
224-
| T23 | TODO | Verify Phase 2 quality gates | `linter all`, full test suite; all Phase 2 ACs met |
216+
| ID | Status | Task | Notes / Expected Output |
217+
| --- | ------ | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
218+
| T17 | TODO | Implement heartbeat emitter | Background ticker fires every 20–30s while a step is running; emits `heartbeat` NDJSON event (step name, elapsed seconds); extends T3 schema |
219+
| T18 | TODO | Implement staged file type analysis and smart step selection | `git diff --cached --name-only`; classify changeset (Markdown-only / docs-only / mixed); skip inapplicable steps; emit `step_skip` NDJSON events for skipped steps; extends T3 schema |
220+
| T19 | TODO | Implement pre-commit idempotency cache | Compute staged tree SHA (`git write-tree`) + step-config hash; check/write `.git/torrust-hooks/pre-commit-cache`; exit 0 immediately on cache hit |
221+
| T20 | TODO | Implement pre-push idempotency cache | Check/write per-commit-SHA records in `.git/torrust-hooks/pre-push-cache`; exit 0 immediately when all pushed commits have passing records |
222+
| T21 | TODO | Add Phase 2 unit and integration tests | Cover: heartbeat timing and event shape, staged file classification, smart step selection, cache read/write/invalidation, cache-and-smart-skip interaction |
223+
| T22 | TODO | Implement branch-name validation | When the branch uses an issue-number prefix (e.g. `42-some-description`), verify that `docs/issues/open/` contains a matching spec file or directory. If none found, block the commit with exit code 1. Prevents committing under a wrong, closed, or non-existent issue number. See `docs/issues/open/1774-automate-cleanup-completed-issues-skill-script.md` for context |
224+
| T23 | TODO | Verify Phase 2 quality gates | `linter all`, full test suite; all Phase 2 ACs met |
225225

226226
## Progress Tracking
227227

0 commit comments

Comments
 (0)