automerge-action icon indicating copy to clipboard operation
automerge-action copied to clipboard

Add option to change title of merge

Open VildeBrobacke opened this issue 5 years ago • 7 comments

Currently when automerging a PR that only has one commit, the title of the merge will be the title of that commit. While automerging a PR that has multiple commits the title of the merge will be the same as the title of the PR.

Using MERGE_COMMIT_MESSAGE the merge description can be changed, either having this also change the title of the merge, or having something like MERGE_COMMIT_TITLE would be great for consistency.

VildeBrobacke avatar Jun 05 '20 14:06 VildeBrobacke

Currently when automerging a PR that only has one commit, the title of the merge will be the title of that commit. While automerging a PR that has multiple commits the title of the merge will be the same as the title of the PR.

Which behaviour do you not like? The one with one commit or the one with multiple commits? Or rather, what's the behaviour you want? The MERGE_COMMIT_MESSAGE option will change title and description (title is always the first line of the commit message)

pascalgn avatar Jun 05 '20 18:06 pascalgn

The behavior I would want is for the title to always be the title of the PR regardless of the amount of commits, and using MERGE_COMMIT_TITLE does not seem to let me do this.

On a PR with only 1 commit; MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n{pullRequest.body}" gives me this result: image

Where instead I would expect this result: image

VildeBrobacke avatar Jun 08 '20 09:06 VildeBrobacke

@pascalgn Bump

VildeBrobacke avatar Jun 16 '20 14:06 VildeBrobacke

Sorry for not getting back to you sooner! This should actually be working already, did you try setting MERGE_COMMIT_MESSAGE: "pull-request-title"?

pascalgn avatar Jun 19 '20 19:06 pascalgn

It does not seem to be giving the result I'm after image

From these results it seems to me that MERGE_COMMIT_MESSAGE doesn't affect the actual title but rather only the description of the merge message

VildeBrobacke avatar Jun 22 '20 08:06 VildeBrobacke

@pascalgn bump

VildeBrobacke avatar Aug 19 '20 13:08 VildeBrobacke

I don't use this feature myself, so I won't have time to look into this. But if you create a PR, I will look at it as soon as possible! 🙏

pascalgn avatar Mar 24 '22 23:03 pascalgn