Bitbucket 拉取请求更新了 webhook
Bitbucket pull request updated webhook
现在使用 webhook 拉取请求更新事件,我会收到任何拉取请求更新的通知(例如:描述已更新、标题已更改等)
有没有办法只在对拉取请求进行推送时收到通知?
不,每次拉取请求中的内容发生变化时都会触发 webhook。
但是,查看您将使用 pullrequest:updated
webhook 获得的 payload,您可以通过将源提交哈希与之前的 (存储) 哈希。如果它们不同,则表示已推送。
有效载荷片段:
{
"id" : 1 ,
"title" : "Title of pull request" ,
"description" : "Description of pull request" ,
"state" : "OPEN|MERGED|DECLINED" ,
"author" : User,
"source" : {
"branch" : { "name" : "branch2" },
"commit" : { "hash" : "d3022fc0ca3d" },
"repository" : Repository
}
}
现在使用 webhook 拉取请求更新事件,我会收到任何拉取请求更新的通知(例如:描述已更新、标题已更改等)
有没有办法只在对拉取请求进行推送时收到通知?
不,每次拉取请求中的内容发生变化时都会触发 webhook。
但是,查看您将使用 pullrequest:updated
webhook 获得的 payload,您可以通过将源提交哈希与之前的 (存储) 哈希。如果它们不同,则表示已推送。
有效载荷片段:
{
"id" : 1 ,
"title" : "Title of pull request" ,
"description" : "Description of pull request" ,
"state" : "OPEN|MERGED|DECLINED" ,
"author" : User,
"source" : {
"branch" : { "name" : "branch2" },
"commit" : { "hash" : "d3022fc0ca3d" },
"repository" : Repository
}
}