How do I parse the VCS commit comments?

As the title mentioned, we have to fetch the VCS commit comments as it contains some formated info we hope to parse during build. Does teamcity provide any build-in vairable or feature that stores the commit comments? I google this question but most replys are about using the VCS management tool to fetch the commit comments.

thanks,
-Michael

2 comments
Comment actions Permalink

Hi Michael,

You can get the list of changes of the build via REST API.
e.g. Use a command line curl call:
curl –request GET  %teamcity.serverUrl%/httpAuth/app/rest/changes?locator=build:(id:%teamcity.build.id%) –basic –user  %system.teamcity.auth.userId%:%system.teamcity.auth.password%

BTW, you can find VCS comments preprocessing functionality useful.

0
Comment actions Permalink

Hi Yegor,

thanks for the information. It's helpful.

Regards,
-Michael

0

Please sign in to leave a comment.