Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014

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
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2014

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

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2014

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
TAGS
AUG Leaders

Atlassian Community Events