How to determine checklist for Bitbucket PR on merge pop-up?
According to Atlassian Documentation:
Merge checks apply to individual branches or branch patterns along with branch permissions. The rest of this section expands the example we used to describe branch permissions and includes merge checks.
So you need to go to Settings > Branch permissions and click on Add a branch permission, then use drop down Merge Checks. And choose options from below list - like on picture:
Related
Is there any way in BitBucket to deny any merge to a specific target branch if that merge is not backed-up by an approved pull request?
Thanks,
Ido
In Repository settings > Branch permissions you can add checks to see specific number of approvals or specific number of approvals from default reviewers, check that no further changes are requested, or you can check for unresolved PR tasks. You can set this up for any specific branch
However preventing merge when there are unresolved merge checks is a premium feature.
I need to check if I have the right to merge PR on a wide range of bitbucket project.(without merging anything of course)
Any command line who can check it ? or way of listing all my right for all the repo?
I need to merge my master branch code to current branch before building. We don't have access to Git Publisher. I wanted to know what my options are.
I looked into an advanced feature to "Merge before Build" but that seems to merge current branch to master?
Thanks for your help!
I want to create a TFS policy that blocks a changeset from being checked in if a certain keyword is found in the diff.
This will allow me to make local changes for testing ideas without worrying that these changes will be mistakanly checked in, as long as I add something like //nocommit in the code.
How can this be done?
There is no out-of-box check-in policy to achieve your requirement, you have to customize your own check-in policy and use command tf diff itemspec /noprompt to compare files.
As a suggestion, you could consider using Git version control, create a branch from master and work on the branch. When you are ready to merge your code to master, create a pull request to review the code. In order to protect master, you could set branch policy on master. After you set up a branch policy, you cannot directly push changes to the branch. Changes to the branch are only made through pull requests.
My team's policy is to not check in broken code into TFS. But what if two team members are working on the same file and each member's work represents a partial solution ? One members changes won't work without the other.
How is the best way to combine the code and still follow policy of not checking in broken code ?
Both developers could create a shelveset of their changes once their own coding is complete. Once it's time to merge their code, you have 1 developer unshelve the other developer's shelveset into their own workspace. Doing this will also trigger the Merge Tool in case there are any merge conflicts that can't be automatically resolved. This should allow the developer to combine work with the other without checking in broken code.
Note that both developers should make a shevleset of their own work before unshelving the other's, in case the unshelve of the other developers work goes terribly wrong in the merge and they need to revert their own work to the un-merged state.
Here's some documentation on creating and unshelving shelvesets
Consider allowing broken code on branches. The team members could commit code to branches and merge those branches together before merging into master. Your primary or master branch should require a passing build before a pull request can be merged in.
Look at the feature branch model: https://learn.microsoft.com/en-us/vsts/git/concepts/git-branching-guidance. This does not depend on Git but it is convenient as branching is cheap.
Both developers work on the feature branch which is allowed to be broken. When they are finished they issue a pull request to the master branch. The merge is only allowed if all tests pass to make sure the master branch stays healthy.