When you merge pull request, bitbucket by default generate Merge commit message.
User can edit this message in "Merge pull request" dialog.
We are looking for possibility to have another merge commit message by default. Ideally, we want to take Pull request title and put it as merge commit message.
Is it possible to do via bitbucket plugin sdk?
I would like to be able to generate a template for only merge commits. The "Yet Another Commit Checker" only allows all commit messages to adhere to a specific regex expression, unless you've selected the merge commit to be excluded, specifically. I need only the merge commit to be included, and everything else excluded. Previous versions of BitBucket had a very simple, and easy to parse, via our own automation (--oneline), merge commit message which included the Pull Request, branch, and destination. Super simple. We do not want multiline, as it's too verbose, which doesn't bring any actual meaning to a merge commit, and makes any custom parsing more difficult. What happened to wonderful simplicity of this. Really, even if we could template only our merge commits, this would solve all of our problems. Is there any effort to implement something like that?
Hi @Evgen Temchenko you can't configure a custom default message of the merge commit. What you can do instead, is to edit the commit message before merging the pull request.
What you can do is to watch and vote on this issue:
When you add yourself to the watchers, you will get a notification when the feature is implemented.
I think you should be able to create a custom merge check. Here is the link to the documentation on how to do it:
The PullRequestMergeHookRequest.getMessage() should return the merge commit message you could validate.