git - TeamCity REST API - who committed changes causing a build? -
i'm using team city api failed builds (for display in javascript application).
i'd find out who committed change in git, caused build fail. can put developer's name big & bold on status display...
but can't find user information. pointers please?
you can list of changes given build id via rest api, this:
http://<yourtcserver>/httpauth/app/rest/changes?build=id:<buildid>
the response request include 1 or more "change" entries, depending on how many commits included in build. each of entries (assuming response formatted xml; can json if prefer):
<change id="####" version="<commit id>" href="/httpauth/app/rest/changes/id:####" />
you can follow returned href details of each change, includes tag related user looking this:
<user username="<some tc username>" name="<some tc user's full name>" ... />
the root "change" element include git username, if you've got of users setup correctly within tc there association between git users , tc users, you'll "user" element showed above , contain more info.
Comments
Post a Comment