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.
Block Preview
GitHub
Interact with GitHub
Usage
- Add the block to your workflow and connect it to the upstream step.
- Configure any required credentials or tokens in the inputs.
- Fill in required inputs and optional parameters for the run.
- Run a test execution, inspect outputs, and iterate before deploying.
- Deploy the github block with monitoring enabled in production.
Inputs (UI)
Operation
dropdownLayout: full
Options: Get PR details, Create PR comment, Get repository info, Get latest commit
Repository Owner
short-inputPlaceholder: e.g., microsoft
Layout: half
Repository Name
short-inputPlaceholder: e.g., vscode
Layout: half
Pull Request Number
short-inputPlaceholder: e.g., 123
Layout: half
Condition: operation = "github_pr"
Comment
long-inputPlaceholder: Enter comment text
Layout: full
Condition: operation = "github_comment"
Pull Request Number
short-inputPlaceholder: e.g., 123
Layout: half
Condition: operation = "github_comment"
Branch Name
short-inputPlaceholder: e.g., main (leave empty for default)
Layout: half
Condition: operation = "github_latest_commit"
GitHub Token
short-inputPlaceholder: Enter GitHub Token
Layout: full
Comment Type
dropdownLayout: half
Condition: operation = "github_comment"
Options: General PR Comment, File-specific Comment
File Path
short-inputPlaceholder: e.g., src/main.ts
Layout: half
Condition: operation = "github_comment" AND commentType = "file_comment"
Line Number
short-inputPlaceholder: e.g., 42
Layout: half
Condition: operation = "github_comment" AND commentType = "file_comment"
Inputs (API)
operation
stringRequired
owner
stringRequired
repo
stringRequired
pullNumber
numberOptional
body
stringOptional
apiKey
stringRequired
commentType
stringOptional
path
stringOptional
line
numberOptional
side
stringOptional
commitId
stringOptional
branch
stringOptional
Outputs
Primary response type:
{
"content": "string",
"metadata": "json"
}