Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@

---

- [ ] Changelog fragment added — `changelog.d/<slug>.<breaking|added|changed|fixed>.md`
(see `changelog.d/README.md`) — or this change is internal-only /
- [ ] Changelog fragment added or a pending one edited —
`changelog.d/<slug>.<breaking|added|changed|fixed>.md` (see
`changelog.d/README.md`) — or this change is internal-only /
test-only / docs-only (apply the `no-changelog` label).

<!-- AI-assisted contributions are welcome and normal here — see
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ jobs:
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
changed=$(git diff --name-only "$base...$head")
# Fragments must be *added* — a deleted or renamed fragment also
# Fragments must be added or edited: a change may land its entry by
# editing a pending fragment. A deleted or renamed fragment also
# appears in --name-only and must not satisfy the check.
added=$(git diff --name-only --diff-filter=A "$base...$head")
added_or_edited=$(git diff --name-only --diff-filter=AM "$base...$head")
echo "Changed files:"
echo "$changed"
if echo "$changed" | grep -q '^src/' \
&& ! echo "$added" | grep -Eq '^changelog\.d/[^/]+\.(breaking|added|changed|fixed)\.md$' \
&& ! echo "$added_or_edited" | grep -Eq '^changelog\.d/[^/]+\.(breaking|added|changed|fixed)\.md$' \
&& ! echo "$changed" | grep -qx 'CHANGELOG.md'; then
echo "::error::This PR touches src/ but carries no changelog entry. Add a fragment changelog.d/<slug>.<breaking|added|changed|fixed>.md (see CONTRIBUTING.md), or apply the 'no-changelog' label if the change is internal-only."
echo "::error::This PR touches src/ but carries no changelog entry. Add a fragment changelog.d/<slug>.<breaking|added|changed|fixed>.md or edit a pending one (see CONTRIBUTING.md), or apply the 'no-changelog' label if the change is internal-only."
exit 1
fi
echo "OK"
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ never do.
silently stranding an entry.
- **The fragment lands with the change** — same commit, or at least the same
PR. This binds direct pushes to `main` just as much as PRs. On PRs, CI
enforces it softly: touching `src/` without adding a fragment (or editing
`CHANGELOG.md`) fails the `changelog` check unless the `no-changelog`
label is applied.
enforces it softly: touching `src/` fails the `changelog` check unless the
PR adds a fragment, edits a pending one or edits `CHANGELOG.md`, or carries
the `no-changelog` label.
- **What needs an entry:** anything a module developer, host, or downstream
consumer would notice — behavior, event/trace surfaces, tool namespacing,
config schema, agent state machine, public exports, defaults. Internal
Expand Down
Loading