Skip to content

Generate GitHub release notes at build time - #966

Open
julianhille wants to merge 2 commits into
developfrom
issue/962-release-notes
Open

julianhille wants to merge 2 commits into
developfrom
issue/962-release-notes

Conversation

@julianhille

Copy link
Copy Markdown
Owner

Both release jobs created the GitHub release with softprops/action-gh-release and no body, so a release page showed only the tag and its files.

What changes

  • .github/scripts/release-notes.mjs builds the release body from:
    • the ## [<version>] section of the package changelog (CHANGELOG.md for native-v*, packages/wasm/CHANGELOG.md for wasm-v*), with relative links rewritten to blob/<tag>/ URLs so they resolve on the release page;
    • the pull requests merged since the previous tag with the same prefix, with the issues their descriptions close;
    • every contributor in that range, bots excluded;
    • first-time contributors, meaning contributors whose oldest commit on the default branch is part of the release;
    • a compare link to the previous tag.
  • The previous tag is the highest semantic version with the same prefix that precedes the released one, so a prerelease compares against the latest stable or prerelease before it. Documentation tags and the other package's tags are never picked. A first release of a prefix gets the changelog section alone.
  • Both release jobs run the script right after the version check, so a tag whose version has no changelog section fails before any release or npm publish exists, and pass the result as body_path to the existing release step. The jobs gain pull-requests: read.
  • npm run test:release-notes runs the script's node --test suite (22 tests over a fake API) and is part of the linting workflow.
  • The Release Tags sections of both development docs describe the generated notes and how to reproduce them locally for a published tag.
  • Changed entries in both changelogs.

Verified

Run locally against the real native-v7.1.0 and wasm-v1.1.0 tags; both produce the expected sections with 28 pull requests and their closed issues. The missing-section case exits with code 1 and a clear message.

Closes #962

Both release jobs created the GitHub release with no body. A new
.github/scripts/release-notes.mjs builds it from the changelog section of
the released version, the pull requests merged since the previous tag with
the same prefix and the issues they close, the contributors, the first-time
contributors, and a compare link. Relative changelog links are rewritten to
the repository at the tag so they resolve on the release page.

The release jobs run it right after the version check, so a tag whose
version has no changelog section fails before anything is published, and
pass the result as body_path to the existing release step. The script has
no dependencies and is covered by node --test, run by the linting workflow.
@read-the-docs-community

read-the-docs-community Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 MuhammaraJS | 🛠️ Build #35005485 | 📁 Comparing 106458b against latest (7e56040)

  🔍 Preview build  

4 files changed
± development.html
± api/type-declarations.html
± recipe/encryption.html
± recipe/reference.html

@read-the-docs-community

read-the-docs-community Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 MuhammaraJS WASM | 🛠️ Build #35005486 | 📁 Comparing 106458b against latest (7e56040)

  🔍 Preview build  

2 files changed
± browser-examples.html
± development.html

@julianhille

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

…notes

# Conflicts:
#	CHANGELOG.md
#	packages/wasm/CHANGELOG.md

Co-authored-by: julianhille <741067+julianhille@users.noreply.github.com>

Copilot AI commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged develop and resolved both changelog conflicts, preserving the entries from each branch. Merge commit: 106458b.

This branch has not been deployed

No deployments
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.

Generate release notes for GitHub releases at build time (changelog, PRs, contributors, first-time contributors)

2 participants