Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling for ping events #3

Closed
maxbrunsfeld opened this issue May 30, 2014 · 1 comment
Closed

Handling for ping events #3

maxbrunsfeld opened this issue May 30, 2014 · 1 comment

Comments

@maxbrunsfeld
Copy link

Right now, my RightHook::App (you know the one) occasionally gets its on_issue method called with a nil value for the third argument (issue_json). I think this is because of the ping event, which sends to every webhook a payload like this:

{
  "zen": "Non-blocking is better than blocking.",
  "hook_id": 2341839
}

with this header:

X-GitHub-Event: ping

So even though the subscription is for issue events, we sometimes get json without an issue key.

One option would be for my app to just handle the case of nil json itself, but maybe it should be built into right_hook. What do you think?

@mark-rushakoff
Copy link
Owner

According to the Webhooks page:

When you create a new webhook, we’ll send you a simple ping event to let you know you’ve set up the webhook correctly.

It sounds like right_hook indeed should handle that correctly. Pull requests are very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants