1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #7639 duplicate

Add 'files' sub-resource to pullrequest API, which contains a list of files modified in the associated pullrequest

Daniel Bryant
created an issue

Currently with the v 2.0 API the only way to get a list of files modified within a pullrequest is to obtain the associated patch sub-resource and extract file names from the diff statements (via grep/regex etc). For example:

  1. Query the API: https://bitbucket.org/api/2.0/repositories/pypy/pypy/pullrequests/150/patch
  2. Iterate over the content returned, searching for lines starting with 'diff' e.g. diff -r 388909aea9514189bb4d9f9d3bc146891ec0c4b1 -r f7dffcd98d3fa6b6a184342a9670ac7cf85ade36 rpython/jit/tool/test/test_traceviewer.py indicates that rpython/jit/tool/test/test_traceviewer.py has been modified

It would be very useful if an additional 'files' sub-resource could be added to the pullrequest resource, which when called would return a list of files modified within the pullrequest e.g.


This enhancement would be of particular use to a number of us who want to integrate automated pullrequest management into our CI/CD process (Please see discussion on related issue pullrequest listing API is necessary. (BB-2021) (BB-7094)