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

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.


Gustavo Refosco

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 ), 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

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 ...

655 views 5 9
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