Skip to main content

GitHub

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​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
ResourceresourceoptionsYespullRequestPull Request (pullRequest), Branch (branch), Issue (issue)-
OperationoperationoptionsYeslistList (list), Get (get), Create (create), Close (close), Merge (merge), List Comments (listComments), Create Comment (createComment)resource = pullRequest
OperationoperationoptionsYeslistList (list), Get (get), Delete (delete)resource = branch
OperationoperationoptionsYescreateCreate (create), List (list), Get (get), Update (update), Close (close)resource = issue

Pull Request → List​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository owner (user or organization)resource = pullRequest, operation = list
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = list
StatestateoptionsNoopenOpen (open), Closed (closed), All (all)resource = pullRequest, operation = list
LimitlimitnumberYes100Max results to return (capped at 1000). GitHub is queried a page at a time until this is met.resource = pullRequest, operation = list
OutputoutputoptionsNorawSimplified (simple), Raw (raw), Select Included Fields (fields)resource = pullRequest, operation = list
FieldsfieldscheckboxYes[]id, number, title, state, body, user, base, head, draft, merged, mergeable, merged_at, requested_reviewers, labels, assignees, created_at, updated_at, closed_at, html_urlresource = 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​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = get
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = get
Pull Request NumberpullNumbernumberYes0The pull request's numberresource = pullRequest, operation = get
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = pullRequest, operation = get
FieldsfieldscheckboxYes[]Same field list as Pull Request → Listresource = pullRequest, operation = get, output = fields

Pull Request → Create​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = create
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = create
TitletitlestringYes''Pull request titleresource = pullRequest, operation = create
Head BranchheadstringYes''Branch containing the changes (e.g. feature-branch or owner:feature-branch)resource = pullRequest, operation = create
Base BranchbasestringYes''Branch to merge into (e.g. main)resource = pullRequest, operation = create
BodybodystringNo''Pull request descriptionresource = pullRequest, operation = create
DraftdraftbooleanNofalsetrue / falseresource = pullRequest, operation = create

Pull Request → Close​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = close
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = close
Pull Request NumberpullNumbernumberYes0The pull request's numberresource = pullRequest, operation = close

Pull Request → Merge​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = merge
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = merge
Pull Request NumberpullNumbernumberYes0The pull request's numberresource = pullRequest, operation = merge
Merge MethodmergeMethodoptionsNomergeMerge Commit (merge), Squash (squash), Rebase (rebase)resource = pullRequest, operation = merge
Commit TitlecommitTitlestringNo''Leave blank to use GitHub's default title for the chosen merge methodresource = pullRequest, operation = merge
Commit MessagecommitMessagestringNo''Leave blank to use GitHub's default message for the chosen merge methodresource = pullRequest, operation = merge

Pull Request → List Comments​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = listComments
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = listComments
Pull Request NumberpullNumbernumberYes0The pull request's numberresource = pullRequest, operation = listComments
LimitlimitnumberYes100Max comments to return (capped at 1000)resource = pullRequest, operation = listComments
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = pullRequest, operation = listComments
FieldsfieldscheckboxYes[]id, body, user, created_at, updated_at, html_urlresource = pullRequest, operation = listComments, output = fields

Pull Request → Create Comment​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = pullRequest, operation = createComment
RepositoryrepostringYes''Repository nameresource = pullRequest, operation = createComment
Pull Request NumberpullNumbernumberYes0The pull request's numberresource = pullRequest, operation = createComment
Comment BodybodystringYes''The comment textresource = pullRequest, operation = createComment

Branch → List​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = branch, operation = list
RepositoryrepostringYes''Repository nameresource = branch, operation = list
LimitlimitnumberYes100Max results to return (capped at 1000)resource = branch, operation = list
OutputoutputoptionsNorawSimplified (simple), Raw (raw), Select Included Fields (fields)resource = branch, operation = list
FieldsfieldscheckboxYes[]name, commit, protected, protectionresource = branch, operation = list, output = fields

Output defaults to Raw here too, for the same backward-compatibility reason as Pull Request → List.

Branch → Get​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = branch, operation = get
RepositoryrepostringYes''Repository nameresource = branch, operation = get
Branch NamebranchstringYes''Branch names containing / (e.g. feature/foo) are supportedresource = branch, operation = get
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = branch, operation = get
FieldsfieldscheckboxYes[]Same field list as Branch → Listresource = branch, operation = get, output = fields

Branch → Delete​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = branch, operation = delete
RepositoryrepostringYes''Repository nameresource = branch, operation = delete
Branch NamebranchstringYes''Name of the branch to deleteresource = branch, operation = delete

Issue → Create​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = issue, operation = create
RepositoryrepostringYes''Repository nameresource = issue, operation = create
TitletitlestringYes''Issue titleresource = issue, operation = create
BodybodystringNo''Issue descriptionresource = issue, operation = create
LabelslabelsstringNo''Comma-separated label names (e.g. bug, urgent)resource = issue, operation = create
AssigneesassigneesstringNo''Comma-separated GitHub usernamesresource = issue, operation = create

Issue → List​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = issue, operation = list
RepositoryrepostringYes''Repository nameresource = issue, operation = list
StatestateoptionsNoopenOpen (open), Closed (closed), All (all)resource = issue, operation = list
LimitlimitnumberYes100Max results to return (capped at 1000)resource = issue, operation = list
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = issue, operation = list
FieldsfieldscheckboxYes[]id, number, title, state, body, user, labels, assignees, milestone, comments, locked, created_at, updated_at, closed_at, html_urlresource = 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​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = issue, operation = get
RepositoryrepostringYes''Repository nameresource = issue, operation = get
Issue NumberissueNumbernumberYes0The issue's numberresource = issue, operation = get
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = issue, operation = get
FieldsfieldscheckboxYes[]Same field list as Issue → Listresource = issue, operation = get, output = fields

Issue → Update​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = issue, operation = update
RepositoryrepostringYes''Repository nameresource = issue, operation = update
Issue NumberissueNumbernumberYes0The issue's numberresource = issue, operation = update
TitletitlestringNo''Leave blank to keep the current titleresource = issue, operation = update
BodybodystringNo''Leave blank to keep the current bodyresource = issue, operation = update
StatestateoptionsNonoChangeNo Change (noChange), Open (open), Closed (closed)resource = issue, operation = update
LabelslabelsstringNo''Comma-separated label names. Replaces all existing labels. Leave blank to keep current labels, unless Clear Labels is on.resource = issue, operation = update
Clear LabelsclearLabelsbooleanNofalseRemove all labels. Overrides the Labels field above.resource = issue, operation = update
AssigneesassigneesstringNo''Comma-separated GitHub usernames. Replaces all existing assignees. Leave blank to keep current assignees, unless Clear Assignees is on.resource = issue, operation = update
Clear AssigneesclearAssigneesbooleanNofalseRemove 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​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
OwnerownerstringYes''Repository ownerresource = issue, operation = close
RepositoryrepostringYes''Repository nameresource = issue, operation = close
Issue NumberissueNumbernumberYes0The issue's numberresource = 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: {...} }.