# GitHub triggers

URL: https://docs.usestitch.ai/docs/triggers/github



Connect the repository through the Stitch GitHub App. Set `provider: github`.
Select one `eventType` and one or more supported `actions` per trigger.

## Event types [#event-types]

| Event                                                                            | Use                               |
| -------------------------------------------------------------------------------- | --------------------------------- |
| [issues](/docs/triggers/github/issues)                                           | Issue lifecycle and labels        |
| [pull_request](/docs/triggers/github/pull_request)                               | PR lifecycle and updates          |
| [issue_comment](/docs/triggers/github/issue_comment)                             | Issue or PR conversation comments |
| [pull_request_review](/docs/triggers/github/pull_request_review)                 | Review submissions and state      |
| [pull_request_review_comment](/docs/triggers/github/pull_request_review_comment) | Inline review comments            |
| [pull_request_review_thread](/docs/triggers/github/pull_request_review_thread)   | Resolve or reopen review threads  |
| [push](/docs/triggers/github/push)                                               | Repository pushes                 |
| [check_run](/docs/triggers/github/check_run)                                     | Check completion or rerequest     |
| [workflow_run](/docs/triggers/github/workflow_run)                               | Workflow completion or request    |
| [release](/docs/triggers/github/release)                                         | Release creation or publication   |

## Schema [#schema]

[Triggers schema](/schema/triggers.json). Each event page links its own input schema.
Examples on event pages are entries in `triggers`, not complete factory files.
Create the referenced harness and sandbox first. JSON Schema describes field shapes;
`stitch validate` enforces event/filter compatibility.

## Filters [#filters]

Filter lists generally allow at most 50 entries. `actions` needs 1–20 unique entries.
Supported filters vary by event; do not copy an unsupported field from another page.

| Field                              | Matching                                                                       |
| ---------------------------------- | ------------------------------------------------------------------------------ |
| `labels`                           | Repository label names resolved during full validation                         |
| `labelOperator`                    | `has_any` (default), `has_all`, `has_none`, `is_empty`                         |
| `labelScope`                       | `current` (default) or `changed`                                               |
| `branches`                         | Any available branch; patterns support `*`, `**`, `?`                          |
| `sourceBranches`, `targetBranches` | PR head/base branches; same patterns                                           |
| `pathPrefixes`                     | Repository-relative file/directory prefixes; no wildcards or `.`/`..` segments |
| `commentKeywords`                  | Case-insensitive substring match; any selected keyword                         |
| `mentionedLogins`                  | Case-insensitive match against mentioned GitHub logins                         |
| `commands`                         | Exact first word after leading whitespace, such as `/review`                   |
| `actorLogins`                      | Case-insensitive event sender login match                                      |
| `authorAssociations`               | GitHub association values, such as `OWNER`, `MEMBER`, `COLLABORATOR`           |
| `ignoreBots`                       | Exclude bot senders; defaults to `false`                                       |
| `ignoreDrafts`                     | Exclude draft PRs; defaults to `false`                                         |

Changed-label scope accepts only labeled/unlabeled actions and needs labels.
`is_empty` forbids a labels list; `has_all`/`has_none` require one.
Changed-label `has_all` cannot select multiple labels.
Comment matching requires selectors or `matchAllComments: true`, never both.

## Guards [#guards]

Use the scopes on each event page plus `delivery` for `deduplicate`.
Check guard type restrictions in [Triggers](/docs/triggers#guards).
Subject/commit scopes are invalid when the event does not support those identities.
