gpt4 book ai didi

azure - Azure Devops 管道的传入 Webhook 触发器 : "Cannot find webhook for the given webHookId"

转载 作者:行者123 更新时间:2023-12-02 23:12:48 27 4
gpt4 key购买 nike

我尝试在项目中设置传入的 Webhook 以触发 yaml 管道。设置与传入 Webhook 的服务连接。将 yaml 片段添加到管道中,如下所示:

resources:
webhooks:
- webhook: testtrigger ### Webhook alias
connection: testconnection ### Incoming webhook service connection

通过curl调用url时:curl -X POST 'https://dev.azure.com/<my org>/_apis/public/distributedtask/webhooks/testtrigger?api-version=6.0-preview' -d '{ "tags": {} }' -H "Content-Type: application/json" ,我总是收到错误消息:

{"$id":"1","innerException":null,"message":"Cannot find webhook for the given webHookId testtrigger. Try enabling CD trigger for this artifact.","typeName":"Microsoft.TeamFoundation.DistributedTask.Pipelines.Artifacts.WebHooks.WebHookException, Microsoft.TeamFoundation.DistributedTask.Orchestration.Server","typeKey":"WebHookException","errorCode":0,"eventId":3000}

在触发器/连接上尝试使用不同的名称,但没有任何效果。我缺少什么想法吗?

最佳答案

呼应@FrankBaumfalk的评论,您需要确保管道的默认分支与您正在开发的分支相同。 (您可能像我一样,在其构建的同一存储库的分支上开发和测试此 yaml。)

指示您的默认分支:

  1. 编辑您的管道
  2. 从烤肉菜单中选择触发器
  3. 选择YAML选项卡,见下文👇
  4. 注意默认的分支字段;保存

enter image description here

此外,是的,引用 webHookId 的错误是服务连接中传入 WebHook 中的 WebHook 名称。> 一致的命名。

关于azure - Azure Devops 管道的传入 Webhook 触发器 : "Cannot find webhook for the given webHookId",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67622056/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com