How can I access to commits list in BuildServiceAdapter

I'm creating custom plugin for Teamcity. And I need to get list of commits from last succsefull build. How can I get it?
You documentation is very poor.

Official comment


There's no update, we still not planning to add such functionality to agent side.

You may try to use REST API to fetch information from server during a build.




Hi Alexey,

There no such information available on agent side of TeamCity.
Agent have access only to files(changes) in currently running build. From BuildServerAdapter you could use `getBuild().getVcsChanges()` call chain to get chagnes in this build.

On server side you could use Build#getChanges method.

Why do you need changes since last succesfull build on agent side? Maybe there's another way to achive your goal?



Hello (: Is there any update about this topic? Are agents still not able to access build changes?

Or maybe there is more convenient way to do this?

I just want to get list of commits that differ with previous build, because I want to parse comments from them to add as release notes. Is there any way to achieve that?

Or maybe I can access pending changes list?


Thank you in advance!


Thank you for comment. Yeah, I already started looking into REST API, and found some ways to get what I want. But I still have not found info about getting pending changes from API - could you, please, guide me?


Please sign in to leave a comment.