I'm trying to run a TeamCity build via the REST API using a particular git commit. Creating a new build via the API requires a TeamCity modification ID, not a git commit reference.
How can I convert a git commit to a TeamCity modification ID? The closest I've found so far is calling /app/rest/changes?fields=change:(version,webUrl)
, which returns a list of <change />
nodes and then parsing the modId from the webUrl property, but I'm not sure how to filter this via TeamCity locators to only contain the particular commit I need.