Skip to content

[GitHub Actions] Fix empty changelog entries since v3.1.35 - #3800

Merged
adamziel merged 2 commits into
trunkfrom
explore-changelog-entries-in-release
Jul 1, 2026
Merged

[GitHub Actions] Fix empty changelog entries since v3.1.35#3800
adamziel merged 2 commits into
trunkfrom
explore-changelog-entries-in-release

Conversation

@mho22

@mho22 mho22 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Motivation for the change, related issues

Every release since v3.1.34 has been published with empty CHANGELOG.md sections and "No changelog entries for this release." in the GitHub release body, even though merged PRs exist in every window.

Follow-up on #3628. That PR tightened update-changelog.yml to an explicit per-job allowlist for least-privilege, granting contents: write and issues: read but not pull-requests: read.

packages/meta/src/changelog.ts calls octokit.issues.listForRepo and filters with pull.pull_request?.merged_at. The issues endpoint strips the pull_request field when the token lacks pull-requests permission, so every PR is dropped and the script writes only the version headline. The v3.1.34 run still had PullRequests: write from the default token; v3.1.39's run shows Contents: write, Issues: read, Metadata: read only.

Implementation details

Add pull-requests: read to the job-level permissions in .github/workflows/update-changelog.yml. Minimum scope the changelog script needs.

Testing Instructions (or ideally a Blueprint)

  1. Trigger the Release NPM packages workflow manually (or wait for the Monday cron).
  2. Wait for Update CHANGELOG.md to complete.
  3. Verify the new section in CHANGELOG.md contains the merged PRs grouped by section instead of being empty.
  4. Verify the GitHub release body posts those same entries instead of "No changelog entries for this release."
## Motivation for the change, related issues

Every release since v3.1.34 has been published with empty `CHANGELOG.md`
sections and "No changelog entries for this release." in the GitHub
release body, even though merged PRs exist in every window.

Follow-up on #3628. That PR tightened `update-changelog.yml` to an
explicit per-job allowlist for least-privilege, granting
`contents: write` and `issues: read` but not `pull-requests: read`.

`packages/meta/src/changelog.ts` calls `octokit.issues.listForRepo` and
filters with `pull.pull_request?.merged_at`. The issues endpoint strips
the `pull_request` field when the token lacks `pull-requests`
permission, so every PR is dropped and the script writes only the
version headline. The v3.1.34 run still had `PullRequests: write` from
the default token; v3.1.39's run shows `Contents: write`, `Issues: read`,
`Metadata: read` only.

## Implementation details

Add `pull-requests: read` to the job-level permissions in
`.github/workflows/update-changelog.yml`. Minimum scope the changelog
script needs.

## Testing Instructions (or ideally a Blueprint)

1. Trigger the `Release NPM packages` workflow manually (or wait for
   the Monday cron).
2. Wait for `Update CHANGELOG.md` to complete.
3. Verify the new section in `CHANGELOG.md` contains the merged PRs
   grouped by section instead of being empty.
4. Verify the GitHub release body posts those same entries instead of
   "No changelog entries for this release."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mho22
mho22 marked this pull request as ready for review June 15, 2026 15:26
@mho22
mho22 requested review from a team and zaerl June 15, 2026 15:26
@adamziel
adamziel merged commit c99bbf7 into trunk Jul 1, 2026
103 of 104 checks passed
@adamziel
adamziel deleted the explore-changelog-entries-in-release branch July 1, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants