Contents

GitHub

github · Nodes · Providers

Runs GitHub provider operations.

GitHub#

List, search, read, and manage repositories, issues, pull requests, their conversation comments, and their code reviews from workflows.

When to Use#

  • Creating, updating, labelling, assigning, or closing GitHub issues/PRs from workflow output
  • Posting, editing, or deleting conversation comments, such as Jira or support-ticket links
  • Reviewing pull requests: reviews, inline review comments, replies, dismissals
  • Merging pull requests and requesting reviewers
  • Listing or searching repos, issues, PRs, comments, reviews, files, and commits for downstream automation, or fetching one by number or id
  • Driving GitHub actions from human-facing workflow data

Configuration#

connection - GitHub connection to use

  • Select either a github GitHub App installation connection or a github_oauth ordinary GitHub OAuth user connection from Settings → Connections
  • OAuth uses exactly repo or public_repo
  • Required

operation - Action to perform

  • list_repos
  • get_repo
  • list_issues
  • search_issues
  • get_issue
  • create_issue
  • update_issue
  • add_issue_labels, remove_issue_label
  • add_issue_assignees, remove_issue_assignees
  • create_issue_comment
  • list_issue_comments, get_issue_comment, update_issue_comment, delete_issue_comment
  • list_pull_requests
  • get_pull_request
  • get_pull_request_diff
  • list_pull_request_files, list_pull_request_commits
  • create_pull_request, update_pull_request, merge_pull_request
  • request_pull_request_reviewers, remove_pull_request_reviewers
  • list_pull_request_reviews, get_pull_request_review, create_pull_request_review, update_pull_request_review, submit_pull_request_review, dismiss_pull_request_review, delete_pending_pull_request_review
  • list_comments_for_pull_request_review
  • list_pull_request_review_comments, get_pull_request_review_comment, create_pull_request_review_comment, reply_to_pull_request_review_comment, update_pull_request_review_comment, delete_pull_request_review_comment

Repository-scoped operation variants (get_repo, issue operations, and pull-request operations) contain an optional owner field. A trimmed explicit owner wins; otherwise github uses the App installation account login and github_oauth uses the verified user login. list_repos has no owner field: it lists /installation/repositories for github or /user/repos for github_oauth. search_issues has none either: its query names repositories with qualifiers.

Issues and pull requests share one number space#

GitHub's /issues endpoint returns issues and pull requests together, and numbers them in one sequence. The operations follow that shape:

  • list_issues returns both. Its type field selects all, issue, or pull_request, and filters before offset and limit so a filtered page is a full page.
  • get_issue, update_issue, the label and assignee operations, and the conversation comment operations take either kind's number.
  • get_pull_request is separate because /pulls/{number} is the only endpoint carrying the branch refs, draft flag, and merge state; update_pull_request is separate because only a pull request has a base branch.
  • list_pull_requests remains the /pulls listing, whose items carry those pull-request fields.

Conversation comments, reviews, and review comments are different resources#

  • Conversation comments (*_issue_comment) sit on the timeline and are addressed under /issues/comments/{comment_id}.
  • Reviews (*_pull_request_review) are a verdict with a summary. create_pull_request_review without event leaves the review pending until submit_pull_request_review; delete_pending_pull_request_review discards a pending review, while a submitted one can only be dismissed. list_comments_for_pull_request_review lists the inline comments one review made.
  • Review comments (*_pull_request_review_comment) are anchored to a file and line of the diff and addressed under /pulls/comments/{comment_id}. A conversation comment id is not a review comment id.

Interpolation support#

String fields in operations support MiniJinja interpolation from workflow input context, such as {{ input.repo }}.

Interpolatable fields:

  • get_repo: repo
  • list_issues: repo
  • search_issues: query
  • get_issue: repo, issue_number
  • create_issue: repo, title, body
  • update_issue: repo, issue_number, title, body, labels, assignees, milestone
  • add_issue_labels: repo, issue_number, labels
  • remove_issue_label: repo, issue_number, label
  • add_issue_assignees, remove_issue_assignees: repo, issue_number, assignees
  • create_issue_comment: repo, issue_number, body
  • list_issue_comments: repo, issue_number, since
  • get_issue_comment, delete_issue_comment: repo, comment_id
  • update_issue_comment: repo, comment_id, body
  • list_pull_requests: repo
  • get_pull_request: repo, pull_number
  • get_pull_request_diff, list_pull_request_files, list_pull_request_commits, list_pull_request_reviews: repo, pull_number
  • create_pull_request: repo, title, head, base, body
  • update_pull_request: repo, pull_number, title, body, base
  • merge_pull_request: repo, pull_number, commit_title, commit_message, sha
  • request_pull_request_reviewers, remove_pull_request_reviewers: repo, pull_number, reviewers, team_reviewers
  • get_pull_request_review, delete_pending_pull_request_review: repo, pull_number, review_id
  • list_comments_for_pull_request_review: repo, pull_number, review_id
  • create_pull_request_review: repo, pull_number, body, commit_id
  • update_pull_request_review: repo, pull_number, review_id, body
  • submit_pull_request_review: repo, pull_number, review_id, body
  • dismiss_pull_request_review: repo, pull_number, review_id, message
  • list_pull_request_review_comments: repo, pull_number, since
  • get_pull_request_review_comment, delete_pull_request_review_comment: repo, comment_id
  • create_pull_request_review_comment: repo, pull_number, body, commit_id, path, line, start_line
  • reply_to_pull_request_review_comment: repo, pull_number, comment_id, body
  • update_pull_request_review_comment: repo, comment_id, body

Numeric fields (issue_number, pull_number, comment_id, review_id, milestone, line, start_line) must render as a whole number. Comma-separated fields (labels, assignees, reviewers, team_reviewers) drop blank entries.

Update operations change only what is set. A blank text field leaves GitHub's value as it is; update_issue.labels and assignees replace the whole set when given, and clear_labels, clear_assignees, and clear_milestone empty a field. Setting a field and its clear flag together is an error, as is an update that changes nothing.

create_pull_request_review.comments is a list of inline comments, each with path, body, line, and optional side (LEFT or RIGHT), start_line, and start_side. path, body, line, and start_line interpolate like any other field, and a comment's error names it, as in comments[0].line.

Advanced optional request modifiers live under an options list:

  • create_issue.options
    • labels
    • assignees
    • milestone
  • create_pull_request.options
    • draft
    • maintainer_can_modify

Each option entry has:

  • key - option name
  • value - text value (supports interpolation)
  • Blank entries are skipped and duplicate keys use the last entry

List operations support pagination fields:

  • limit: max results to return, default 20, max 100
  • offset: zero-based result offset, default 0

Finite-choice fields remain typed enum choices:

  • list_issues.state: open, closed, all (default open)
  • list_issues.type: all, issue, pull_request (default all)
  • list_pull_requests.state: open, closed, all (default open)
  • search_issues.sort: comments, reactions, interactions, created, updated; order: asc, desc
  • update_issue.state, update_pull_request.state: open, closed
  • update_issue.state_reason: completed, not_planned, duplicate, reopened
  • merge_pull_request.merge_method: merge, squash, rebase
  • create_pull_request_review.event: APPROVE, REQUEST_CHANGES, COMMENT, or unset for a pending review
  • submit_pull_request_review.event: APPROVE, REQUEST_CHANGES, COMMENT (default COMMENT)
  • get_pull_request_diff.format: diff, patch (default diff)
  • list_pull_request_review_comments.sort: created, updated; direction: asc, desc
  • create_pull_request_review_comment.side, start_side: LEFT, RIGHT; subject_type: line, file
  • create_pull_request.base: default main

search_issues always uses GitHub's advanced search syntax. Some connections must include is:issue or is:pr, GitHub returns at most 1000 results per query, and it allows about 30 searches a minute.

retry - Whether each GitHub request is sent again after a failure that passes: a rate limit, a busy server, a dropped connection. Off by default; see Retries. Requests are judged by method: GET reads (the list_*, get_* and search_issues operations) and PUT and DELETE requests are sent again freely; POST and PATCH writes are sent again only when GitHub refused them before acting: the connection never opened, or GitHub answered 425 or 429.

Inputs#

input - Any input

  • Used to trigger execution
  • Available as template context for interpolated fields ({{ input.* }})

Outputs#

output - GitHub API response

  • List operations return an object with the item field (repositories, issues, pull_requests, items, comments, files, commits, or reviews) plus limit, offset, count, has_more, and next_offset. next_offset is the offset of the next page while has_more is true, and null at the end.
  • search_issues also returns total_count, incomplete_results, result_limit (1000), and results_capped. GitHub serves only the first 1000 matches of a query; when results_capped is true, running out of pages does not mean every match was seen.
  • get_pull_request_diff returns the diff or patch text.
  • delete_issue_comment and delete_pull_request_review_comment return { "deleted": true, "comment_id": <id> }, since GitHub answers a delete with no body.
  • Other read/write single-resource operations return the GitHub API response object.
  • This node emits the GitHub API response as-is, for workflow wiring. The github_tools node's agent tools return bounded projections instead, because a model pays for every byte it is handed.

Examples#

List only open pull requests out of the unified issue listing:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "list_issues",
    "repo": { "content": "{{ input.repo }}" },
    "state": "open",
    "type": "pull_request",
    "limit": 20,
    "offset": 0
  }
}

Fetch one issue or pull request by number:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "get_issue",
    "repo": { "content": "{{ input.repo }}" },
    "issue_number": { "content": "{{ input.number }}" }
  }
}

Create issue from workflow input:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "create_issue",
    "owner": { "content": "{{ input.owner }}" },
    "repo": { "content": "{{ input.repo }}" },
    "title": { "content": "{{ input.title }}" },
    "body": { "content": "{{ input.body }}" },
    "options": [
      { "key": "labels", "value": { "type": "inline", "content": "bug,docs" } }
    ]
  }
}

Post Jira link on an issue:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "create_issue_comment",
    "repo": { "content": "{{ input.repo }}" },
    "issue_number": { "content": "{{ input.issue_number }}" },
    "body": { "content": "Jira: {{ input.jira_url }}" }
  }
}

Close an issue as not planned:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "update_issue",
    "repo": { "content": "{{ input.repo }}" },
    "issue_number": { "content": "{{ input.number }}" },
    "state": "closed",
    "state_reason": "not_planned"
  }
}

Reply in a review comment thread:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "reply_to_pull_request_review_comment",
    "repo": { "content": "{{ input.repo }}" },
    "pull_number": { "content": "{{ input.pull_number }}" },
    "comment_id": { "content": "{{ input.comment_id }}" },
    "body": { "content": "Fixed in {{ input.sha }}." }
  }
}

Create pull request:

{
  "connection": "<GitHub connection ULID>",
  "operation": {
    "op": "create_pull_request",
    "repo": { "content": "{{ input.repo }}" },
    "title": { "content": "{{ input.title }}" },
    "head": { "content": "{{ input.head_branch }}" },
    "base": { "content": "main" },
    "body": { "content": "{{ input.pr_body }}" }
  }
}

Tips#

  • Select a valid GitHub connection before running.
  • The connection selects the GitHub user or organization owner.
  • This node manages issues, comments, pull requests, and reviews, and can merge a pull request. It does not commit code or edit repository files.
  • body for the create, update, and reply operations is a TextBlock and supports multiline content.
  • If GitHub refuses a request, the node fails with the status and GitHub's own explanation, such as a missing permission or why a pull request cannot merge.

Inputs

  • inputRequired

Outputs

  • output

Configuration

FieldTypeRequiredDescription
connectionconnectionYes
operationtagged_unionNoOperation to perform
retrytagged_unionNoSends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once.
base_configrecordNoShared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow).