Skip to content

Latest commit

 

History

History
98 lines (84 loc) · 6.83 KB

webhook-events.md

File metadata and controls

98 lines (84 loc) · 6.83 KB

GitHub webhook event inventory

This inventory tracks GitHub's documented webhook event names and the bridge's Phase 1 support. It is an integration backlog as well as an operator reference. GitHub may add events, so compare it with the official webhook events and payloads when planning a new integration. Last reviewed: 2026-10-02.

Support levels:

  • Canonical: persisted with an immutable canonical event key and eligible for IMAP/webhook coverage comparison. It is observational in shadow mode and may enqueue in canary/primary mode when policy permits it.
  • Observed only: a signed delivery can be persisted as unsupported, but no canonical key is derived.
  • Not selected: operators should not subscribe to it in Phase 1.
Support GitHub event names
Canonical commit_comment, issue_comment, issues, pull_request, pull_request_review, pull_request_review_comment, workflow_run
Observed only / not selected branch_protection_configuration, branch_protection_rule, check_run, check_suite, code_scanning_alert, create, custom_property, custom_property_values, delete, dependabot_alert, deploy_key, deployment, deployment_protection_rule, deployment_review, deployment_status, discussion, discussion_comment, fork, github_app_authorization, gollum, installation, installation_repositories, installation_target, issue_dependencies, issue_relates_to, label, marketplace_purchase, member, membership, merge_group, meta, milestone, org_block, organization, package, page_build, personal_access_token_request, ping, project, project_card, project_column, projects_v2, projects_v2_item, projects_v2_status_update, public, pull_request_review_thread, push, registry_package, release, repository, repository_advisory, repository_dispatch, repository_import, repository_ruleset, repository_vulnerability_alert, secret_scanning_alert, secret_scanning_alert_location, secret_scanning_scan, security_advisory, security_and_analysis, sponsorship, star, status, sub_issues, team, team_add, watch, workflow_dispatch, workflow_job

The inventory names event families, not every action value. Actions are tracked separately because their delivery semantics differ. For comments and reviews, created/submitted has the actionable canonical identity; edited and other actions remain distinct observational identities and must not retrigger work without an explicit Phase 2 policy decision. For issues, only assigned is actionable when the payload assignee matches a configured bot login. For pull_request, assigned and review_requested retain their configured-bot checks. synchronize creates a new read-only submit_review job only when a configured bot is still a reviewer, while closed is actionable only when merged=true; that delivery becomes a read-only sync_after_merge job. Comment and review deliveries must additionally be addressed to the bot, belong to a PR authored by the bot, or target a PR/issue assigned to the bot. Being a reviewer, subscriber, or email recipient is not authorization to work.

Reviewer membership is not copied into a bridge-owned table. A synchronize payload can directly prove an outstanding request through pull_request.requested_reviewers; after a completed review disappears from that list, the bridge reads the fully paginated issue timeline and uses the latest review_requested/review_request_removed transition for each configured bot. This keeps GitHub as the source of truth and avoids stale state or merge cleanup. A failed, incomplete or malformed lookup fails closed with reviewer_lookup_failed. Canary mode performs the lookup only for webhookCanaryRepos; both canary and primary modes also honor enabledRepos before calling GitHub.

Each accepted synchronize delivery is keyed by repository, PR number and the new head SHA. The SHA is also retained in the job context, so a push received while an older review is running queues a distinct follow-up behind the per-work-key concurrency guard instead of coalescing into the stale review.

Assignment, review-request, issue-close and issue-reopen deliveries use an immutable timeline event ID only after API resolution proves one unique match. IMAP reads the ID embedded in the notification Message-ID; webhook ingestion matches its signed timestamp, actor and target against the issue event list. Missing fields, failed lookups and ambiguous same-second matches remain receipt-scoped, so repeated transitions cannot be dropped but may appear as a split identity that rollout monitoring must detect.

Issue close and reopen events normalize to archive_notification + review_only from either transport. IMAP timeline notifications are classified before delivery-reason footers are evaluated, so an assignment footer on an issue_event/<id> email cannot turn a lifecycle event into open_issue work. Webhook pull_request:closed remains actionable only for merged=true; an unmerged pull-request close is ignored.

Commit status feedback

Jobs accepted through webhook ingestion publish a best-effort commit status when their target is a pull request or commit. The rollout intentionally follows the repositories that already have actionable webhooks enabled; there is no second commit-status canary list.

  • pending: queued, running, or waiting for a retry;
  • success: the bridge finished and its GitHub follow-up is visible, or the event was conclusively non-actionable;
  • error: the bridge blocked or cancelled the job.

The context is github-agent-bridge/agent by default. When multiple bridge instances target the same repository, set a distinct, stable GITHUB_AGENT_BRIDGE_INSTANCE_ID in each instance's ingestion environment (for example, production and canary). The resulting contexts are github-agent-bridge/agent/production and github-agent-bridge/agent/canary. The ID may contain ASCII letters, digits, dots, underscores and hyphens, must start with a letter or digit, and must keep the full context within 100 characters. Set it before accepting new webhooks; existing outbox rows retain their original context until delivered. It reports bridge processing, not test or review quality, and must not be configured as a required branch protection check. The PR head SHA is resolved once and pinned to the job, so a later push cannot receive the result of work started on an older commit.

Delivery uses a SQLite outbox and is independent of the job result: exhausted GitHub API retries leave an auditable delivery error but do not block an otherwise successful job. shadow and dry-run consume outbox entries without calling GitHub. When GITHUB_AGENT_BRIDGE_DASHBOARD_PUBLIC_URL is configured, the status links to /jobs/<job-id>; otherwise it has no target URL.