Duplocate synchronize events sent to github app when accepting " Suggested change"

When I commit a suggested comment e.g.,

then two synchronize events are sent to my github app within a second of each other

The body of each event is exactly the same.

My github app then performs the same action twice, which is not desirable.

Is this a bug with the webhooks? it seems like one

Is there a way to uniquely identify the events other than hashing the content into a “has this been seen befoore” key?

:wave: @richtier, thanks for reaching out and reporting this. I think it’s very interesting behavior to report and I don’t have an explanation for this. As a next step, I’m interested in reproducing this for myself. Here are my questions:

  • Which permissions and webhook events are granted to your GitHub App?
  • How often do you see this behavior?
  • Are you able to reproduce this behavior in a public repository and share a URL here for us to investigate?

Is there a way to uniquely identify the events other than hashing the content into a “has this been seen befoore” key?

When you receive a new webhook payload, you can inspect the headers and filter for the value of the X-GitHub-Delivery. This is a GUID to identify the delivery. Does that help with what you’re looking for, or are you looking to do something else?

sorry I thought I marked this as resolved. I was mistaken :slight_smile:

1 Like