Can you make it so you can query/view pull requests authored and/or approved by a user?

Using pull requests in Stash (which we use for feature branching regardless) for code reviews has worked out fairly well; many of our users still use Crucible, but some teams have made the jump to just using Stash. As pull request history builds up, I have two questions from the userbase:

1) It looks like pull requests are a permanent part of the system, either Open, Merged or Declined, is that correct?What is the expected lifespan of pull requests? On one hand, very long life is needed if it's going to be a viable code review platform. However, there's a small amount of cleanup that would be nice to do, not to destroy history but to get rid of pull requests that shouldn't have been opened, or have been abandoned and the branch they came from has been deleted.

2) The authoring of pull requests and contributing to the review and approval of pull requests would be a valuable piece of data come review time. Is there a way to query Stash for all the pull requests created or approved by a person during a time frame?

-Kelly Schoenhofen

1 answer

1 accepted

0 votes
Accepted answer

Hi Kelly,

Pull Requests are permanent - we have no mechanism for deleting PRs at the moment.

https://jira.atlassian.com/browse/STASH-3134

Currently the querying you can do on Pull Requests is fairly limited. We have a REST endpoint that is used by the inbox for listing all the current users pull requests. Although I suspect you want to search someone elses? That is technically possible, but at this stage you would need your own plugin to provide that functionality. In general you are limited by the methods we currently have on PullRequestService (where countForParticipant() is the method that would be useful in this case)

https://developer.atlassian.com/static/javadoc/stash/latest/api/reference/com/atlassian/stash/pull/PullRequestService.html

You might like to vote for the following:

https://jira.atlassian.com/browse/STASH-3856

Sorry I can't be more help.

Charles

Nope, this is what I was looking for. While I would still like there to be a way to do cleanup/maintenance on pull requests, the important request was searching by author or reviewer. I just upvoted and am watching https://jira.atlassian.com/browse/STASH-3856now; hopefully this question will lead others reading this to also upvote and watch the feature request.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

251 views 3 7
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you