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

Improve list commits API endpoint branch inclusion filtering

XMLWordPrintable

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

      Hi team,

      A user has raised a valid improvement request for our API.

      When using the "include" filtering option on the list commits endpoint, for example:

      • https://api.bitbucket.org/2.0/repositories/some-workspaceid/some-repo/commits?include=main&include=testbranch
        

      When both branches exist, the command works fine. If either main or testbranch does not exist, however, the API returns an error rather than just simply ignoring the non-existent branch:

      • {
        	"type": "error",
        	"error": {
        		"message": "Commit not found",
        		"data": {
        			"shas": [
        				"testbranch"
        			]
        		}
        	},
        	"data": {
        		"shas": [
        			"testbranch"
        		]
        	}
        }
        

      If we could improve this so that partial results are returned for the existing branch, this would be preferable.

      Cheers!

      • Ben (Bitbucket Cloud Support)

              Unassigned Unassigned
              57b7f67f3625 Ben
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: