One of our repositories is extremely large with many directories. This is largely due to an organic growth. While it is clear that we should refactor the code base, we are not prepared to at this time.
Often, the senior developers who have expertise and knowledge of one directory are completely ignorant about the contents of another. For example, we might have one directory that manages UI and another one that manages handling requests.
The problem arises with requiring approval for pull requests. It appears that the ability to approve a pull request is only available on a per-repository + per-branch basis. How do I get more granular than that? How do I allow a directory within a specific repository and branch have a different set of approvers than another directory within that same repository and branch?
Adaptavist have recently released a new Add-on to the Marketplace that should solve your particular use case called ScriptRunner for Stash. This Add-on does many things but the area your most interested in is the feature of enforcing mandatory approvers (users or groups) automatically.
This screenshot should show how you could configure the Auto Add Approver Event Handler to suit your needs for a repository called "big-repo" and a directory with the path matching the condition (note: there are other conditions or you can write your own groovy scripted condition):
On this occasion I've configured the user "Frank N Stein" and all members of the group "front-end-engineers" to be mandatory reviewers of all Pull Requests that match the repository and the conditional path (or directory).
I hope that helps but feel free to let us know if it doesn't. We'd be glad to try and help. The best way to raise a question is on our Product Support Service Desk Portal.
While you can't do this "out of the box", you could create a custom "merge check" plugin that would allow you to require certain developers approvals on PRs where certain paths have been modified.
There's an excellent tutorial on merge checks in the Stash developer documentation here: https://developer.atlassian.com/stash/docs/latest/tutorials-and-examples/controlling-when-pull-requests-can-be-merged.html
Hope this helps!
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs