Skip to content

GitHub Pull Requests Webhook

Route & Auth

Property Value
Method POST
Path /webhooks/github/pull-requests
Auth type sha256
Header X-Hub-Signature-256
Secret GITHUB_PULL_REQUESTS_WEBHOOK_SECRET
Service account github-webhook@alan-eu-tools.iam.gserviceaccount.com
Response 200 OK

Payload

Field Type Description
X-Github-Event header GitHub event type (pull_request or pull_request_review)
action string Event action (opened, reopened, ready_for_review, closed, submitted)
pull_request dict PR details (number, title, user, draft, merged)
review dict? Review details (state, user) — for pull_request_review events

Behavior

PR opened/reopened/ready for review

Trigger: pull_request event + opened/reopened/ready_for_review action on non-draft PRs.

Action: Posts a Slack message announcing the new PR.

PR closed

Trigger: pull_request event + closed action.

Action: Updates the Slack message with a close reaction. If merged, checks PR compliance (CI checks passed + required reviews).

PR review submitted

Trigger: pull_request_review event + submitted action (excludes dismissed reviews, self-reviews, and bot reviews).

Action: Updates the Slack message with a review reaction.

Integrations

  • Slack API: message posting, reaction updates
  • GitHub API: PR and review details

Code reference

{{ package_reference("apps.eu_tools.github_pull_requests.webhook") }}

OpenAPI

GitHub Pull Requests webhook on ReDoc ⧉