Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-7639

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

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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:

      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.

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            legacy-bitbucket-user Legacy Bitbucket Cloud User (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: