chore: require issue link on all PRs

- PR template: move "Closes #" to top as required field with explicit
  warning that PRs without a linked issue are closed without review
- CONTRIBUTING.md: add mandatory issue-first policy with clear rationale
- Add require-issue-link.yml workflow: checks PR body for a closing
  keyword (Closes/Fixes/Resolves #NNN) on open/edit/reopen/sync events;
  posts a comment and fails CI if no reference is found

PR body is bound to an env var before shell use (injection-safe).
The github-script step uses the API SDK, not shell interpolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-03 11:21:02 -04:00
parent ee7e6db428
commit 65abc1e685
3 changed files with 64 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
## Linked Issue
> **Required.** PRs without a linked issue are closed without review.
> Open an issue first if one doesn't exist: https://github.com/gsd-build/get-shit-done/issues/new/choose
Closes #
## What
<!-- One sentence: what does this PR do? -->
@@ -6,8 +13,6 @@
<!-- One sentence: why is this change needed? -->
Closes #<!-- issue number -->
## How
<!-- Brief description of the approach taken. Skip for trivial changes. -->
@@ -35,6 +40,7 @@ Closes #<!-- issue number -->
## Checklist
- [ ] Issue linked above (`Closes #NNN`) — **PR will be auto-closed if missing**
- [ ] Follows GSD style (no enterprise patterns, no filler)
- [ ] Updates CHANGELOG.md for user-facing changes
- [ ] No unnecessary dependencies added