Skip to content

Assemble release notes from changelog.d fragments - #34

Merged
norman-abramovitz merged 4 commits into
masterfrom
adopt-changelog-fragments
Jul 28, 2026
Merged

Assemble release notes from changelog.d fragments#34
norman-abramovitz merged 4 commits into
masterfrom
adopt-changelog-fragments

Conversation

@norman-abramovitz

Copy link
Copy Markdown
Contributor

Adopts the two fixes just made upstream in the shared make snippets. No
.go, go.mod or go.sum changes
— build, release, and CI only.

Release notes no longer need hand-editing

Cutting v1.19.1 required extracting a CHANGELOG section to a temp file by
hand: publish posts a notes file whole, and by then the changelog held two
releases, so publishing it would have repeated v1.19.0's notes inside the
v1.19.1 release. One file cannot be both a durable history and the payload for
a single release.

Each PR now drops a fragment in changelog.d/. At release time make tag
embeds the assembled notes in the annotated tag body and make publish reads
them back with --notes-from-tag. This is the mechanism already used in
cloudfoundry/stratos, so there is one convention rather than two.

CHANGELOG.md is removed rather than kept alongside changelog.d/ — keeping
both is the two-mechanism problem this is meant to solve. Every line of it is
preserved verbatim in the
v1.19.0
and v1.19.1
release bodies; that was verified line by line before deleting.

make changelog-check joins the quality gates, so a stub or malformed
fragment fails the PR rather than silently dropping out of the notes at
release time.

CI installs gitleaks from the snippet

The v1.19.0 CI run failed because make audit needs gitleaks, which is a
system package the snippet could not install — so the workflow carried an
inlined download step. That step now lives upstream as make install-gitleaks
(pinned release, verified against the project's published checksums), so every
repo vendoring the snippet gets it instead of reinventing it.

The audit job keeps fetch-depth: 0: gitleaks detect reads git history, and
at depth 1 it scans one commit and reports clean whatever the history holds.

Verification

Locally: make build test-race check audit all pass, changelog-check passes,
and a DRYRUN=yes tag shows the assembled fragment text going into the tag
body. Vendored mk/ files are byte-identical to GNUMakefile-Snippets main.

This PR is also the first exercise of install-gitleaks on Linux — it was
only verified on macOS upstream, and the audit job is what proves it.

Picks up changelog.mk plus the two upstream fixes: TAG_NOTES_CMD in
go-release.mk, and install-gitleaks in security.mk. Vendored copies are
byte-identical to GNUMakefile-Snippets main.
Cutting v1.19.1 needed the CHANGELOG section extracted to a temp file by
hand, because publish posts a notes file whole and the changelog held two
releases by then. Fragments remove that step: make tag embeds the
assembled notes in the tag body and publish reads them back.

CHANGELOG.md is removed rather than kept alongside changelog.d, so there
is one mechanism instead of two. Every line of it is preserved verbatim
in the v1.19.0 and v1.19.1 GitHub releases, which was checked before
deleting.
Replaces the download step inlined in the workflow with
make install-gitleaks, which is pinned and checksum-verified upstream, so
other repos vendoring the snippet do not each reinvent it.

Adds make changelog-check to the quality gates: a stub or malformed
fragment now fails the PR rather than silently dropping out of the notes
at release time.
The gitleaks install step was added without accounting for the env block
already on the audit step, producing two env keys and a workflow that
failed to parse - zero jobs ran.

PATH is extended through GITHUB_PATH now. The previous
PATH: ${{ env.PATH }} was self-referential and would not have worked
even had the file parsed.

Verified with actionlint, which catches both; plain YAML parsing does
not, since duplicate keys are valid YAML.
@norman-abramovitz
norman-abramovitz merged commit 0e0557f into master Jul 28, 2026
6 checks passed
@norman-abramovitz
norman-abramovitz deleted the adopt-changelog-fragments branch July 29, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant