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?
Nik,
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):
Event_Handlers_-_Stash.png
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).
There is also a video you can watch on our Adaptavist ScriptRunner Youtube Channel which runs you through the Auto Add Reviewer functionality.
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.
Hi Nik,
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!
cheers,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can enter a request at jira.atlassian.com. Post a link here if you do so that people who see this and agree can vote for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think you can do this with Stash. Certainly not out of the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.