Build Gitea pull requests with TeamCity
2020-03-02
Gitea is a nice alternative for a self hosted Git service. However there is no official support for it in the TeamCity build and continuous integration server.
To make TeamCity build pull requests for a repository hosted by Gitea you have to add the following line to the “Branch Specification” field in the VCS settings of the repository on the TeamCity side:
+:refs/(pull/*)/head
Afterwards TeamCity will build each pull request using the logical branch name “pull/X” (where X is the number of the pull request).
Sadly there is no tighter integration (yet) to publish commit build status. But maybe we can figure that out too later on. ;-)
Update
The same applies to the Forgejo fork of Gitea.