Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

GitHub Trigger

The daemon accepts GitHub webhooks at /webhooks/github and the alias /events. Every request is verified with HMAC-SHA256 against the webhooks.secret in daemon.yaml — unverified requests are rejected.

Event string format

GitHub sends an x-github-event header (the event type) and a JSON payload. If the payload has an action field, the daemon combines them with a dot:

x-github-event: pull_request
payload.action: opened
→ event string: "pull_request.opened"
 
x-github-event: deployment_status
(no action field)
→ event string: "deployment_status"

Prefix matching

A trigger pattern matches if it equals the event string or is a prefix of it (separated by .). This means you can subscribe to an entire event type:

trigger:
  github:
    - pull_request          # matches pull_request.opened, pull_request.synchronize, pull_request.closed, ...
    - pull_request.opened   # matches only pull_request.opened

Common events

Event patternWhen
pull_request.openedNew PR opened
pull_request.synchronizeNew commits pushed to an open PR
pull_request.closedPR closed (merged or abandoned)
pull_request_review.submittedA reviewer submits a review
pull_request_review_comment.createdAn inline review comment is posted
issue_comment.createdA top-level PR/issue comment is posted
deployment_statusA deployment status event (e.g. CI completes)
pushCommits pushed to any branch

Loop-breaker guards

The daemon applies two automatic guards before matching pipelines — these reject events even if the trigger pattern would otherwise match:

  1. Self-authored comments — if sender.login matches the daemon's configured GitHub login, issue and PR comments are rejected. This prevents a pipeline from triggering on its own output and looping. (Reviews and pushes are exempt — the bot needs to participate in the review cycle.)
  2. Merged or closed PR — if a PR event arrives for a PR that is already merged or closed, the event is rejected.

Examples

# Fire on PR open and every push to the PR branch
trigger:
  github:
    - pull_request.opened
    - pull_request.synchronize
 
# Fire when a deployment succeeds on a specific repo
trigger:
  github:
    - deployment_status
  filter:
    repos: [acme/backend]
    when:
      deployment_status.state: success
 
# Observer mode: every inline review comment, except from the bot itself
trigger:
  github:
    - pull_request_review_comment.created
  filter:
    not:
      comment.user.login: my-bot
    mentioned: false

Prompt variables

{{event.*}} paths available in the prompt template for GitHub events:

Pull request events

VariableValue
event.pull_request.numberPR number
event.pull_request.titlePR title
event.pull_request.bodyPR description
event.pull_request.user.loginPR author's GitHub login
event.pull_request.html_urlURL to the PR
event.pull_request.head.refHead branch name
event.pull_request.head.shaHead commit SHA
event.pull_request.base.refBase branch name
event.pull_request.drafttrue if draft
event.repository.full_nameowner/repo
event.repository.default_branchDefault branch

Review events

VariableValue
event.review.idReview ID
event.review.stateapproved, changes_requested, commented
event.review.bodyReview summary body
event.review.user.loginReviewer's login

Comment events

VariableValue
event.comment.bodyComment text
event.comment.user.loginCommenter's login
event.comment.pathFile path (inline comments only)
event.comment.lineLine number (inline comments only)
event.comment.diff_hunkDiff context (inline comments only)
event.issue.numberPR/issue number (top-level comments)
event.issue.titlePR/issue title

Deployment events

VariableValue
event.deployment.refBranch or tag deployed
event.deployment.environmentTarget environment
event.deployment_status.statesuccess, failure, pending, etc.

See also

  • Filters — narrow which events reach this pipeline
  • Public Access — expose the daemon to receive webhooks