Programmatically test connection in JetBrains/commit-status-publisher bundled plugin


I'm using TeamCity Enterprise 2018.1.3 (build 58658) and I wonder if there is a way to test a connection between TC and Github programmatically through the commit-status-publisher plugin.

I'm able to fill those fields using the TC REST API, but couldn't found anything about testing the just defined connection to confirm if the data is correct. Any hint is appreciate it.


Comment actions Permalink
Official comment


It is impossible to invoke actual Test Connection functionality of Commit Status Publisher via REST API. You can create a feature request in our issue tracker and describe your case in details: 

There are few imperfect workarounds:

One option is to actually start a build on some commit (via TeamCity REST API) and check if a status of a commit is published (via GitHub REST or GraphQL API as in for example).

Another option is to post the status using the access token from your code (as in

And the last possibility I can think of is to simulate what Commit Status Publisher's test connection actually does (via GitHub REST or GraphQL API as well): 
- query the repository (as in
- check if the response contains correct repository name (this is not essential though)
- check if a push permission flag is set in the repository information

The latter two options will only test if there is enough permissions associated with your token to publish statuses in this particular repository. 

Comment actions Permalink

Hello Anton,

Thank you for your help, I finally deployed your latest suggestion, I tested the credentials directly against the github api, I think in general it would make sense to test the connection from within the TC API but the current solution isn't that hard either, so I'll leave it like that.


Please sign in to leave a comment.