Skip to content

feat: pass release notes to GitHub/GitLab release body#9581

Merged
mmaietta merged 12 commits intoelectron-userland:masterfrom
asamofal:feat/github-gitlab-release-notes
Mar 10, 2026
Merged

feat: pass release notes to GitHub/GitLab release body#9581
mmaietta merged 12 commits intoelectron-userland:masterfrom
asamofal:feat/github-gitlab-release-notes

Conversation

@asamofal
Copy link
Contributor

Closes #9235

Hey! This wires the existing releaseInfo infrastructure (which already resolves releaseNotes, releaseNotesFile, and auto-detects release-notes.md) through to the GitHub and GitLab publishers. Until now that data only ended up in auto-update YAML files — the actual release drafts were always created with an empty body.

What changed

  • Added releaseBody and releaseName to GithubOptions and GitlabOptions
  • PublishManager.createPublisher() now resolves release info from config and injects it into publisher options (with explicit values taking precedence)
  • GitHubPublisher.createRelease() passes body and name to the GitHub API
  • GitlabPublisher.createRelease() uses releaseBody as description instead of the hardcoded "Release vX.Y.Z"
  • Release body is truncated at 100k characters with a warning log if exceeded (addresses the size concern from the issue)
  • 4 unit tests covering body, name, omission, and truncation

Resolution order for release body

  1. Explicit releaseBody on publish config (new, takes precedence)
  2. releaseInfo.releaseNotes from config
  3. releaseInfo.releaseNotesFile read from disk
  4. release-notes.md in project root (auto-detected fallback)

Config examples

// inline
{ "releaseInfo": { "releaseNotes": "## Changes\n- stuff" } }

// file reference
{ "releaseInfo": { "releaseNotesFile": "CHANGELOG.md" } }

// just drop release-notes.md in project root — auto-detected

// or override directly on publish config
{ "publish": [{ "provider": "github", "releaseBody": "custom body" }] }

Also works via CLI dot-notation: electron-builder --publish always -c.releaseInfo.releaseNotesFile=notes.md

Tested

  • Unit tests pass
  • Verified end-to-end against a real GitHub repo — draft release created with correct body and name

The existing `releaseInfo` system (releaseNotes, releaseNotesFile,
auto-detection from release-notes.md) only wrote to auto-update
YAML files. The GitHub/GitLab APIs support release descriptions,
but the publishers never passed them.

- Add `releaseBody` and `releaseName` fields to `GithubOptions`
  and `GitlabOptions`
- Resolve release notes from `releaseInfo` config in
  `PublishManager.createPublisher()` and inject into publisher options
- Pass `body` and `name` in `GitHubPublisher.createRelease()`
- Use `releaseBody` as `description` in `GitlabPublisher.createRelease()`
- Truncate release body at 100k characters with a warning
- Add unit tests for body, name, and truncation behavior

Closes electron-userland#9235

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 1eda489

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
app-builder-lib Major
electron-publish Major
builder-util-runtime Minor
dmg-builder Major
electron-builder-squirrel-windows Major
electron-builder Major
electron-forge-maker-appimage Major
electron-forge-maker-nsis-web Major
electron-forge-maker-nsis Major
electron-forge-maker-snap Major
builder-util Major
electron-updater Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

asamofal and others added 2 commits February 12, 2026 14:24
Replace mutable `as any` casts with immutable spread pattern.
Resolve releaseBody and releaseName upfront, then spread into
the options object — no mutation, no leading semicolons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mmaietta
mmaietta previously approved these changes Feb 18, 2026
@mmaietta mmaietta merged commit b7df0bc into electron-userland:master Mar 10, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release notes for GitHub publisher

2 participants