Create Pull Request Review
github.create_pull_request_review
ActionBusiness appsconnection required
Calls POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews.
Approve, request changes on, or comment on a pull request.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- GitHub
- Secret shape
- the GitHub personal access token
- Resolved by
- config.connection_id, else node.connection_id, else the tenant's sole GitHub connection
Configuration
7 fields, 3 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
owner Repository owner — the user or organisation login. Supports {{ }}. | string | Yes | — | — | octocat |
repo Repository name, without the owner prefix. Supports {{ }}. | string | Yes | — | — | hello-world |
pull_number Pull request number as shown in the UI (not the internal id). | string | Yes | — | — | 1 |
event What the review does. Leave empty to save it as a pending draft. | string | No | — | one of "APPROVE", "REQUEST_CHANGES", "COMMENT" | — |
body Review summary. Required for REQUEST_CHANGES and COMMENT. | string | No | — | — | — |
commit_id Commit SHA being reviewed. Defaults to the PR's latest commit. | string | No | — | — | — |
comments Inline comments, e.g. [{"path": "app.py", "line": 12, "body": "typo"}]. | array | No | — | array of object | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"owner": "octocat",
"pull_number": "1",
"repo": "hello-world"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
ok True when GitHub accepted the call. | boolean | true |
review_id Id of the review that was created. | string | — |
state APPROVED, CHANGES_REQUESTED, COMMENTED or PENDING. | string | — |
html_url Link to the review. | string | — |
{
"html_url": "",
"ok": true,
"review_id": "",
"state": ""
}Notes
- A token cannot approve its own user's pull request; GitHub answers 422.
Solutions with GitHub
See Create Pull Request Review run in a workflow.
In a technical demo we add the GitHub connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.