Update Pull Request
github.update_pull_request
ActionBusiness appsconnection required
Calls the GitHub API PATCH /repos/{owner}/{repo}/pulls/{pull_number}.
Change a pull request's title, body, target branch or state.
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
8 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 |
title New pull request title. | string | No | — | — | — |
body New description (Markdown). | string | No | — | — | — |
state Set to closed to close the pull request, or open to reopen it. | string | No | — | one of "open", "closed" | — |
base Retarget the pull request at this branch. | string | No | — | — | — |
maintainer_can_modify Let maintainers push to the fork's branch. | boolean | No | — | — | — |
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
The declared fields, plus the rest of the resource as GitHub returned it.
Extra keys beyond the ones listed can appear.
| Field | Type | Example |
|---|---|---|
ok True when GitHub accepted the call. | boolean | true |
number Pull request number as shown in the UI. | number | — |
title Pull request title. | string | — |
state open or closed. | string | — |
draft True while the PR is a draft. | boolean | — |
merged True once the PR has been merged. | boolean | — |
mergeable GitHub's mergeability verdict, or null while it computes. | boolean | — |
html_url Link to the pull request. | string | — |
{
"draft": false,
"html_url": "",
"mergeable": false,
"merged": false,
"number": 0,
"ok": true,
"state": "",
"title": ""
}Notes
- Closing a pull request is a state change here; GitHub has no delete endpoint for one.
- At least one changeable field must be set, or the step fails before it calls.
Solutions with GitHub
See Update Pull Request 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.