Why
A pull request title and body are written for humans. A commit subject is written for git log. When a repository squash-merges, the PR number is already sitting in the commit subject as (#123) and we throw it away.
github/copilot-release-notes is built entirely on this — it walks merged PRs rather than commits — and it is the main reason its output reads well with zero configuration.
Scope
- Parse PR and issue references out of commit subjects and bodies (
(#123), Closes #45, Fixes #45).
- When a GitHub remote is present and credentials are available, resolve those references to title, body, labels, and author.
- Feed the resolved metadata into the prompt as an additional labelled, untrusted block.
- Degrade silently. No remote, no credentials, no network, a non-GitHub host, or a rate limit must all fall back to commit-only behaviour without failing the run. This tool must keep working on a private repo with no token.
Prefer the user's existing gh CLI when present, falling back to a plain token from the environment. Do not add a hard dependency on either.
Acceptance criteria
Files
src/git.ts, new src/forge.ts (or similar), src/prompts/builder.ts, src/config.ts, docs/configuration.md
Notes
Keep the forge layer behind an interface. GitLab and Bitbucket are the obvious follow-ups and should not require reworking this.
Why
A pull request title and body are written for humans. A commit subject is written for
git log. When a repository squash-merges, the PR number is already sitting in the commit subject as(#123)and we throw it away.github/copilot-release-notesis built entirely on this — it walks merged PRs rather than commits — and it is the main reason its output reads well with zero configuration.Scope
(#123),Closes #45,Fixes #45).Prefer the user's existing
ghCLI when present, falling back to a plain token from the environment. Do not add a hard dependency on either.Acceptance criteria
(#N),Closes/Fixes/Resolves #N, and full URLsghauth orGITHUB_TOKEN; neither is requiredFiles
src/git.ts, newsrc/forge.ts(or similar),src/prompts/builder.ts,src/config.ts,docs/configuration.mdNotes
Keep the forge layer behind an interface. GitLab and Bitbucket are the obvious follow-ups and should not require reworking this.