We practice an incremental version of git-flow, where we encourage developers to perform code reviews on task/bugs into their own feature branches incrementally for larger bugs / tasks. However, we don't want to perform workflow triggers on those pull request creations, only when a developer does a PR into develop or hotfix.
Is there any way to specify this to the Pull Request Created / Accepted / Rejected etc triggers that they only be performed on specific branches?
Though the whole internet is saying it isn't possible, it is in fact possible with some more engeneering and a little mind-shift:
Say you have this workflow: (status) [Trigger]
Now, let's look at the triggers:
When you attach all these transitions to the "from all" transition the first merged PR will move the ticket to done, and the second PR created will move the ticket back to "in review" no matter what. That's not what you want.
If you define individual transitions and define the trigger there, it works like a filter.
As i just encountered the same problem i'd like to share the solution i came up with:
I restricted branches in Bitbucket such that developers/groupY can only create Pull Requests into the development Branch.
By that i don't need the ability to restrict the 'Create Pull request' trigger in Jira to a certain Branch.
Ah ok. But does that mean that they cannot make PRs against feature branches?
Our workflows is that developers can create intermediate PRs against an Epic branch so that we get continuous reviews on both backend and frontend code even though the integration is not yet working. Then when the features is done a PR against development is created and when merged, all stories are automatically moved to QA step where all the integration tests are done. So our concern is that I do not want a Story to move to QA then an intermediate PR is made against the feature branch.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events