The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
hi,
At first, just to make sure, we use BitBucket server version 7.6.0
I need to disable the "merge" button via Jenkins automation on a PR open.
this is because as long as the build is not successful, the merge button must be disabled.
The disable action is easy. but...
at the end of successful build, I can't enable the merge button because I can't tell if all other conditions of the merge button are met, like # of approvals.
any idea how/if can I get this info from the merge button ?
Bitbucket server project or repo settings let you define merge conditions, including the number of successful builds required. If the condition is not met, the merge button should be disabled.
Internally Bitbucket performs all merge-checks [1] sequentially and if one or more fail the PR can't be merged, i.e. the merge-button is disabled.
Can you elaborate a bit more on how you use Jenkins automation? Are you developing your own app/add-on?
[1] https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html
although this algorithm is not bullet proof...
PR open triggers a Jenkins job to perform a build, and, in addition to other merge-checks, the build must be successful. but BitBucket's merge-check is on # of successful build(s) and I need the last build to be successful, not just any # of builds, so I ca't use this merge-check, meaning I have to take care of the "Enable merge button' at the end of the build by myself via kind of BitBucket's automation command.
but I can't do this unless all other merge-checks are already done.
this is the info I want to get from BitBucket - are there any uncompleted merge-checkes ?
Atlassian could solve this situation by add a merge-check for the last build.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.