Developer
GitHub
Work with GitHub issues, pull requests, branches, Actions and releases.
Explore 37 capabilities ↓What you can build
- Auto-triage and label incoming issues, then draft responses for review
- Review pull requests: pull the diff, summarize the risk, and request reviewers
- React to failed CI runs — pull job logs and re-run only the failed jobs
- Draft releases with a generated changelog from merged PRs
- Keep a branch current and open a pull request from a generated change
Access and credentials
Read and write GitHub issues, pull requests, branches, files, Actions, and releases. Reads are non-mutating; writes and merges are mutating.
This plugin uses an API token. Store credentials in OrgSDK and select them for the project that needs access.
Example action
Build an open-issue report
Use this call in a saved OrgSDK action after enabling the plugin and connecting a credential.
return await github.listIssues({
"owner": "your-org",
"repo": "your-repo",
"state": "open",
"maxResults": 20
});Use with OrgSDK
OrgSDK gives external AI clients persistent projects and controlled execution. Plugins add optional tools to those projects. Each run uses pinned plugin versions, and project configuration determines which credentials they can use.
Set up OrgSDK locally ↗The plugin’s toolkit
Capabilities
37 functions from this published version. Read calls retrieve or process information; write actions can change data in the connected service.
37 of 37 functions
github.listWorkflowRuns
Read callList workflow runs for a repository. Optionally filter by actionId (filename or ID), branch, status ('queued', 'in_progress', 'completed').
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
actionIdOptional | string | number | — |
branchOptional | string | — |
statusOptional | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; name: string | null; status: string | null; conclusion: string | null; headBranch: string | null; headSha: string; event: string; htmlUrl: string; runNumber: number; createdAt: string; updatedAt: string }>>
github.getWorkflowRun
Read callGet details of a specific workflow run by ID.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
Returns Promise<{ id: number; name: string | null; status: string | null; conclusion: string | null; headBranch: string | null; headSha: string; event: string; htmlUrl: string; runNumber: number; createdAt: string; updatedAt: string }>
Trigger a workflow_dispatch event. actionId can be the workflow filename (e.g. 'ci.yml') or numeric ID. ref is the branch/tag to run on.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
actionId | string | number | — |
ref | string | — |
inputsOptional | Record<string, string> | — |
Returns Promise<{ triggered: true }>
Re-run only the failed jobs of a workflow run. Returns immediately — poll getWorkflowRun to track progress.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
Returns Promise<{ rerunned: true }>
Re-run all jobs in a workflow run. Returns immediately — poll getWorkflowRun to track progress.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
Returns Promise<{ rerunned: true }>
Cancel an in-progress workflow run.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
Returns Promise<{ cancelled: true }>
github.listWorkflowJobs
Read callList jobs for a workflow run. Includes step-level detail so you can see which step failed. filter can be 'latest' (default) or 'all' (includes previous attempts).
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
filterOptional | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; runId: number; name: string; status: string; conclusion: string | null; startedAt: string | null; completedAt: string | null; htmlUrl: string; runnerName: string | null; steps: Array<{ name: string; status: string; conclusion: string | null; number: number }> }>>
github.getWorkflowJobLogs
Read callDownload logs for a specific job. Output is capped at 100KB. Use listWorkflowJobs first to get the jobId.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
jobId | number | — |
Returns Promise<{ logs: string; truncated: boolean }>
github.listWorkflowRunArtifacts
Read callList artifacts produced by a workflow run.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
runId | number | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; name: string; sizeInBytes: number; expired: boolean; expiresAt: string | null; createdAt: string | null; updatedAt: string | null }>>
github.downloadWorkflowArtifact
Read callGet a temporary download URL for a workflow artifact (zip). The URL is short-lived. Use listWorkflowRunArtifacts first to get the artifactId.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
artifactId | number | — |
Returns Promise<{ downloadUrl: string }>
github.listBranches
Read callList branches for a GitHub repository.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ name: string; sha: string; protected: boolean }>>
github.getBranch
Read callGet details of a specific branch including latest commit info.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
branch | string | — |
Returns Promise<{ name: string; sha: string; protected: boolean; commitMessage: string; commitAuthor: string | null }>
Create a new branch. fromRef defaults to the repo's default branch. Example: createBranch('owner', 'repo', 'feature/new', 'main').
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
branchName | string | — |
fromRefOptional | string | — |
Returns Promise<{ ref: string; sha: string }>
github.getFileContent
Read callGet the content of a file from a GitHub repository. Auto-decodes base64 to UTF-8. Errors on files >1MB. Use ref to specify a branch/tag/commit.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
path | string | — |
refOptional | string | — |
Returns Promise<{ name: string; path: string; sha: string; size: number; content: string; htmlUrl: string }>
Create or update a file in a GitHub repository. Provide sha to update an existing file (get it from getFileContent). Content is auto-encoded to base64.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
path | string | — |
content | string | — |
message | string | — |
branchOptional | string | — |
shaOptional | string | — |
Returns Promise<{ path: string; sha: string; htmlUrl: string }>
github.listDirectoryContents
Read callList contents of a directory in a GitHub repository. Defaults to root. Use ref to specify a branch/tag/commit.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pathOptional | string | — |
refOptional | string | — |
Returns Promise<Array<{ name: string; path: string; type: 'file' | 'dir' | 'submodule' | 'symlink'; sha: string; size: number; htmlUrl: string }>>
github.listIssues
Read callList issues for a GitHub repository. Filters out pull requests. State: 'open', 'closed', 'all'. Labels: comma-separated string.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
stateOptional | string | — |
labelsOptional | string | — |
assigneeOptional | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; number: number; title: string; body: string | null; state: string; labels: string[]; assignees: string[]; user: string | null; htmlUrl: string; commentsCount: number; createdAt: string; updatedAt: string; closedAt: string | null }>>
github.getIssue
Read callGet a single GitHub issue by number.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
issueNumber | number | — |
Returns Promise<{ id: number; number: number; title: string; body: string | null; state: string; labels: string[]; assignees: string[]; user: string | null; htmlUrl: string; commentsCount: number; createdAt: string; updatedAt: string; closedAt: string | null }>
Create a new GitHub issue.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
title | string | — |
bodyOptional | string | — |
labelsOptional | string[] | — |
assigneesOptional | string[] | — |
Returns Promise<{ id: number; number: number; title: string; body: string | null; state: string; labels: string[]; assignees: string[]; user: string | null; htmlUrl: string; commentsCount: number; createdAt: string; updatedAt: string; closedAt: string | null }>
Update a GitHub issue. Only provided fields are changed. State: 'open' or 'closed'.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
issueNumber | number | — |
titleOptional | string | — |
bodyOptional | string | — |
stateOptional | string | — |
labelsOptional | string[] | — |
assigneesOptional | string[] | — |
Returns Promise<{ id: number; number: number; title: string; body: string | null; state: string; labels: string[]; assignees: string[]; user: string | null; htmlUrl: string; commentsCount: number; createdAt: string; updatedAt: string; closedAt: string | null }>
Add a comment to a GitHub issue.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
issueNumber | number | — |
body | string | — |
Returns Promise<{ id: number; body: string; user: string | null; htmlUrl: string; createdAt: string; updatedAt: string }>
github.listIssueComments
Read callList comments on a GitHub issue.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
issueNumber | number | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; body: string; user: string | null; htmlUrl: string; createdAt: string; updatedAt: string }>>
Add labels to a GitHub issue. Returns the full list of labels on the issue.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
issueNumber | number | — |
labels | string[] | — |
Returns Promise<string[]>
github.listPullRequests
Read callList pull requests for a GitHub repository. State: 'open', 'closed', 'all'. head/base filter by branch name.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
stateOptional | string | — |
headOptional | string | — |
baseOptional | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; number: number; title: string; body: string | null; state: string; draft: boolean; merged: boolean; head: { ref: string; sha: string }; base: { ref: string; sha: string }; user: string | null; labels: string[]; htmlUrl: string; createdAt: string; updatedAt: string }>>
github.getPullRequest
Read callGet a single pull request by number. Includes diff stats (additions, deletions, changedFiles).
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pullNumber | number | — |
Returns Promise<{ id: number; number: number; title: string; body: string | null; state: string; draft: boolean; merged: boolean; head: { ref: string; sha: string }; base: { ref: string; sha: string }; user: string | null; labels: string[]; htmlUrl: string; additions: number; deletions: number; changedFiles: number; createdAt: string; updatedAt: string; mergedAt: string | null }>
Create a new pull request. head = source branch, base = target branch (e.g. 'main').
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
title | string | — |
head | string | — |
base | string | — |
bodyOptional | string | — |
draftOptional | boolean | — |
Returns Promise<{ id: number; number: number; title: string; body: string | null; state: string; draft: boolean; head: { ref: string; sha: string }; base: { ref: string; sha: string }; htmlUrl: string; createdAt: string }>
Add a comment to a pull request.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pullNumber | number | — |
body | string | — |
Returns Promise<{ id: number; body: string; user: string | null; htmlUrl: string; createdAt: string; updatedAt: string }>
github.listPrComments
Read callList comments on a pull request.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pullNumber | number | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; body: string; user: string | null; htmlUrl: string; createdAt: string; updatedAt: string }>>
Merge a pull request. mergeMethod: 'merge', 'squash', or 'rebase'. Defaults to 'merge'.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pullNumber | number | — |
mergeMethodOptional | string | — |
commitTitleOptional | string | — |
Returns Promise<{ merged: boolean; message: string; sha: string }>
Request reviewers for a pull request.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
pullNumber | number | — |
reviewers | string[] | — |
Returns Promise<{ requestedReviewers: string[] }>
github.listReleases
Read callList releases for a GitHub repository, ordered by creation date (newest first).
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; tagName: string; name: string | null; body: string | null; draft: boolean; prerelease: boolean; htmlUrl: string; createdAt: string; publishedAt: string | null; assets: Array<{ name: string; size: number; downloadUrl: string }> }>>
github.getRelease
Read callGet a specific release by ID.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
releaseId | number | — |
Returns Promise<{ id: number; tagName: string; name: string | null; body: string | null; draft: boolean; prerelease: boolean; htmlUrl: string; createdAt: string; publishedAt: string | null; assets: Array<{ name: string; size: number; downloadUrl: string }> }>
Create a new GitHub release. tagName is required. targetCommitish defaults to the default branch.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
tagName | string | — |
nameOptional | string | — |
bodyOptional | string | — |
draftOptional | boolean | — |
prereleaseOptional | boolean | — |
targetCommitishOptional | string | — |
Returns Promise<{ id: number; tagName: string; name: string | null; body: string | null; draft: boolean; prerelease: boolean; htmlUrl: string; createdAt: string; publishedAt: string | null }>
github.listRepos
Read callList GitHub repositories for a user or the authenticated user. Returns simplified repo objects.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
ownerOptional | string | — |
typeOptional | string | — |
sortOptional | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; name: string; fullName: string; description: string | null; private: boolean; defaultBranch: string; language: string | null; stargazersCount: number; forksCount: number; openIssuesCount: number; htmlUrl: string; createdAt: string | null; updatedAt: string | null }>>
github.getRepo
Read callGet details of a specific GitHub repository.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
Returns Promise<{ id: number; name: string; fullName: string; description: string | null; private: boolean; defaultBranch: string; language: string | null; stargazersCount: number; forksCount: number; openIssuesCount: number; htmlUrl: string; createdAt: string | null; updatedAt: string | null }>
github.searchRepos
Read callSearch GitHub repositories using GitHub search query syntax. Example: 'language:typescript stars:>100'.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
query | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ id: number; name: string; fullName: string; description: string | null; private: boolean; defaultBranch: string; language: string | null; stargazersCount: number; forksCount: number; openIssuesCount: number; htmlUrl: string; createdAt: string | null; updatedAt: string | null }>>
github.getRepoContributors
Read callList contributors for a GitHub repository.
Parameters and return value
| Parameter | Type | Details |
|---|---|---|
owner | string | — |
repo | string | — |
maxResultsOptional | number | — |
Returns Promise<Array<{ login: string; contributions: number; htmlUrl: string }>>
