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
githubGitHub App installation connection or agithub_oauthordinary GitHub OAuth user connection from Settings → Connections - OAuth uses exactly
repoorpublic_repo - Required
operation - Action to perform
list_reposget_repolist_issuessearch_issuesget_issuecreate_issueupdate_issueadd_issue_labels,remove_issue_labeladd_issue_assignees,remove_issue_assigneescreate_issue_commentlist_issue_comments,get_issue_comment,update_issue_comment,delete_issue_commentlist_pull_requestsget_pull_requestget_pull_request_difflist_pull_request_files,list_pull_request_commitscreate_pull_request,update_pull_request,merge_pull_requestrequest_pull_request_reviewers,remove_pull_request_reviewerslist_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_reviewlist_comments_for_pull_request_reviewlist_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_issuesreturns both. Itstypefield selectsall,issue, orpull_request, and filters beforeoffsetandlimitso 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_requestis separate because/pulls/{number}is the only endpoint carrying the branch refs, draft flag, and merge state;update_pull_requestis separate because only a pull request has a base branch.list_pull_requestsremains the/pullslisting, 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_reviewwithouteventleaves the review pending untilsubmit_pull_request_review;delete_pending_pull_request_reviewdiscards a pending review, while a submitted one can only be dismissed.list_comments_for_pull_request_reviewlists 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:repolist_issues:reposearch_issues:queryget_issue:repo,issue_numbercreate_issue:repo,title,bodyupdate_issue:repo,issue_number,title,body,labels,assignees,milestoneadd_issue_labels:repo,issue_number,labelsremove_issue_label:repo,issue_number,labeladd_issue_assignees,remove_issue_assignees:repo,issue_number,assigneescreate_issue_comment:repo,issue_number,bodylist_issue_comments:repo,issue_number,sinceget_issue_comment,delete_issue_comment:repo,comment_idupdate_issue_comment:repo,comment_id,bodylist_pull_requests:repoget_pull_request:repo,pull_numberget_pull_request_diff,list_pull_request_files,list_pull_request_commits,list_pull_request_reviews:repo,pull_numbercreate_pull_request:repo,title,head,base,bodyupdate_pull_request:repo,pull_number,title,body,basemerge_pull_request:repo,pull_number,commit_title,commit_message,sharequest_pull_request_reviewers,remove_pull_request_reviewers:repo,pull_number,reviewers,team_reviewersget_pull_request_review,delete_pending_pull_request_review:repo,pull_number,review_idlist_comments_for_pull_request_review:repo,pull_number,review_idcreate_pull_request_review:repo,pull_number,body,commit_idupdate_pull_request_review:repo,pull_number,review_id,bodysubmit_pull_request_review:repo,pull_number,review_id,bodydismiss_pull_request_review:repo,pull_number,review_id,messagelist_pull_request_review_comments:repo,pull_number,sinceget_pull_request_review_comment,delete_pull_request_review_comment:repo,comment_idcreate_pull_request_review_comment:repo,pull_number,body,commit_id,path,line,start_linereply_to_pull_request_review_comment:repo,pull_number,comment_id,bodyupdate_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.optionslabelsassigneesmilestone
create_pull_request.optionsdraftmaintainer_can_modify
Each option entry has:
key- option namevalue- 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, default20, max100offset: zero-based result offset, default0
Finite-choice fields remain typed enum choices:
list_issues.state:open,closed,all(defaultopen)list_issues.type:all,issue,pull_request(defaultall)list_pull_requests.state:open,closed,all(defaultopen)search_issues.sort:comments,reactions,interactions,created,updated;order:asc,descupdate_issue.state,update_pull_request.state:open,closedupdate_issue.state_reason:completed,not_planned,duplicate,reopenedmerge_pull_request.merge_method:merge,squash,rebasecreate_pull_request_review.event:APPROVE,REQUEST_CHANGES,COMMENT, or unset for a pending reviewsubmit_pull_request_review.event:APPROVE,REQUEST_CHANGES,COMMENT(defaultCOMMENT)get_pull_request_diff.format:diff,patch(defaultdiff)list_pull_request_review_comments.sort:created,updated;direction:asc,desccreate_pull_request_review_comment.side,start_side:LEFT,RIGHT;subject_type:line,filecreate_pull_request.base: defaultmain
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, orreviews) pluslimit,offset,count,has_more, andnext_offset.next_offsetis the offset of the next page whilehas_moreis true, andnullat the end. search_issuesalso returnstotal_count,incomplete_results,result_limit(1000), andresults_capped. GitHub serves only the first 1000 matches of a query; whenresults_cappedis true, running out of pages does not mean every match was seen.get_pull_request_diffreturns the diff or patch text.delete_issue_commentanddelete_pull_request_review_commentreturn{ "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_toolsnode'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.
bodyfor the create, update, and reply operations is aTextBlockand 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
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection | Yes | |
operation | tagged_union | No | Operation to perform |
retry | tagged_union | No | Sends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once. |
base_config | record | No | Shared 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). |