Open hwhsu1231 opened 9 months ago
Hello, @pascalgn
I think the current alternative to appending PR number is to customize the commit message ourselves. For example, if I want to append a PR number to "pull-request-title" option of MERGE_COMMIT_MESSAGE
, I can write it like this:
{pullRequest.title} (#{pullRequest.number})
The full example may look like this:
- name: Automerge a PR with 'automerge' label
id: automerge
uses: "pascalgn/automerge-action@v0.16.2"
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_METHOD: 'squash'
MERGE_COMMIT_MESSAGE: '{pullRequest.title} (#{pullRequest.number})'
UPDATE_METHOD: 'rebase'
But I hope that this GitHub Action can append (#PR)
to the title of message by default. Can you fix this issue by appending (#PR)
for all the options of MERGE_COMMIT_MESSAGE
?
Feature Request
When merging a pull request on the GitHub web client, the suggested commit message (at least in the case of a squash commit, which we always use) will automatically include the number of the PR in parentheses, like so:
However, when merging using this GitHub Action, the first line of the commit message will look like this:
No matter what option of
MERGE_COMMIT_MESSAGE
I choose:automatic
pull-request-title
pull-request-description
pull-request-title-and-description
Therefore, I hope that it can append
(#NUM)
to the first line of the commit message for all possible options.Versions
Current latest release: v0.16.2