Is there a way to generate a list of files changed/added by a Stash pull request?

To estimate future work we would like to size of the work that was developed under a specific Epic.  To do this we would like to generate a list of the specific files that were changed/modified by the pull request attached to a JIRA story so it can be diffed against a previous baseline.  I can do this with the entire repository but cannot isolate only the code change by stories associate with a specific Epic.   Is this possible?

2 answers

This widget could not be displayed.

Hi Mike,

I think for your purpose you could make use of the REST API function /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes, which returns you the changes for a given pull request, including files changed and added.

Regards,

Gustavo Refosco

This widget could not be displayed.

As this is not paged it does not necessarily return a complete list.

Actually it says "This is a paged API" right under it.

Which is correct then. It also states: "Note: This resource is currently not paged. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored."

Hi Mike, I'm sorry - you're correct and it seems I totally ignored that statement. In this case I can't think of anything else for now, other than maybe using the function /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits (link https://developer.atlassian.com/static/rest/stash/3.11.1/stash-rest.html#idp2704704 ), which will return to you the commits included in the pull request - but then you would need to do some extra work checking for what changed in these commits. It seems the "changes" function was intended to be paged - I'm not sure if there's any plan in action to make it this way but please feel free to raise an improvement request for it at https://jira.atlassian.com

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

263 views 14 2
Join discussion

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