GitHub Integration

HookFlow seamlessly integrates with GitHub webhooks to help you process repository events reliably. This guide will walk you through setting up and configuring GitHub webhooks with HookFlow.

Setting Up GitHub Webhooks

Follow these steps to configure your GitHub webhooks:

1. Get Your HookFlow Endpoint

First, copy your unique HookFlow endpoint URL from your dashboard. This is where GitHub will send webhook events.

2. Configure Webhook in GitHub

  1. Go to your repository settings
  2. Click on "Webhooks" in the left sidebar
  3. Click "Add webhook"
  4. Enter your HookFlow endpoint URL in the "Payload URL" field
  5. Set Content type to "application/json"
  6. Enter your webhook secret
  7. Choose which events you want to receive
  8. Click "Add webhook"

3. Add GitHub Secret

After creating the webhook, add your webhook secret to your HookFlow dashboard under the GitHub integration settings to verify webhook authenticity.

Supported Events

HookFlow supports all GitHub webhook events. Some commonly used events include:

  • push
  • pull_request
  • issues
  • issue_comment
  • release
  • workflow_run
  • deployment_status

Event Format

GitHub webhook events follow a consistent format. Here's an example of a push event:

{ "ref": "refs/heads/main", "before": "abc123...", "after": "def456...", "repository": { "id": 123456, "name": "repository-name", "full_name": "owner/repository-name", "private": false }, "pusher": { "name": "username", "email": "user@example.com" }, "commits": [ { "id": "abc123...", "message": "Commit message", "timestamp": "2023-01-01T00:00:00Z", "author": { "name": "Author Name", "email": "author@example.com" } } ] }

Best Practices

Follow these best practices when working with GitHub webhooks:

  • Always verify webhook signatures using the GitHub secret
  • Set up appropriate retry rules for failed webhook deliveries
  • Monitor webhook activity in your HookFlow dashboard
  • Consider setting up separate webhooks for different event types

Next Steps

Now that you've set up GitHub webhooks, explore these related topics:

Need Help?

If you encounter any issues with your GitHub integration, please check our troubleshooting guide or contact our support team.