Monday, October 18, 2010

Easy Access to GitHub Commit Page from TeamCity

(inspired by the tweet)

If your TeamCity is watching GitHub repo, you can add a link to GitHub commit page from every change displayed in TeamCity. The feature to allow that is called external changes viewer.

This requires some config file editing effort, but don't be scared:
Locate .BuildServer/config/change-viewers.properties file and add a line into it:
<NN>.changeSetUrl=http://github.com/<user>/<repository>/commit/${changeSetId}
Where:
<NN> - internal TeamCity id of the VCS root used. You can get the id if you open VCS root editing page in TeamCity and find "&vcsRootId=<NN>" in the URL.
<user> and <repository> - parts of GitHub repository URL.

See detailed description of the format in the comments inside "change-viewers.properties.dist" file.

Once you save the file (no TeamCity restart is required), all the changes of the VCS root affected should get icon that you can click to open GitHub commit page.

Like the feature? Let us know about this in the forums and suggest improvements in our issue tracker so that we can further enhance it.

No comments: