Details
-
Suggestion
-
Resolution: Duplicate
Description
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:
- Query the API: https://bitbucket.org/api/2.0/repositories/pypy/pypy/pullrequests/150/patch
- 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.
https://bitbucket.org/api/2.0/repositories/pypy/pypy/pullrequests/150/files
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)