Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,211
Community Members
 
Community Events
184
Community Groups

Update merge commit message

Edited
Deleted user Jul 16, 2020

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?

2 answers

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?

1 vote
Maciej Adamczak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 19, 2020

Hi @[deleted] 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:
https://jira.atlassian.com/browse/BSERV-10184

When you add yourself to the watchers, you will get a notification when the feature is implemented.

Thanks,
Maciej

Deleted user Jul 20, 2020

Thanks for the response. I already gave my vote.

But I also wanted to understand whether it's possible to handle via MergeChecks extension or some other way using SDK?

Maciej Adamczak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 20, 2020

I think you should be able to create a custom merge check. Here is the link to the documentation on how to do it:
https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/controlling-when-pull-requests-can-be-merged

The PullRequestMergeHookRequest.getMessage() should return the merge commit message you could validate.

 

Thanks,
Maciej

Deleted user Jul 21, 2020

@Maciej Adamczak  is there any way to update the message? 

Maciej Adamczak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 21, 2020

Since we are talking about the merge check you can only use this information to validate the commit message and reject the merge as far as I'm aware. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events