changelog
Checks that a pull request has its changelog line, and prints a version's notes.
pnpm dist changelog check [--pr <number> --base <ref> --repo <owner/name>]
pnpm dist changelog hold [--base <branch>]
pnpm dist changelog notes [version]
See Changelogs for how they are kept.
check
Fails a pull request that has not added a line to CHANGELOG.md linking itself,
under the top section — the version being worked on. In a distribution only a
pull request that changes policies/ needs one.
CHANGELOG.md has no line linking this pull request.
Add a line to CHANGELOG.md, under 1.7.0, that links this pull request:
- What this changes, for someone using it ([#42](https://github.com/fairgarden/id/pull/42))
Or label the pull request "skip changelog" if it changes nothing anyone would read about.
It also refuses a branch whose version is already released — tagged — since anything merged then would be noted under a version already out; it passes again once the branch is up to date with main's next version. The pull request that starts a version needs no line.
It runs in the changelog.yml workflow that workflows
writes, and reads the pull request from GitHub Actions: its number, what it
merges into, its labels. Elsewhere, name them.
| Option | Meaning |
|---|---|
--pr <number> | the pull request |
--base <ref> | what it merges into, such as origin/main |
--repo <owner/name> | the repository its link names |
hold
Holds open pull requests until the next version starts: the publish workflow's
release job runs it once it has tagged. Each pull request into the branch just
released — GITHUB_REF_NAME, or --base — has its latest changelog check run
again, waiting for one still going to finish first. That run finds the version
the branch is at released, and refuses it. Needs gh, and a token that may run
workflows again (actions: write).
#12 held
#15 held, its first check will see the release
notes
Prints a version's section, without its heading — the version in package.json
unless one is named, spelled either way for a distribution. The publish workflow
makes it the GitHub release's notes, and uses GitHub's own when there is none.