You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4063be9
Browse filesBrowse the repository at this point in the historyBrowse files
chore(changelog): collect release notes as one fragment per PR under changelog.d/ (#832)
* chore(changelog): collect release notes as one fragment per PR under changelog.d/
Every PR that changes what a release ships added its entry under
## [Unreleased] in CHANGELOG.md, at the same few lines, so any two PRs
open at once conflicted when the second merged (#811 vs #812/#813 on
2026-10-26, #812 vs #813 again on 2026-10-27). merge=union does not help:
GitHub's merge ignores custom merge drivers. A file per PR cannot
conflict with another PR's file (#821).
- internal/tools/changelogfrag: the fragment grammar, shared by the
release-time renderer and the PR check so they cannot disagree. One
canonical heading, one blank line, "- " bullets with two-space
continuations, a single final newline, nothing else; names
NNNN-slug.md. Also locates the [Unreleased] block and parses old-style
entries left under it.
- internal/tools/changelogrender: prints the section a release adds
(make changelog-preview), or with -write promotes it into CHANGELOG.md
below the [Unreleased] heading and its prose. Headings in canonical
order; old-style bullets first under a heading, then fragments by file
name; every bullet line copied byte for byte.
- scripts/promote-changelog.sh keeps its CLI, exit codes, idempotence and
hard failure on a missing anchor, and is a no-op when nothing was
collected. It runs the renderer, refuses to write unless the
renderer's file is byte-identical to the cut it assembles itself and
has old - legacy + rendered lines, then git rm's the fragments
(README.md stays). A malformed or untracked fragment stops it before
anything is written.
- changelog-promote.yml sets up Go and stages changelog.d with the
promote commit; trigger and push loop unchanged.
* chore(changelog): move the [Unreleased] entries into changelog.d/ fragments
The four entries under [Unreleased] (#765, #773, #770 under Bug Fixes;
the Go 1.27.3 bump, #799, under Security) become
changelog.d/0765-secrets-line-precheck-veto.md,
0773-redaction-overlapping-findings.md,
0770-redaction-cut-short-contract.md and 0799-build-go-1-27-3.md. Their
bullet lines, concatenated in that order, are byte-identical to the
section's (100 lines). [Unreleased] keeps its heading, which the
promotion anchors on, and holds one paragraph pointing at changelog.d/.
changelog.d/0821-changelog-fragments.md is this change's own note.
* chore(changelog): require a fragment at PR time; drop the after-merge check
changelogcheck now requires an added, well-formed fragment under
changelog.d/ when a PR changes what a release ships (same no-changelog
label and dependabot exemptions), and on every PR:
- fails an added or edited fragment the release could not render
(name, grammar, subdirectory, symlink), with the whole format in the
message;
- fails a PR that adds an entry-shaped line (heading, list item,
indented line) under [Unreleased] in CHANGELOG.md: write a fragment
instead. Prose there is warned, not failed, so the pointer paragraph
can be edited;
- fails a CHANGELOG.md whose [Unreleased] block the promotion would
refuse (no exact anchor, two anchors, no blank line where the section
goes, unparseable old-style entries).
The post-merge mode (EvaluatePostMerge, -pr-head) and the after-merge
job go: they caught a release carrying an open PR's entry into the
section it had just promoted, and a fragment is a file no release
moves. -base/-head stay: scripts/pr-checklist.sh passes them.
* docs(changelog): document fragments in CONTRIBUTING, RELEASE_PROCESS and the PR template
* test(changelog): make the renderer and check tests portable to Windows
windows-latest failed TestRun: Windows has no Unix permission bits, so
the 0640 the test set reads back as 0666. Assert the mode only off
Windows. The symlink cases now skip where Windows refuses to create a
symlink instead of failing, and the end-to-end check test hands each
subtest its own *testing.T: its change closures called the parent
test's Fatal from inside subtests, which only showed when one failed.
---------
Co-authored-by: union <union@example.invalid>
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,6 @@
9
9
## Checklist
10
10
11
11
-[ ]`make test` and `make build` pass
12
-
-[ ]**CHANGELOG:**an entry under `## [Unreleased]` in `CHANGELOG.md` if this changes the shipped binary — or the `no-changelog` label if nothing user-visible changed ([CONTRIBUTING](https://github.com/awslabs/ferret-scan/blob/main/CONTRIBUTING.md#changelog-entries)). The `CHANGELOG` check reports on this.
12
+
-[ ]**CHANGELOG:**a fragment `changelog.d/NNNN-slug.md` ([format](https://github.com/awslabs/ferret-scan/blob/main/changelog.d/README.md)) if this changes what a release ships — or the `no-changelog` label if nothing user-visible changed ([CONTRIBUTING](https://github.com/awslabs/ferret-scan/blob/main/CONTRIBUTING.md#changelog-entries)). Do not edit `## [Unreleased]` in `CHANGELOG.md`. The `CHANGELOG` check reports on this.
13
13
-[ ] Golden corpus regenerated and the diff explained, if detection, scoring, output or redaction changed
0 commit comments