List Pull Request Files

github.list_pull_request_files
ActionBusiness appsconnection required

Calls GET /repos/{owner}/{repo}/pulls/{pull_number}/files.

List the files a pull request changes, with per-file line counts.

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

5 fields, 3 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
pull_number
Pull request number as shown in the UI (not the internal id).
stringYes——1
include_patch
Include each file's diff hunk. Off by default because patches are large.
booleanNo———
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",
  "pull_number": "1",
  "repo": "hello-world"
}

Output

One shape.

result

FieldTypeExample
files
The files this step read.
array—
files[].filename
Path of the changed file.
string—
files[].status
added, modified, removed, renamed or copied.
string—
files[].additions
Lines added.
number—
files[].deletions
Lines removed.
number—
files[].changes
Lines added plus removed.
number—
files[].sha
Blob SHA of the file after the change.
string—
files[].blob_url
Link to the file at that commit.
string—
count
How many rows this step returned.
number—
{
  "count": 0,
  "files": [
    {
      "additions": 0,
      "blob_url": "",
      "changes": 0,
      "deletions": 0,
      "filename": "",
      "sha": "",
      "status": ""
    }
  ]
}

Notes

  • GitHub returns at most 3000 files for one pull request.

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