Get Pull Request
github.get_pull_request
ActionBusiness appsconnection required
Calls the GitHub API GET /repos/{owner}/{repo}/pulls/{pull_number}.
Read one pull request, including its merge state and branches.
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
3 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 |
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
- mergeable is null for a short while after a push, until GitHub finishes computing it — read it again if you need a definite answer.
Solutions with GitHub
See Get 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.