GitHub
Interact with GitHub or trigger workflows from GitHub events
Configuration
Get PR details
Operation
Get PR details
Repository Owner*
e.g., microsoft
Repository Name*
e.g., vscode
GitHub Token*
••••••••
Pull Request Number*
e.g., 123
Get PR details (
github_pr)Fetch PR details including diff and files changed
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
pullNumber | number | Yes | Pull request number |
apiKey | string | Yes | GitHub API token |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Human-readable PR summary |
number | number | Pull request number |
title | string | PR title |
state | string | PR state (open/closed/merged) |
html_url | string | GitHub web URL |
diff_url | string | Raw diff URL |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
filename | string | File path |
additions | number | Lines added |
deletions | number | Lines deleted |
changes | number | Total changes |
patch | string | File diff patch |
blob_url | string | GitHub blob URL |
raw_url | string | Raw file URL |
Create PR comment
Operation
Create PR comment
Repository Owner*
e.g., microsoft
Repository Name*
e.g., vscode
GitHub Token*
••••••••
Comment*
Enter comment text
Pull Request Number*
e.g., 123
Comment Type
Select...
File Path
e.g., src/main.ts
Line Number
e.g., 42
Create PR comment (
github_comment)Create comments on GitHub PRs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
body | string | Yes | Comment content |
pullNumber | number | Yes | Pull request number |
path | string | No | File path for review comment |
position | number | No | Line number for review comment |
commentType | string | No | Type of comment (pr_comment or file_comment) |
line | number | No | Line number for review comment |
side | string | No | Side of the diff (LEFT or RIGHT) |
commitId | string | No | The SHA of the commit to comment on |
apiKey | string | Yes | GitHub API token |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Human-readable comment confirmation |
Get repository info
Operation
Get repository info
Repository Owner*
e.g., microsoft
Repository Name*
e.g., vscode
GitHub Token*
••••••••
Get repository info (
github_repo_info)Retrieve comprehensive GitHub repository metadata including stars, forks, issues, and primary language. Supports both public and private repositories with optional authentication.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner (user or organization) |
repo | string | Yes | Repository name |
apiKey | string | Yes | GitHub Personal Access Token |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Human-readable repository summary |
name | string | Repository name |
description | string | Repository description |
stars | number | Number of stars |
forks | number | Number of forks |
openIssues | number | Number of open issues |
Get latest commit
Operation
Get latest commit
Repository Owner*
e.g., microsoft
Repository Name*
e.g., vscode
GitHub Token*
••••••••
Branch Name
e.g., main (leave empty for default)
Get latest commit (
github_latest_commit)Retrieve the latest commit from a GitHub repository
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner (user or organization) |
repo | string | Yes | Repository name |
branch | string | No | Branch name (defaults to the repository's default branch) |
apiKey | string | Yes | GitHub API token |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Human-readable commit summary |
Usage Instructions
Integrate Github into the workflow. Can get get PR details, create PR comment, get repository info, and get latest commit. Can be used in trigger mode to trigger a workflow when a PR is created, commented on, or a commit is pushed.
Notes
- Category:
tools - Type:
github