API should support fetching builds by VCS revision / hash.
M
Mali Akmanalp
Discussed here: https://twitter.com/FelicianoTech/status/1027242152965877760
During some non-CircleCI deployment processes, one part of the configuration might be the specific git revision of the code to be deployed (e.g. to get an old build artifact to be able to deploy an old build instantly). To do this with the API, currently you have to look through all the builds in the project, paging through them 100 items at a time and making a new API call each time until you find the build you need, to then fetch the artifact URL.
I propose an addition of a new query parameter to
GET: /project/:vcs-type/:username/:project
, similar to ?filter=blah
. We could have ?revision=<hash>
, which would filter the list of builds to only those matching the given VCS revision. This would make finding builds by hash a one-step process.CCI-I-542
D
Donald Tyler
This feature would also be very useful for me. I am trying to implement some functionality in our workflow where I need to know how many times a particular workflow or job has been retried. The simplest way for me to do this is to query for previous builds for the same SHA.
Depending on the complexity, it would be ideal if we could simply add query parameters for
any
property that would normally be returned by the resource endpoint so that users don't have to create a feature request for each property.