Right now using the webhook pull request updated event I get notified for any pull request update (eg: description updated, title changed, etc.)
Is there a way to be notified only when a push was made to a pull request?
Right now using the webhook pull request updated event I get notified for any pull request update (eg: description updated, title changed, etc.)
Is there a way to be notified only when a push was made to a pull request?
No, the webhook will be triggered each time something changes in a pull request.
However, looking at the payload that you will get with a pullrequest:updated
webhook, you could build that logic yourself, by comparing the source commit hash with a previously (stored) hash. If they are different, it means that a push was made.
Payload snippet:
{
"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
}
}