check-news.yml
Enforce a changelog entry on each pull request (wraps UCD-SERG/changelog-check-action). Supports both direct changelog edits (NEWS.md/CHANGELOG.md) and fragment-based changelog files (news.d/ or changelog.d/ files named <slug>.<category>.md). R package repos can use the assemble-news composite action (uses: Morrison-Lab/gha/.github/actions/assemble-news@v2) at release time to collate news.d/ fragments into NEWS.md under section headings.
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
changelog |
string | 'NEWS.md' |
Path to the changelog file to check. |
no-changelog-label |
string | 'no-changelog' |
PR label that skips this workflow’s own changelog check. Set to an empty string to disable this workflow’s escape hatch. The wrapped UCD-SERG/changelog-check-action separately, unconditionally recognizes its own hardcoded no changelog (space) label - not controlled by this input. |
Permissions
Read-only: contents: read plus issues: read and pull-requests: read (the live-label read behind the skip-label exemption; GitHub checks a PR’s label read against the pull-requests permission). A caller with no explicit permissions: block needs nothing; a caller that pins the calling job’s permissions must include issues: read and pull-requests: read alongside contents: read.
Example
# Copy to .github/workflows/news.yaml in your repo.
name: Check NEWS.md Changelog
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
jobs:
check:
uses: Morrison-Lab/gha/.github/workflows/check-news.yml@v2
# with:
# changelog: NEWS.md
# no-changelog-label: no-changelogSee examples/check-news.yml for the full caller stub.