GitHub Action Nodes
GitHub PR/branch/file action nodes.
GitHub action nodes let workflows create and manage pull requests, create branches, and read file contents from connected GitHub repositories. All nodes use your organization's connected GitHub OAuth or GitHub App installation - no per-node credential configuration is required.
For GitHub Issues (create/update/close/label/assign), see GitHub Issues Action Nodes.
Pull request nodes
github.pr.create
Creates a pull request in a GitHub repository.
Input ports
| Port | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner (user or org name) |
repo | string | yes | Repository name |
title | string | yes | PR title |
head | string | yes | Head branch name containing the changes |
body | string | no | PR description body (Markdown) |
base | string | no | Base branch to merge into (default: repository default branch) |
draft | boolean | no | Create as a draft PR (default: false) |
Output ports
| Port | Type | Description |
|---|---|---|
success | PullRequest | Created PR metadata |
fail | { error: string } | GitHub API error |
PullRequest shape
{
number: number
url: string // API URL
htmlUrl: string // Browser URL
title: string
}github.pr.comment
Adds a comment to an existing pull request.
Input ports
| Port | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner |
repo | string | yes | Repository name |
pullNumber | number | yes | PR number |
body | string | yes | Comment body (Markdown) |
Output ports - success ({ id: number; htmlUrl: string }) / fail ({ error: string })
github.pr.merge
Merges a pull request. Supports squash, merge, and rebase merge strategies.
Input ports
| Port | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner |
repo | string | yes | Repository name |
pullNumber | number | yes | PR number |
mergeMethod | string | no | merge, squash, or rebase (default: merge) |
commitTitle | string | no | Override merge commit title |
commitMessage | string | no | Override merge commit message |
Output ports - success ({ merged: boolean; sha: string; message: string }) / fail ({ error: string })
Branch node
github.branch.create
Creates a new branch in a GitHub repository from a given SHA or existing branch.
Input ports
| Port | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner |
repo | string | yes | Repository name |
branch | string | yes | New branch name |
sha | string | no | Commit SHA to branch from |
fromBranch | string | no | Source branch name (alternative to sha) |
Output ports - success ({ ref: string; sha: string }) / fail ({ error: string })
File node
github.file.read
Reads the contents of a file from a GitHub repository at a given ref (branch, tag, or commit SHA). Returns the decoded file content as a string.
Input ports
| Port | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner |
repo | string | yes | Repository name |
path | string | yes | File path within the repository |
ref | string | no | Branch, tag, or commit SHA (default: repository default branch) |
Output ports
| Port | Type | Description |
|---|---|---|
success | { content: string; sha: string; size: number; encoding: string } | Decoded file content |
fail | { error: string } | File not found or API error |
Condition nodes for GitHub
The following condition nodes evaluate GitHub state and are documented in Condition Nodes:
| Node ID | What it checks |
|---|---|
github.branch.exists | Whether a named branch exists in the repo |
github.pr.checks_passing | Whether all required status checks are passing on a PR |
github.pr.has_conflicts | Whether a PR has merge conflicts |
Usage example: agent-to-PR pipeline
A typical pattern in the SDLC templates connects an agent dispatch to PR creation:
steps:
- id: create_branch
type: action
nodeId: github.branch.create
config:
owner: "{{ $trigger.data.repository.owner }}"
repo: "{{ $trigger.data.repository.name }}"
branch: "agent/{{ $trigger.data.issueIdentifier }}"
fromBranch: main
- id: dispatch_dev
type: action
nodeId: agent.invoke
config:
agentRef: "agent://my-org/dev-agent"
repoPath: "{{ $trigger.data.repository.fullName }}"
- id: create_pr
type: action
nodeId: github.pr.create
config:
owner: "{{ $trigger.data.repository.owner }}"
repo: "{{ $trigger.data.repository.name }}"
title: "Agent work: {{ $trigger.data.issueIdentifier }}"
head: "agent/{{ $trigger.data.issueIdentifier }}"
base: main
draft: trueRelated pages
- GitHub Trigger Nodes -
github.push,github.pr.opened,github.pr.merged,github.check_run.completed - GitHub Issues Action Nodes - issue lifecycle, labels, assignees, comments, milestones
- Condition Nodes -
github.branch.exists,github.pr.checks_passing,github.pr.has_conflicts - GitHub Integration - OAuth, webhook setup, and required GitHub App permissions