如何在 TeamCity 构建中获取源分支和目标分支?

How to get source and target branch in TeamCity build?

我想知道在 TeamCity PullRequest 构建期间是否有任何方法可以提取源和目标分支(我的 git 服务器是 bitbucket)。我想在我的构建脚本中使用这些信息。

我发现这些变量是可用的,但是从 2019.2

https://www.jetbrains.com/help/teamcity/pull-requests.html#PullRequests-Predefinedbuildparametersforpullrequests