vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Filter workflow events by mentions and assignment
727df38613897e6ffd56e1df05a2f674174bf547 · Keenan Nemetz · 8d ago · parent eb07ff56
Filter workflow events by mentions and assignment Add mentioned, replied-to, assigned-to, and author filters to issue, comment, and change-request triggers. Move the role vocabulary into core/role so author.role is validated without importing the access store, and pin mentions, reply authors, and assignee changes in the event payload.
docs/workflows.md +37
| @@ -111,6 +111,43 @@ data; do not interpolate it into a shell command. See | |||
| 111 | 111 | [Workflow reference § Event data available to steps](reference/workflow-reference.md#event-data-available-to-steps) | |
| 112 | 112 | for the fields. | |
| 113 | 113 | ||
| 114 | ## Filtering an event | ||
| 115 | |||
| 116 | A trigger can narrow an event to the cases a job cares about. This is how a coding | ||
| 117 | agent can wait to be asked, instead of running on every comment: | ||
| 118 | |||
| 119 | ```yaml | ||
| 120 | version: 1 | ||
| 121 | name: Coding agent | ||
| 122 | on: | ||
| 123 | issue: | ||
| 124 | types: [opened, assigned] | ||
| 125 | assigned-to: [coding-agent] | ||
| 126 | comment: | ||
| 127 | types: [created] | ||
| 128 | mentioned: [coding-agent] | ||
| 129 | replied-to: [coding-agent] | ||
| 130 | author: | ||
| 131 | role: maintain | ||
| 132 | ``` | ||
| 133 | |||
| 134 | `mentioned` matches an `@coding-agent` in the issue, comment, or change body. | ||
| 135 | `replied-to` matches a comment that answers one written by `coding-agent`. | ||
| 136 | `assigned-to` matches an issue that was assigned to it, including one opened with | ||
| 137 | that assignment already set. `author.role: maintain` is the ACL filter: it admits | ||
| 138 | maintainers and admins, not contributors or readers. Use `author.name` instead when the | ||
| 139 | rule is a list of people rather than a capability. | ||
| 140 | |||
| 141 | A comment is not treated as addressed to its own author, so the agent's reply does | ||
| 142 | not start it again. Mentions inside code samples are ignored. See | ||
| 143 | [Workflow reference § Event filters](reference/workflow-reference.md#event-filters) | ||
| 144 | for the exact rules. | ||
| 145 | |||
| 146 | A comment body is still untrusted text. If the job can write — comment, push a | ||
| 147 | branch, or open a change — use `author.role: maintain` or `author.name` to limit who can | ||
| 148 | start it, or rely on assignment, which requires triage. Read the agent's | ||
| 149 | instructions from the repository, never from the event body. | ||
| 150 | |||
| 114 | 151 | ## Manual runs | |
| 115 | 152 | ||
| 116 | 153 | A workflow with `on.workflow-dispatch` gets a **Run workflow** button on the | |