For my master and dev branch, I was wondering if there is a way in Bitbucket which allows me to run some sanity checks before code is actually merged by pull requests ? Sanity checks like versioning for example. Ideally I would like to put a script which will automate versioning process. All the posts I can find on Atlassian community or Google point me towards "Running a script AFTER pull request is merged". Can someone point me towards some material wherein I can learn about "Running a script BEFORE pull request is merged" ?