Skip to content

Add changenotes.mts assemble command to move changenotes to CHANGELOG.md - #4155

Open
mario-campos wants to merge 12 commits into
mainfrom
mario-campos/merge-changenotes
Open

mario-campos wants to merge 12 commits into
mainfrom
mario-campos/merge-changenotes

Conversation

@mario-campos

@mario-campos mario-campos commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

This PR extends the pr-checks/changenotes.mts functionality by adding an assemble command that will be used to "flush" (or empty the contents of unreleased-change-notes) to the [UNRELEASED] section of CHANGELOG.md.

This PR also replaces the use of constants 0 and 1 for process exit codes with the ExitCode type from @actions/core.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • N/A

Products:

  • N/A

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • N/A

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Changing `NO_CHANGES_STR` to just be the text will make it easier to insert/use. To not break anything, I added the deleted newlines to the locations where `NO_CHANGES_STR` was used.
@mario-campos
mario-campos requested a review from a team as a code owner September 18, 2026 14:42
Copilot AI balanced review requested due to automatic review settings September 18, 2026 14:42
@github-actions github-actions Bot added the size/M Should be of average difficulty to review label Sep 18, 2026

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.

Copilot review overview

🟡 Changes recommended

Empty or invalid inputs can mutate the changelog, and deletion failures can leave a partially completed flush.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Adds a development command to move unreleased changenotes into CHANGELOG.md.

Changes:

  • Adds the changenotes.mts flush command.
  • Adds changelog insertion helpers and unit tests.
  • Normalizes the default no-changes placeholder.
File Description
pr-checks/​changenotes.mts Implements changenote flushing and deletion.
pr-checks/​changelog.ts Adds unreleased-section insertion logic.
pr-checks/​changelog.test.ts Tests header parsing and insertion behavior.
pr-checks/​bundle-changelog.test.ts Updates assertions for the normalized placeholder.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pr-checks/changelog.ts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
@mario-campos
mario-campos force-pushed the mario-campos/merge-changenotes branch from 36485ce to ff33914 Compare September 18, 2026 16:05

@mbg mbg left a comment

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.

Thanks for preparing this! I think functionally this looks fine, but as always, I have had a few comments and suggestions on the details of this initial implementation.

Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changenotes.mts Outdated
Comment thread pr-checks/changelog.ts Outdated
Comment thread pr-checks/changelog.ts Outdated
Comment thread pr-checks/changelog.ts Outdated
@mario-campos
mario-campos force-pushed the mario-campos/merge-changenotes branch from ff33914 to 977b29b Compare September 18, 2026 18:47
@mario-campos mario-campos changed the title Add changenotes.mts flush command to move changenotes to CHANGELOG.md Add changenotes.mts assemble command to move changenotes to CHANGELOG.md Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Should be of average difficulty to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants