List Pull Requests

github.list_pull_requests
ActionBusiness appsconnection required

Calls the GitHub API GET /repos/{owner}/{repo}/pulls.

List a repository's pull requests, filtered by state or branch.

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, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
owner
Repository owner — the user or organisation login. Supports {{ }}.
stringYes——octocat
repo
Repository name, without the owner prefix. Supports {{ }}.
stringYes——hello-world
state
Which pull requests to include.
stringNoopenone of "open", "closed", "all"—
head
Filter by source branch, as user:branch or org:branch.
stringNo———
base
Filter by target branch name.
stringNo———
sort
Field to sort by.
stringNo—one of "created", "updated", "popularity", "long-running"—
direction
Sort direction.
stringNo—one of "asc", "desc"—
max_items
Stop after this many rows; further pages are followed via the Link header.
numberNo1001–1000—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "max_items": 100,
  "owner": "octocat",
  "repo": "hello-world",
  "state": "open"
}

Output

One shape.

result

FieldTypeExample
pull_requests
The pull requests this step read.
array—
pull_requests[].number
Pull request number.
number—
pull_requests[].title
Pull request title.
string—
pull_requests[].state
open or closed.
string—
pull_requests[].draft
True while the PR is a draft.
boolean—
pull_requests[].html_url
Link to the pull request.
string—
pull_requests[].head_ref
Source branch.
string—
pull_requests[].base_ref
Target branch.
string—
pull_requests[].user_login
Who opened it.
string—
count
How many rows this step returned.
number—
{
  "count": 0,
  "pull_requests": [
    {
      "base_ref": "",
      "draft": false,
      "head_ref": "",
      "html_url": "",
      "number": 0,
      "state": "",
      "title": "",
      "user_login": ""
    }
  ]
}

See List Pull Requests 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.