Type ID: github · Kind: Action · Ports: 1 in, 1 out
List, inspect, and manage GitHub pull requests, branches, and issues via the GitHub REST API.
Credentials
GitHub
Three credential types are supported interchangeably: Personal Access Token, OAuth App, and GitHub App.
Resources & operations
- Pull Request (
pullRequest)
- List (
list) - List pull requests in a repository.
- Get (
get) - Get a single pull request.
- Create (
create) - Open a new pull request.
- Close (
close) - Close a pull request.
- Merge (
merge) - Merge a pull request.
- List Comments (
listComments) - List comments on a pull request.
- Create Comment (
createComment) - Post a comment on a pull request.
- Branch (
branch)
- List (
list) - List branches in a repository.
- Get (
get) - Get a single branch.
- Delete (
delete) - Delete a branch.
- Issue (
issue)
- Create (
create) - Create a new issue.
- List (
list) - List issues in a repository.
- Get (
get) - Get a single issue.
- Update (
update) - Update an existing issue.
- Close (
close) - Close an issue.
Properties
Common
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Resource | resource | options | Yes | pullRequest | Pull Request (pullRequest), Branch (branch), Issue (issue) | - |
| Operation | operation | options | Yes | list | List (list), Get (get), Create (create), Close (close), Merge (merge), List Comments (listComments), Create Comment (createComment) | resource = pullRequest |
| Operation | operation | options | Yes | list | List (list), Get (get), Delete (delete) | resource = branch |
| Operation | operation | options | Yes | create | Create (create), List (list), Get (get), Update (update), Close (close) | resource = issue |
Pull Request → List
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner (user or organization) | resource = pullRequest, operation = list |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = list |
| State | state | options | No | open | Open (open), Closed (closed), All (all) | resource = pullRequest, operation = list |
| Limit | limit | number | Yes | 100 | Max results to return (capped at 1000). GitHub is queried a page at a time until this is met. | resource = pullRequest, operation = list |
| Output | output | options | No | raw | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = pullRequest, operation = list |
| Fields | fields | checkbox | Yes | [] | id, number, title, state, body, user, base, head, draft, merged, mergeable, merged_at, requested_reviewers, labels, assignees, created_at, updated_at, closed_at, html_url | resource = pullRequest, operation = list, output = fields |
Output defaults to Raw for this operation (not Simplified, unlike every other list/get operation below) — this preserves the exact response shape workflows built before pagination and Output support were added already depend on.
Pull Request → Get
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = get |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = get |
| Pull Request Number | pullNumber | number | Yes | 0 | The pull request's number | resource = pullRequest, operation = get |
| Output | output | options | No | simple | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = pullRequest, operation = get |
| Fields | fields | checkbox | Yes | [] | Same field list as Pull Request → List | resource = pullRequest, operation = get, output = fields |
Pull Request → Create
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = create |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = create |
| Title | title | string | Yes | '' | Pull request title | resource = pullRequest, operation = create |
| Head Branch | head | string | Yes | '' | Branch containing the changes (e.g. feature-branch or owner:feature-branch) | resource = pullRequest, operation = create |
| Base Branch | base | string | Yes | '' | Branch to merge into (e.g. main) | resource = pullRequest, operation = create |
| Body | body | string | No | '' | Pull request description | resource = pullRequest, operation = create |
| Draft | draft | boolean | No | false | true / false | resource = pullRequest, operation = create |
Pull Request → Close
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = close |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = close |
| Pull Request Number | pullNumber | number | Yes | 0 | The pull request's number | resource = pullRequest, operation = close |
Pull Request → Merge
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = merge |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = merge |
| Pull Request Number | pullNumber | number | Yes | 0 | The pull request's number | resource = pullRequest, operation = merge |
| Merge Method | mergeMethod | options | No | merge | Merge Commit (merge), Squash (squash), Rebase (rebase) | resource = pullRequest, operation = merge |
| Commit Title | commitTitle | string | No | '' | Leave blank to use GitHub's default title for the chosen merge method | resource = pullRequest, operation = merge |
| Commit Message | commitMessage | string | No | '' | Leave blank to use GitHub's default message for the chosen merge method | resource = pullRequest, operation = merge |
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = listComments |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = listComments |
| Pull Request Number | pullNumber | number | Yes | 0 | The pull request's number | resource = pullRequest, operation = listComments |
| Limit | limit | number | Yes | 100 | Max comments to return (capped at 1000) | resource = pullRequest, operation = listComments |
| Output | output | options | No | simple | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = pullRequest, operation = listComments |
| Fields | fields | checkbox | Yes | [] | id, body, user, created_at, updated_at, html_url | resource = pullRequest, operation = listComments, output = fields |
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = pullRequest, operation = createComment |
| Repository | repo | string | Yes | '' | Repository name | resource = pullRequest, operation = createComment |
| Pull Request Number | pullNumber | number | Yes | 0 | The pull request's number | resource = pullRequest, operation = createComment |
| Comment Body | body | string | Yes | '' | The comment text | resource = pullRequest, operation = createComment |
Branch → List
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = branch, operation = list |
| Repository | repo | string | Yes | '' | Repository name | resource = branch, operation = list |
| Limit | limit | number | Yes | 100 | Max results to return (capped at 1000) | resource = branch, operation = list |
| Output | output | options | No | raw | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = branch, operation = list |
| Fields | fields | checkbox | Yes | [] | name, commit, protected, protection | resource = branch, operation = list, output = fields |
Output defaults to Raw here too, for the same backward-compatibility reason as Pull Request → List.
Branch → Get
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = branch, operation = get |
| Repository | repo | string | Yes | '' | Repository name | resource = branch, operation = get |
| Branch Name | branch | string | Yes | '' | Branch names containing / (e.g. feature/foo) are supported | resource = branch, operation = get |
| Output | output | options | No | simple | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = branch, operation = get |
| Fields | fields | checkbox | Yes | [] | Same field list as Branch → List | resource = branch, operation = get, output = fields |
Branch → Delete
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = branch, operation = delete |
| Repository | repo | string | Yes | '' | Repository name | resource = branch, operation = delete |
| Branch Name | branch | string | Yes | '' | Name of the branch to delete | resource = branch, operation = delete |
Issue → Create
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = issue, operation = create |
| Repository | repo | string | Yes | '' | Repository name | resource = issue, operation = create |
| Title | title | string | Yes | '' | Issue title | resource = issue, operation = create |
| Body | body | string | No | '' | Issue description | resource = issue, operation = create |
| Labels | labels | string | No | '' | Comma-separated label names (e.g. bug, urgent) | resource = issue, operation = create |
| Assignees | assignees | string | No | '' | Comma-separated GitHub usernames | resource = issue, operation = create |
Issue → List
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = issue, operation = list |
| Repository | repo | string | Yes | '' | Repository name | resource = issue, operation = list |
| State | state | options | No | open | Open (open), Closed (closed), All (all) | resource = issue, operation = list |
| Limit | limit | number | Yes | 100 | Max results to return (capped at 1000) | resource = issue, operation = list |
| Output | output | options | No | simple | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = issue, operation = list |
| Fields | fields | checkbox | Yes | [] | id, number, title, state, body, user, labels, assignees, milestone, comments, locked, created_at, updated_at, closed_at, html_url | resource = issue, operation = list, output = fields |
GitHub's issues endpoint also returns pull requests; this operation filters those out while paging, so Limit always refers to actual issues, never a mix of issues and pull requests.
Issue → Get
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = issue, operation = get |
| Repository | repo | string | Yes | '' | Repository name | resource = issue, operation = get |
| Issue Number | issueNumber | number | Yes | 0 | The issue's number | resource = issue, operation = get |
| Output | output | options | No | simple | Simplified (simple), Raw (raw), Select Included Fields (fields) | resource = issue, operation = get |
| Fields | fields | checkbox | Yes | [] | Same field list as Issue → List | resource = issue, operation = get, output = fields |
Issue → Update
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = issue, operation = update |
| Repository | repo | string | Yes | '' | Repository name | resource = issue, operation = update |
| Issue Number | issueNumber | number | Yes | 0 | The issue's number | resource = issue, operation = update |
| Title | title | string | No | '' | Leave blank to keep the current title | resource = issue, operation = update |
| Body | body | string | No | '' | Leave blank to keep the current body | resource = issue, operation = update |
| State | state | options | No | noChange | No Change (noChange), Open (open), Closed (closed) | resource = issue, operation = update |
| Labels | labels | string | No | '' | Comma-separated label names. Replaces all existing labels. Leave blank to keep current labels, unless Clear Labels is on. | resource = issue, operation = update |
| Clear Labels | clearLabels | boolean | No | false | Remove all labels. Overrides the Labels field above. | resource = issue, operation = update |
| Assignees | assignees | string | No | '' | Comma-separated GitHub usernames. Replaces all existing assignees. Leave blank to keep current assignees, unless Clear Assignees is on. | resource = issue, operation = update |
| Clear Assignees | clearAssignees | boolean | No | false | Remove all assignees. Overrides the Assignees field above. | resource = issue, operation = update |
There's no way to distinguish "leave unchanged" from "explicitly clear" for a blank Labels/Assignees field — the Clear Labels / Clear Assignees toggles are the only way to remove everything.
Issue → Close
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|
| Owner | owner | string | Yes | '' | Repository owner | resource = issue, operation = close |
| Repository | repo | string | Yes | '' | Repository name | resource = issue, operation = close |
| Issue Number | issueNumber | number | Yes | 0 | The issue's number | resource = issue, operation = close |
Notes
- Pagination: List operations (Pull Request → List, Branch → List, Issue → List) and Pull Request → List Comments page through GitHub automatically, up to Limit (max 1000). The response always includes
truncated (boolean) and truncationReason (limit_reached, rate_limited, or null) — check these rather than assuming a returned list is complete. rate_limited means GitHub's remaining rate limit dropped low mid-fetch and the operation stopped early with a partial, still-valid result rather than failing outright.
- Output modes: Simplified returns a small common field set; Raw returns GitHub's full object untouched; Select Included Fields lets you pick exactly which fields to keep. Pull Request → List and Branch → List default to Raw specifically (not Simplified, unlike every other operation here) to preserve the response shape existing workflows already depend on. Exact fields per mode, by resource — for what each field actually contains, see GitHub's own REST API reference, linked below. Raw always returns every field GitHub's API includes for that object, which can grow over time; Simplified and Select Included Fields are limited to the fields listed here.
- Pull Request — reference: docs.github.com/en/rest/pulls/pulls
- Simplified:
number, title, state, html_url, user (login only), created_at, updated_at
- Select Included Fields (available to pick):
id, number, title, state, body, user, base, head, draft, merged, mergeable, merged_at, requested_reviewers, labels, assignees, created_at, updated_at, closed_at, html_url
- Issue — reference: docs.github.com/en/rest/issues/issues
- Simplified:
number, title, state, html_url, user (login only), created_at, updated_at
- Select Included Fields (available to pick):
id, number, title, state, body, user, labels, assignees, milestone, comments, locked, created_at, updated_at, closed_at, html_url
- Branch — reference: docs.github.com/en/rest/branches/branches
- Simplified:
name, sha (from commit.sha), protected
- Select Included Fields (available to pick):
name, commit, protected, protection
- Pull Request Comment (List Comments) — reference: docs.github.com/en/rest/issues/comments
- Simplified:
id, body, user (login only), created_at, html_url
- Select Included Fields (available to pick):
id, body, user, created_at, updated_at, html_url
- Pull request comments use GitHub's issue comments API under the hood (
/issues/{number}/comments) — GitHub has no separate pull-request-specific comments endpoint, since every pull request is also an issue.
- Merge defaults to a plain merge commit (
merge_method: merge) if left unset, matching GitHub's own API default.
- Branch Get and branch Delete encode branch names differently on purpose: Get treats the branch name as one opaque segment (so
feature/foo becomes feature%2Ffoo), while Delete builds a hierarchical git ref path where / is a literal, required separator (so feature/foo stays as heads/feature/foo) — these follow the two different GitHub endpoints' own requirements.
- Output for Close (pull request):
{ closed: true, pullRequest: {...} }. For Close (issue): { closed: true, issue: {...} }.
- Output for Create (pull request):
{ created: true, pullRequest: {...} }. For Create (issue): { created: true, issue: {...} }.
- Output for Merge:
{ merged: true|false, sha, message, result } — merged: false is returned (not thrown) when GitHub reports the pull request isn't mergeable.
- Output for List Comments:
{ count, comments: [...], truncated, truncationReason }. For Create Comment: { created: true, comment: {...} }.
- Output for branch Delete:
{ deleted: true, branch: '<name>' }.
- Output for Update (issue):
{ updated: true, issue: {...} }.