问题描述
在 TFS (Azure Pipelines) 中,我有一个运行 nukeeper repo 命令的任务:
nukeeper repo "https://bitbucket.xxx.com/scm/myproject/myrepo.git" <token> --api "https://bitbucket.xxx.com/scm/myproject/myrepo.git" --consolidate --source https://tfs/tfs/XXX/_packaging/main/nuget/v3/index.json --verbosity detailed
命令成功启动,repo 被克隆,更新检测到,一个新的分支创建了更改提交和推送,但它似乎只在本地。
当 NuKeeper 尝试创建新的拉取请求时,会抛出异常。
在日志中:
OpenPullRequest: Error NotFound 2021-03-22T16:41:31.1464196Z Response NotFound is not success,body: 2021-03-22T16:41:31.1465586Z Updates Failed NuKeeperException : OpenPullRequest: Error NotFound 2021-03-22T16:41:31.1466638Z {"errors":[{"context":null,"message":"Repository \"xxx\" of project with key \"xxx\" has no branch \"nukeeper-update-3-packages-9F8F13D133529FB443D130FFB8330A78\"","exceptionName":"com.atlassian.bitbucket.commit.NoSuchCommitException"}]}
解决方法
-
如果您使用 TFS(本地 Azure DevOps 服务器),您可以登录构建代理机器,并在本地运行命令,以查看是否会重现该问题。
-
错误提示
"Repository \"xxx\" of project with key \"xxx\" has no branch \"nukeeper-update-3-packages-9F8F13D133529FB443D130FFB8330A78\"
,您可以检查服务器上是否存在该分支。