In bitbucket is it possible to make a pull request a mandatory step? So after a change someone can't merge with original branch? I would prefer that they have to create a pull request then it should go through review process.
-
You must create pre-commit hook. Refer https://stackoverflow.com/a/40465455/4068218 – Hari Rao Oct 29 '19 at 13:12
-
1I never used it myself, but I googled "bitbucket mandatory pull request" and that pointed me towards the documentation on [branch permissions](https://confluence.atlassian.com/bitbucketserver/using-branch-permissions-776639807.html) which has the winning *prevent changes without a pull request* checkbox. – Gimby Oct 29 '19 at 16:17
1 Answers
You didn't specify whether you were asking about Bitbucket Cloud (the one that Atlassian hosts, bitbucket.org) or Bitbucket Server (the one that you host yourself, with some other URL). Both can handle this in branch permissions, but the specific details will vary a little.
For Bitbucket Server, Gimby left a link in the comments which should address that. You may need to look for your specific BB Server version to get the most appropriate documentation, though.
For Bitbucket Cloud, https://confluence.atlassian.com/bitbucket/branch-permissions-385912271.html should cover it. You can give a small number of people the ability to write directly to the branch(es) in question, or you can skip that, but the important field is defining who can merge to that branch (or those branches) via pull request.

- 4,139
- 1
- 14
- 18