If I click decline, it will shut down the pull request. If I make some comments then leave the pull request open, it will stay in my inbox. What I would like is a button that means I don't think the code should be merged yet, but I don't want to shut down the conversation for other code reviewers, and I don't want the pull request to stay in my inbox.
Is this something that already exists? Or would creating this button with a plugin be difficult?
I haven't seen a disapproval plugin for Stash yet. You could create a plugin which stores disapprovals against a pull request and even stop pull requests with disapprovals being merged (using a merge check). However with custom disapprovals there will be no integration with other pull request features such as the inbox.
It sounds like you may want to just mark the pull request as 'read' for the inbox rather than stopping merging?
Actually we (the company I am interning at) want disapproval to behave exactly like approval, except display a little red X instead of a check mark and send out an email indicating disapproval. We don't even want to block the ability to merge (we leave that up to the developer).
I was thinking I could add another boolean representing disapproval, and just check for both in the places that matter to me, that way it wouldn't affect integration with the other features you mentioned.
So then what I need to do is to store an extra boolean with a PullRequestParticipant, modify the approve button slightly (to change it's toggling behavior a little bit), and modify the thumbnails and approval emails to look for a disapprove boolean as well.
The Stash developer guide is great for doing things like merge checks, but I'm not sure where to look if I need to change the behavior of existing code. The Jira dev guide seems to have some information regarding this, but I'm not sure how relevant that is to Stash. I was hoping someone could point me in the right direction to get started on this.
We don't really encourage or support changing existing Stash code, mainly as it could lead to issues as we refactor and enhance our code. Generally we provide extension points, an API and an SPI as described in the developer documentation. Most of the bevhaviour you would like to change does not have an extension point currently.
The supported way of adding dissapprovals yourself would be to write a plugin. The plugin would maintain a table linking disapprovals to pullrequests, add a seperate button to the pull request UI and some UI elements to show the number of disapprovals. However you will hit some limitations like reviewers being able to both approval and disapprove.
All in all given this is a such a core feature you are likely to run into some issues with integerating your feature, so it may end up being more work than you think. It may be better to raise a feature request for Stash at jira.atlassian.com
One of the best ways to look at how you can integrate with Stash is to look at the Stash source code which you can download as a license holder.
Hope that helps,
An add on to my progonal questions is that I would like disapprove to show a red X instead of a green check mark as well.
After some digging, it seems the button itself would be trivial to make, however the disapprove state seems less obvious. Approval currently seems to be represented by a boolean in the PullRequestParticipant entity.
Is there a way to modify this? Is this functionality planned for a future release of Stash? If not, does anybody have any suggestions for how to go about implementing this?
FYI, I wrote a version of this called the "stash disapproval plugin" - I think we only open-sourced it after this original question in 2013.
The company I worked for (and no longer work for) isn't really maintaining it anymore but I do occasionally work on fixes. It is here:
It supports stash 3.X and I am working on a Bitbucket 4.x version now.
As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...
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