[Sprint 3] Fix pre-push Gate 0 to allow sprint/* branches - #62
Conversation
…nt 3]
Sprint branches are merge targets in the workflow hierarchy:
squad/{issue}-{slug} → sprint/{N}-{slug} → dev → main (release only)
Gate 0 now accepts both patterns:
- squad/{issue}-{slug} → runs full gates (build + tests)
- sprint/{N}-{slug} → early-exit, skips feature gates
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the local pre-push hook’s Gate 0 so that sprint/{N}-{slug} branches are accepted and skip the remaining (feature) gates, while squad/{issue}-{slug} branches continue to run the full pre-push gate suite.
Changes:
- Expand Gate 0 branch naming rules to accept both
squad/...andsprint/...formats. - Early-exit the hook for valid
sprint/...branches to avoid running build/tests gates. - Update user-facing hook messages to document both valid branch formats.
🏛️ Aragorn — Architecture ReviewVerdict: ✅ APPROVE (conditional — see CI gap note) Gate Checklist
Code QualityThe diff is clean and surgically correct:
No security concerns. No architecture impact.
|
Gate: Aragorn ✅ APPROVE (pre-push hook fix ready to merge)## Summary
<!-- Describe what this PR does and why. Link the issue it closes. -->
Closes #<!-- issue number -->
## Type of Change
<!-- Check all that apply -->
- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
- [ ] ✨ Feature (non-breaking change that adds functionality)
- [ ] ♻️ Refactor (no behavior change, code cleanup/restructure)
- [ ] 🧪 Tests (new or updated tests only)
- [ ] 📝 Docs (README, XML docs, comments)
- [ ] ⚙️ Infra/CI (GitHub Actions, Aspire, NuGet, deployment)
- [ ] 🔒 Security (auth, permissions, secrets, headers)
- [ ] 💥 Breaking change (existing behavior changes)
## Domain Affected
<!-- Check all that apply — this determines which reviewers are required
-->
- [ ] 🏗️ Architecture / domain logic / CQRS → **Aragorn required**
- [ ] 🔧 Backend (handlers, repositories, API endpoints, MediatR) → **Sam
required**
- [ ] ⚛️ Frontend (Blazor components, Razor pages, CSS, JS) → **Legolas
required**
- [ ] 🧪 Unit / bUnit / integration tests → **Gimli required**
- [ ] 🧪 E2E / Playwright / Aspire integration tests → **Pippin
required**
- [ ] ⚙️ CI/CD / GitHub Actions / NuGet / Aspire AppHost → **Boromir
required**
- [ ] 🔒 Auth0 / authorization / security-relevant changes → **Gandalf
required**
- [ ] 📝 Docs / README / XML docs → **Frodo required**
## Self-Review Checklist
<!-- Complete before requesting review — incomplete PRs will be returned
-->
### Code Quality
- [ ] I ran `dotnet build MyBlog.slnx --configuration Release` — 0
errors, 0 warnings
- [ ] I ran `dotnet test MyBlog.slnx --configuration Release --no-build`
— all pass
- [ ] No TODO/FIXME left unless tracked in a follow-up issue (link it)
- [ ] No secrets, API keys, or credentials committed
### Architecture
- [ ] New handlers follow the `Command`/`Query`/`Handler`/`Validator`
naming conventions
- [ ] New handlers are `sealed`
- [ ] Domain layer has no references to `Web` or `Persistence.*`
projects
- [ ] `Result<T>` / `ResultErrorCode` used for expected failures (no
exception-driven control flow)
- [ ] DTOs are records in `Domain.DTOs`; Models are in `Domain.Models`
- [ ] No DTO types embedded in Model classes
### Tests
- [ ] New code has corresponding unit tests
- [ ] Integration tests use domain-specific collections
(`[Collection("XxxIntegration")]`)
- [ ] No test compares two `IssueDto.Empty` / `CommentDto.Empty`
instances directly
### Security (check if security-relevant)
- [ ] New endpoints have appropriate `RequireAuthorization` / policy
applied
- [ ] No `MarkupString` used with user-supplied content
- [ ] No user input reflected in MongoDB queries without sanitization
### Merge Readiness
- [ ] Branch is up to date with `main` (no merge conflicts)
- [ ] CI checks are green (do not request review while checks are
pending/failing)
- [ ] PR description is complete — reviewers should not have to ask what
this does
## Screenshots / Evidence
<!-- For UI changes: before/after screenshots. For fixes: evidence the
bug is resolved. -->
## Notes for Reviewers
<!-- Anything you want reviewers to pay special attention to, or context
they need. -->
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Closes #61
Fixes
.github/hooks/pre-pushGate 0 to acceptsprint/{N}-{slug}branches in addition tosquad/{issue}-{slug}branches.Sprint branches are merge targets — squad PRs land here before dev. They shouldn't run feature gates (build/tests).
Merge hierarchy
Changes
.github/hooks/pre-push— Gate 0 updated: sprint branches early-exit after naming check; squad branches run all gates as beforeAcceptance Criteria
git push origin sprint/*passes without--no-verify