Trigger a code review in Upsource

Hi all,

I can't figure out how to achieve the following (code repository is Github) :

- when a developper creates a pull request, this should trigger a build in teamCity to perform SAST operations (this is OK, I managed to make it work)

- a code review should be created in Upsource (this also works)

=> I want the pull request to be merged in the target branch automatically and only if both the teamcity build and the upsource code review are successfull / accepted.

 

That I tried :

=> starting from Upsource, and trigger the teamcity build, which may perform the automatic merge on success. But the webhook in Upsource is firing regardless of the status (changes accepted or not by the reviewer), and I can't figure out how to parameterize the webhook (i.e passing the pull request ID, among others things).

=> starting from TeamCity, creating the code review in Upsource if previous steps are OK. I jus didn't succeeded to do that.

 

What would be the best practice, ahow to achieve this ?

 

Thanks !

0

Please sign in to leave a comment.