Skip to content

frontmatter metadata passed to changelog formatters + github-changelog overrides - #2365

Merged
beeequeue merged 10 commits into
mainfrom
overrides
Nov 20, 2026
Merged

beeequeue merged 10 commits into
mainfrom
overrides

Conversation

@beeequeue

@beeequeue beeequeue commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

relevant to #438, #601
need to implement overrides for changelog-git as well before any can be considered resolved

now reads frontmatter metadata from the _ key into Changeset.metadata, which is passed into changelog formatter functions:

---
foo: minor
_:
  your: "metadata here"
  any: yaml
  number: 123
---

Something changed!
export default {
  getReleaseLine: (changeset, changeType, options) => {
    // { your: "metadata here", any: "yaml", number: 123 }
    console.log(changeset.metadata);
  },
};

this is also used to reimplement data overrides for the changelog-github formatter, so one can change/add authors, pr number, commit hash in the changelog.

this also removes the previous, undocumented support for inline overrides, along with their prefix (@author, #hash) handling

as i implemented it also realized that we should probably add support for this to git-changelog as well as github, but haven't done it in this PR.

@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for changesets ready!

Name Link
🔨 Latest commit 99fc118
🔍 Latest deploy log https://app.netlify.com/projects/changesets/deploys/6aff2f69f5643f02c6934743
😎 Deploy Preview https://deploy-preview-2365--changesets.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 99fc118

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

This PR includes changesets to release 16 packages
Name Type
@changesets/changelog-github Major
@changesets/apply-release-plan Minor
@changesets/assemble-release-plan Minor
@changesets/cli Minor
@changesets/parse Minor
@changesets/read Minor
@changesets/types Minor
@changesets/write Minor
@changesets/get-release-plan Patch
@changesets/release-utils Patch
@changesets/changelog-git Patch
@changesets/config Patch
@changesets/get-dependents-graph Patch
@changesets/git Patch
@changesets/pre Patch
@changesets/should-skip-package 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

@beeequeue beeequeue left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we should also drop the docs/ folder soon :^)

Comment thread packages/parse/src/frontmatter.ts Resolved
Comment on lines +7 to +9
- WHAT the change is
- WHY the change was made, if relevant to the consumer
- HOW a consumer should update their code, if they have to

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i copied and slightly modified these lines here, but didn't update them in the original locations as i'm not sure if i like it or not... would love some feedback

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the only thing i'd tweak for now is stronger emphasis that the preferred content should be consumer-centric

to me a changeset was always meant to purely describe the information relevant to the user and never call out implementations details. It's not to say that changesets should never include technical deep leverl details - if those are relevant to the readers (users) then those are OK. Everything is subjective but I like starting a review of a changeset with "is this content important to the consumer"?

@beeequeue beeequeue Nov 18, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i think we can leave it as is for now and do bigger improvements to the section in its own PR.
e.g. i still believe in writing changelogs like a story or explanation rather than keepachangelog's present tense

@beeequeue
beeequeue requested review from Andarist and bluwy and removed request for bluwy November 3, 2026 16:15
@beeequeue beeequeue changed the title Add frontmatter overrides and relevant documentation. add frontmatter overrides and relevant documentation Nov 3, 2026
Comment thread packages/changelog-github/src/index.ts Resolved
Comment thread packages/changelog-github/README.md Resolved
Comment thread packages/parse/src/frontmatter.test.ts Resolved
Comment thread packages/parse/src/frontmatter.ts Resolved
Comment thread packages/parse/src/index.test.ts Resolved
Comment thread packages/parse/src/frontmatter.test.ts Resolved

@trueberryless trueberryless 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.

Thanks for the awesome work 🥳

Overall, this looks solid to me. Left some comments for improvements.

Comment thread .changeset/frontmatter-overrides.md Resolved
Comment thread packages/changelog-github/src/index.ts Resolved
Comment thread packages/parse/src/frontmatter.ts Resolved
Comment thread packages/parse/src/frontmatter.ts Resolved
Comment thread docs/guide/writing-changesets.md Resolved
Comment thread packages/changelog-github/README.md Resolved
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.54%. Comparing base (9a035ec) to head (99fc118).

Files with missing lines Patch % Lines
packages/changelog-github/src/index.ts 77.77% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2365      +/-   ##
==========================================
+ Coverage   87.47%   87.54%   +0.06%     
==========================================
  Files          78       81       +3     
  Lines        2971     2986      +15     
  Branches      851      853       +2     
==========================================
+ Hits         2599     2614      +15     
+ Misses        337      336       -1     
- Partials       35       36       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@beeequeue
beeequeue requested a review from Andarist November 14, 2026 11:01
@beeequeue beeequeue changed the title add frontmatter overrides and relevant documentation frontmatter metadata passed to changelog formatters + github-changelog overrides Nov 14, 2026
@beeequeue

Copy link
Copy Markdown
Member Author

i think we're still missing a test that actually checks that metadata in a changeset is passed to a custom changelog function

Comment thread .changeset/frontmatter-overrides.md Resolved
Comment thread packages/changelog-github/src/index.ts Resolved
Comment on lines +7 to +9
- WHAT the change is
- WHY the change was made, if relevant to the consumer
- HOW a consumer should update their code, if they have to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the only thing i'd tweak for now is stronger emphasis that the preferred content should be consumer-centric

to me a changeset was always meant to purely describe the information relevant to the user and never call out implementations details. It's not to say that changesets should never include technical deep leverl details - if those are relevant to the readers (users) then those are OK. Everything is subjective but I like starting a review of a changeset with "is this content important to the consumer"?

Comment thread packages/changelog-github/src/utils.ts Resolved
Comment thread packages/parse/src/frontmatter.ts Resolved
Comment thread packages/parse/src/frontmatter.ts Resolved
Comment thread packages/changelog-github/src/index.ts Resolved
Comment thread packages/parse/src/index.ts Resolved
@beeequeue
beeequeue added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 1ed9edd Nov 20, 2026
22 checks passed
@beeequeue
beeequeue deleted the overrides branch November 20, 2026 19:26
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.

4 participants