Skip to content

feat(core,github-action,github): support custom changelog preamble#187

Merged
dangreen merged 1 commit into
mainfrom
feat/changelog-preamble
Jul 14, 2026
Merged

feat(core,github-action,github): support custom changelog preamble#187
dangreen merged 1 commit into
mainfrom
feat/changelog-preamble

Conversation

@dangreen

Copy link
Copy Markdown
Member

Adds support for a custom changelog preamble — arbitrary markdown inserted into the changelog right after the version header, before the generated sections.

Usage

Config / JS API — a new bump.preamble option; per package in a monorepo via bump.byProject[name].preamble.

Pull request comment!simple-release/set-preamble followed by the markdown. In a monorepo, pass the full package name (in backticks so GitHub keeps it as text) to target one package:

!simple-release/set-preamble `@your-org/core`

## Core changes

- New plugin system

Multiple per-package comments coexist (newest per package wins); one comment without a name sets a global preamble for the whole release. The command honors the same owner/member/collaborator restriction as set-options.

Notes

  • Non-breaking. Rendering reuses the existing preamblePartialProject.bump just started populating the changelog context's preamble. Per-package targeting reuses bump.byProject (keyed by full package name).
  • The GitHub Action itself needs no code change; the feature ships when the action bumps its @simple-release/github-action dependency.
  • Tests: core rendering (global + per-package), the comment parser (name / backticks / empty / untrusted author), and suppression of the "Version bump without any changes." fallback when a preamble is set.

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29332536178

Coverage decreased (-0.03%) to 63.11%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: 43 uncovered changes across 1 file (23 of 66 lines covered, 34.85%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
packages/github-action/src/releaser.ts 43 0 0.0%
Total (3 files) 66 23 34.85%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1046
Covered Lines: 719
Line Coverage: 68.74%
Relevant Branches: 594
Covered Branches: 316
Branch Coverage: 53.2%
Branches in Coverage %: Yes
Coverage Strength: 10.76 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end support for a user-defined changelog “preamble” (markdown inserted immediately after the version header), configurable via JS/config (bump.preamble, bump.byProject[name].preamble) and via a new PR comment command (!simple-release/set-preamble).

Changes:

  • Extend core bump options and changelog template context to carry a preamble, and suppress the “Version bump without any changes.” fallback when a preamble exists.
  • Add GitHub Action support for parsing !simple-release/set-preamble comments (global + per-package) and applying them to bump options.
  • Update docs/cheatsheet and add tests for preamble rendering and comment parsing.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/src/content/docs/js-api/releaser.mdx Documents new bump.preamble option (and monorepo usage).
website/src/content/docs/github-action/release-automation.mdx Documents !simple-release/set-preamble usage for PR comments.
skills/setup-simple-release-action/SKILL.md Updates setup guidance to mention the new comment command.
packages/github/src/cheatsheet.ts Adds cheatsheet section for set-preamble and updates restrictions/notes wording.
packages/github-action/src/releaser.ts Scans PR comments for preambles and merges them into bump options.
packages/github-action/src/conditions.ts Triggers comment-driven runs for both set-options and set-preamble.
packages/github-action/src/comment.ts Adds set-preamble command parsing and exports COMMANDS.
packages/github-action/src/comment.spec.ts Adds vitest coverage for set-preamble parsing behavior.
packages/core/src/project/project.types.ts Adds preamble?: string to ProjectBumpOptions.
packages/core/src/project/project.ts Passes preamble into changelog template context.
packages/core/src/project/packageJsonMonorepo.spec.ts Tests global vs per-project preamble behavior in monorepos.
packages/core/src/project/packageJson.spec.ts Tests insertion position and placeholder suppression for preamble.
packages/core/src/project/monorepo.types.ts Allows preamble in byProject bump options typing.
packages/core/src/change-log.ts Suppresses “no changes” placeholder when a preamble exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/github-action/src/comment.ts
Comment thread website/src/content/docs/js-api/releaser.mdx Outdated
Comment thread packages/github-action/src/conditions.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Comment thread packages/github-action/src/releaser.ts Outdated
Comment thread packages/github-action/src/conditions.ts Outdated
Comment thread packages/github-action/src/comment.ts
Comment thread packages/github-action/src/comment.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread packages/github-action/src/comment.ts Outdated
Comment thread packages/github/src/cheatsheet.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread packages/github-action/src/releaser.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread packages/github-action/src/comment.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread packages/core/src/change-log.ts
Comment thread packages/github/src/cheatsheet.ts Outdated
Comment thread packages/github-action/src/releaser.ts
Inject custom markdown into the changelog after the version header via a new
bump.preamble option (config or JS API), or a !simple-release/set-preamble
pull request comment — globally or per package through byProject.
@dangreen
dangreen force-pushed the feat/changelog-preamble branch from b7bcd80 to b1fbd58 Compare July 14, 2026 12:40
@dangreen
dangreen merged commit 7ee2d19 into main Jul 14, 2026
6 checks passed
@dangreen
dangreen deleted the feat/changelog-preamble branch July 14, 2026 13:20
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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.

3 participants