* docs(hub): document durable workflow routing * docs(hub): make workflow guide progressive
54 lines
2.0 KiB
Markdown
54 lines
2.0 KiB
Markdown
---
|
|
title: GitHub triggers
|
|
description: Configure GitHub events as Hub triggers and route them into durable workflows.
|
|
nav: GitHub
|
|
order: 65
|
|
category: Hub
|
|
---
|
|
|
|
# GitHub triggers
|
|
|
|
## Events
|
|
|
|
| `on` | Fires when |
|
|
| ------------------------------------ | ------------------------------------------------- |
|
|
| `github.issue_comment` | A comment on an issue or pull request is created. |
|
|
| `github.issues` | An issue is opened or edited. |
|
|
| `github.pull_request_review` | A review is submitted. |
|
|
| `github.pull_request_review_comment` | A comment is added to a diff. |
|
|
|
|
Which repositories produce events is set on the GitHub App installation. `filters.repo` narrows a trigger to one `owner/name` repository.
|
|
|
|
## Filters
|
|
|
|
```yaml
|
|
filters:
|
|
repo: example/project
|
|
contains: "@paseo"
|
|
from_users: [maintainer]
|
|
```
|
|
|
|
`from_users` matches the sender's GitHub login. `contains` checks the event text; `pattern` checks its start. The text is the comment body for comments and reviews, and the issue title plus body for issues. All filters must pass.
|
|
|
|
## Invocation
|
|
|
|
Put the configured marker in the message, then put leading inputs in the text parsed after that marker:
|
|
|
|
```text
|
|
@paseo repo=project agent=claude investigate the failed sync
|
|
```
|
|
|
|
Hub consumes only declared consecutive headers and passes `investigate the failed sync` as `${{ paseo.prompt }}`. See [Hub workflows](/docs/hub/workflows) for input types, defaults, choices, and rejected Activity records.
|
|
|
|
## Credentials and replies
|
|
|
|
GitHub-triggered steps receive a scoped `GH_TOKEN` for the triggering repository. The agent can use `gh` to comment, push, and open a pull request. A step may also declare:
|
|
|
|
```yaml
|
|
allow_outputs:
|
|
- type: github.reply
|
|
max: 5
|
|
```
|
|
|
|
See the [workflow examples](/docs/hub/configuration/examples) for review and PR workflows.
|