You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/usage-guide/automations_and_usage.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,9 +147,9 @@ pr_commands = [
147
147
]
148
148
```
149
149
150
-
#### GitHub app automatic tools for push actions (commits to an open PR)
150
+
#### Automatic tools for push actions (commits to an open PR)
151
151
152
-
In addition to running automatic tools when a PR is opened, the GitHub app can also respond to new code that is pushed to an open PR.
152
+
In addition to running automatic tools when a PR is opened, PR-Agent can also respond to new code that is pushed to an open PR. This works for both **GitHub App** and **GitHub Action** deployments.
153
153
154
154
The configuration toggle `handle_push_trigger` can be used to enable this feature.
155
155
The configuration parameter `push_commands` defines the list of tools that will be **run automatically** when new code is pushed to the PR.
@@ -163,6 +163,8 @@ push_commands = [
163
163
]
164
164
```
165
165
166
+
For GitHub Action, settings fall back from `github_action_config.*` to `github_app.*`, so you can set either section.
167
+
166
168
This means that when new code is pushed to the PR, PR-Agent will run the `describe` and `review` tools, with the specified parameters.
167
169
168
170
### GitHub Action
@@ -186,6 +188,15 @@ If not set, the default configuration is for all three tools to run automaticall
186
188
187
189
`github_action_config.pr_actions`is used to configure which `pull_requests` events will trigger the enabled auto flags
188
190
If not set, the default configuration is `["opened", "reopened", "ready_for_review", "review_requested"]`
191
+
Adding `"synchronize"` to this list enables auto tools on new commits pushed to an open PR. You must also add `synchronize` to the workflow `pull_request: types:` list.
192
+
193
+
`github_action_config.handle_push_trigger`controls whether synchronize events run the push commands (default `false`). Settings fall back to `github_app.*` if not set under `github_action_config`. Since it defaults to `false`, synchronize is opt-in — you must explicitly enable it by either adding `"synchronize"` to `pr_actions` or setting `handle_push_trigger = true`.
194
+
195
+
`github_action_config.push_commands`defines which tools run on synchronize events when `handle_push_trigger` is enabled (fallback to `github_app.push_commands`).
196
+
197
+
`github_action_config.push_trigger_ignore_merge_commits`(default `true`) skips processing when the push contains a merge commit, avoiding duplicate reviews on "Update branch" clicks.
198
+
199
+
`github_action_config.push_trigger_ignore_bot_commits`(default `true`) skips processing when the push author is a bot, avoiding redundant runs on automated commits.
189
200
190
201
`github_action_config.enable_output`are used to enable/disable github actions [output parameter](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions) (default is `true`).
191
202
Review result is output as JSON to `steps.{step-id}.outputs.review` property.
0 commit comments