Blocks

GitHub

Interact with GitHub

Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow.

Back to Catalog
Toolsgithub

Block Preview

GitHub

GitHub

Interact with GitHub

Usage

  1. Add the block to your workflow and connect it to the upstream step.
  2. Configure any required credentials or tokens in the inputs.
  3. Fill in required inputs and optional parameters for the run.
  4. Run a test execution, inspect outputs, and iterate before deploying.
  5. Deploy the github block with monitoring enabled in production.

Inputs (UI)

Operation

dropdown

Layout: full

Options: Get PR details, Create PR comment, Get repository info, Get latest commit

Repository Owner

short-input

Placeholder: e.g., microsoft

Layout: half

Repository Name

short-input

Placeholder: e.g., vscode

Layout: half

Pull Request Number

short-input

Placeholder: e.g., 123

Layout: half

Condition: operation = "github_pr"

Comment

long-input

Placeholder: Enter comment text

Layout: full

Condition: operation = "github_comment"

Pull Request Number

short-input

Placeholder: e.g., 123

Layout: half

Condition: operation = "github_comment"

Branch Name

short-input

Placeholder: e.g., main (leave empty for default)

Layout: half

Condition: operation = "github_latest_commit"

GitHub Token

short-input

Placeholder: Enter GitHub Token

Layout: full

Comment Type

dropdown

Layout: half

Condition: operation = "github_comment"

Options: General PR Comment, File-specific Comment

File Path

short-input

Placeholder: e.g., src/main.ts

Layout: half

Condition: operation = "github_comment" AND commentType = "file_comment"

Line Number

short-input

Placeholder: e.g., 42

Layout: half

Condition: operation = "github_comment" AND commentType = "file_comment"

Inputs (API)

operation

string

Required

owner

string

Required

repo

string

Required

pullNumber

number

Optional

body

string

Optional

apiKey

string

Required

commentType

string

Optional

path

string

Optional

line

number

Optional

side

string

Optional

commitId

string

Optional

branch

string

Optional

Outputs

Primary response type:

{
  "content": "string",
  "metadata": "json"
}

Tool Access

github_prgithub_commentgithub_repo_infogithub_latest_commit
GitHub | NowFlow Blocks