Skip to content

Add customizable commitMessage config option for change and publish#1314

Merged
ecraig12345 merged 6 commits into
mainfrom
copilot/add-repooptions-commitmessage
Jul 8, 2026
Merged

Add customizable commitMessage config option for change and publish#1314
ecraig12345 merged 6 commits into
mainfrom
copilot/add-repooptions-commitmessage

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Adds a commitMessage config function so the git commit message for change and publish can be customized, including dynamic content like version numbers via the provided context. (Previously only publish could be customized via the --message CLI arg with a static string.)

Changes

  • RepoOptions.commitMessage: new optional function (options, packageInfos, bumpInfo?) => string | Promise<string>. bumpInfo (and post-bump packageInfos) are only supplied for publish.
  • change: resolves commitMessage for the change-files commit; defaults to 'Change files'.
  • publish: commit message precedence is now --message/message config → commitMessage() → default 'applying package updates'. The default was moved from cli.ts into publish() so it no longer masks commitMessage.
  • Docs: added to configuration reference and CI integration guide.

Example

// beachball.config.js
module.exports = {
  commitMessage: (options, packageInfos, bumpInfo) =>
    bumpInfo
      ? `Release ${Object.keys(bumpInfo.modifiedPackages).length} packages [skip ci]`
      : 'Add change files',
};

Copilot AI changed the title [WIP] Add customizable check-in message for publish in config Add customizable commitMessage config option for change and publish Jul 8, 2026
Copilot AI requested a review from ecraig12345 July 8, 2026 04:46
Comment thread packages/beachball/src/types/BeachballOptions.ts Outdated

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

@copilot and also look at the previous comment

Comment thread packages/beachball/src/__e2e__/publishGit.test.ts Outdated
Comment thread packages/beachball/src/commands/publish.ts Outdated
@ecraig12345 ecraig12345 linked an issue Jul 8, 2026 that may be closed by this pull request
Copilot AI requested a review from ecraig12345 July 8, 2026 05:28
@ecraig12345 ecraig12345 marked this pull request as ready for review July 8, 2026 05:31
Comment thread packages/beachball/src/types/BeachballOptions.ts Outdated
@ecraig12345 ecraig12345 merged commit 3bdbe82 into main Jul 8, 2026
11 checks passed
@ecraig12345 ecraig12345 deleted the copilot/add-repooptions-commitmessage branch July 8, 2026 05:41
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.

Feature: check-in message for publish should be customizable in config Personalize change files commit message

2 participants