git:pr-commit-message-preset
About 263 wordsLess than 1 minute
git:pr-commit-message-preset
Set pre-defined commit message for PR.
When users select Merge or Squash merge in the PR interface, this message will be automatically inserted into the commit message.
When to use it: use it when the merge commit message should follow a convention without manual typing - for example generating a normalized commit message from the PR's changes when the PR is created, so the user can adopt it directly on merge. A script cannot set this message before the merge, so git:pr-commit-message-preset folds it into a single built-in task.
Applicable Events
pull_requestpull_request.targetpull_request.updatepull_request.mergeablepull_request.approvedpull_request.changes_requested
Parameters
message
- type:
String - required:
true
Pre-set commit message for the PR.
Output Results
None
Configuration Example
.cnb.yml
main:
pull_request:
- stages:
- name: prepare pull request commit message
type: git:pr-commit-message-preset
options:
message: Pull request commit message set by CI.