docs(hub): document semantic GitHub triggers (#3643)

This commit is contained in:
Mohamed Boudra
2026-08-21 14:59:04 +02:00
committed by GitHub
parent c527b203c4
commit 97bdbebd7f
4 changed files with 233 additions and 39 deletions
+28 -23
View File
@@ -10,14 +10,13 @@ category: Hub
A trigger says which provider event can start a workflow. The [Hub workflows](/docs/hub/workflows) page covers the steps, inputs, routing, prompts, and deadlines that run after a match.
`.paseo/workflows/github-mention.yml`:
`.paseo/workflows/github-issue.yml`:
```yaml
name: mention
on: github.issue_comment
name: triage-issue
on: github.issue_created
filters:
repo: acme/api
contains: "@paseo"
from_users: [alice]
max_runtime: 2h
steps:
@@ -35,15 +34,19 @@ Field-by-field detail is in the [configuration reference](/docs/hub/configuratio
## Events
| `on` | Fires when |
| ------------------------------------ | ------------------------------------- |
| `github.issue_comment` | A comment on an issue or pull request |
| `github.issues` | An issue is opened or edited |
| `github.pull_request_review` | A review is submitted |
| `github.pull_request_review_comment` | A comment on a diff |
| `slack.mention` | The bot is mentioned in a channel |
| `discord.mention` | The bot is mentioned in a guild |
| `manual.run` | A run started from the API |
| `on` | Fires when |
| ------------------------------------- | ---------------------------------------------------- |
| `github.issue_created` | An issue is opened. |
| `github.pull_request_created` | A pull request is opened. |
| `github.issue_comment_created` | A comment is created on an issue. |
| `github.pull_request_comment_created` | A conversation comment is created on a pull request. |
| `github.issue_label_added` | A label is added to an issue. |
| `github.pull_request_label_added` | A label is added to a pull request. |
| `slack.mention` | The bot is mentioned in a channel. |
| `discord.mention` | The bot is mentioned in a guild. |
| `manual.run` | A run started from the API. |
New GitHub workflows should use a semantic event. The five legacy events remain compatible: `github.issues`, `github.issue_comment`, `github.pull_request_review`, `github.pull_request_review_comment`, and `github.push`. See [GitHub triggers](/docs/hub/triggers/github) for complete workflows and when to use each event.
Each provider page documents its events and the data they expose:
@@ -59,16 +62,18 @@ The allowlist is what keeps a stranger's comment on a public issue from starting
An allowlist is one layer of defense. It does not make a permitted account trustworthy after compromise or make prompt injection harmless. See [Hub security](/docs/hub/security) before choosing the daemon, working directory, provider policy, and outputs for an external trigger.
| Filter | Applies to | Matches |
| ------------ | -------------- | --------------------------------------------------------------- |
| `from_users` | all | GitHub: login. Slack and Discord: **user id**, not display name |
| `repo` | GitHub | `owner/name` |
| `workspace` | Slack | Team id, `T01234567` |
| `guild` | Discord | Guild id |
| `channels` | Slack, Discord | Channel ids |
| `contains` | all | GitHub substring; Slack and Discord invocation prefix |
| `pattern` | all | Invocation prefix |
| `connection` | all | A connection slug, when the organization has several |
| Filter | Applies to | Matches |
| ------------ | ------------------------- | -------------------------------------------------------------------- |
| `from_users` | all | GitHub: login. Slack and Discord: **user id**, not display name |
| `repo` | GitHub | `owner/name` |
| `workspace` | Slack | Team id, `T01234567` |
| `guild` | Discord | Guild id |
| `channels` | Slack, Discord | Channel ids |
| `contains` | all | GitHub substring; Slack and Discord invocation prefix |
| `pattern` | all | Invocation prefix |
| `connection` | all | A connection slug, when the organization has several |
| `label` | GitHub label-added events | The label added by this delivery, case-insensitively |
| `labels` | GitHub | Every listed current issue or pull-request label, case-insensitively |
All conditions must pass. There is no `any` mode.