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
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPull request number
apiKeystringYesGitHub API token
Output
ParameterTypeDescription
contentstringHuman-readable PR summary
numbernumberPull request number
titlestringPR title
statestringPR state (open/closed/merged)
html_urlstringGitHub web URL
diff_urlstringRaw diff URL
created_atstringCreation timestamp
updated_atstringLast update timestamp
filenamestringFile path
additionsnumberLines added
deletionsnumberLines deleted
changesnumberTotal changes
patchstringFile diff patch
blob_urlstringGitHub blob URL
raw_urlstringRaw 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
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
bodystringYesComment content
pullNumbernumberYesPull request number
pathstringNoFile path for review comment
positionnumberNoLine number for review comment
commentTypestringNoType of comment (pr_comment or file_comment)
linenumberNoLine number for review comment
sidestringNoSide of the diff (LEFT or RIGHT)
commitIdstringNoThe SHA of the commit to comment on
apiKeystringYesGitHub API token
Output
ParameterTypeDescription
contentstringHuman-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
ParameterTypeRequiredDescription
ownerstringYesRepository owner (user or organization)
repostringYesRepository name
apiKeystringYesGitHub Personal Access Token
Output
ParameterTypeDescription
contentstringHuman-readable repository summary
namestringRepository name
descriptionstringRepository description
starsnumberNumber of stars
forksnumberNumber of forks
openIssuesnumberNumber 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
ParameterTypeRequiredDescription
ownerstringYesRepository owner (user or organization)
repostringYesRepository name
branchstringNoBranch name (defaults to the repository's default branch)
apiKeystringYesGitHub API token
Output
ParameterTypeDescription
contentstringHuman-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