Overview
Add GitHub to any ModuleX agent or workflow. Repository, issue, pull request, branch, commit, and code search actions against the GitHub REST API (v3,api.github.com).
Authentication
- OAuth2
- Personal Access Token
OAuth2 Authentication
Connect using GitHub OAuth (recommended for most use cases)Required Credentials
| Field | Description | Required | Format |
|---|---|---|---|
| Client ID | GitHub OAuth App Client ID | Yes | Iv1.xxxxxxxxxxxxxxxx |
| Client Secret | GitHub OAuth App Client Secret | Yes | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
OAuth Configuration
- Authorization URL:
https://github.com/login/oauth/authorize - Token URL:
https://github.com/login/oauth/access_token - Scopes:
repo,user,read:org,workflow
Personal Access Token
Use your GitHub Personal Access Token (Classic or Fine-grained)Required Credentials
| Field | Description | Required | Format |
|---|---|---|---|
| Personal Access Token | Your GitHub Personal Access Token (Classic: ghp_xxx or Fine-grained: github_pat_xxx) | Yes | ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Available Actions
list_repositories — List repositories for the authenticated user or organization
list_repositories — List repositories for the authenticated user or organization
Parameters
all)full_name)30)Response
{
"$defs": {
"RepositorySummary": {
"additionalProperties": false,
"description": "One row of ``list_repositories``.",
"properties": {
"id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"private": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Private"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"clone_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clone Url"
},
"ssh_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ssh Url"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"stars": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stars"
},
"forks": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Forks"
},
"open_issues": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Issues"
},
"default_branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Default Branch"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"title": "RepositorySummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"repositories": {
"items": {
"$ref": "#/$defs/RepositorySummary"
},
"title": "Repositories",
"type": "array"
},
"total": {
"default": 0,
"title": "Total",
"type": "integer"
},
"page": {
"default": 1,
"title": "Page",
"type": "integer"
},
"per_page": {
"default": 30,
"title": "Per Page",
"type": "integer"
}
},
"required": [
"success"
],
"title": "ListRepositoriesOutput",
"type": "object"
}
create_repository — Create a new repository
create_repository — Create a new repository
Parameters
false)Response
{
"$defs": {
"RepositoryCreated": {
"additionalProperties": false,
"description": "Repository representation from ``create_repository``.",
"properties": {
"id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
},
"owner": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Owner"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"clone_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clone Url"
},
"private": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Private"
},
"default_branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Default Branch"
}
},
"title": "RepositoryCreated",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"repository": {
"$ref": "#/$defs/RepositoryCreated"
}
},
"required": [
"success",
"repository"
],
"title": "CreateRepositoryOutput",
"type": "object"
}
delete_repository — Delete a repository (irreversible, requires delete_repo scope)
delete_repository — Delete a repository (irreversible, requires delete_repo scope)
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"success",
"message"
],
"title": "DeleteRepositoryOutput",
"type": "object"
}
get_repository — Get repository details
get_repository — Get repository details
Parameters
Response
{
"$defs": {
"RepositoryDetailed": {
"additionalProperties": false,
"description": "Repository representation from ``get_repository``.",
"properties": {
"id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"private": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Private"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"clone_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clone Url"
},
"ssh_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ssh Url"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"stars": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stars"
},
"forks": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Forks"
},
"watchers": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Watchers"
},
"open_issues": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Issues"
},
"default_branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Default Branch"
},
"topics": {
"items": {
"type": "string"
},
"title": "Topics",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"pushed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed At"
}
},
"title": "RepositoryDetailed",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"repository": {
"$ref": "#/$defs/RepositoryDetailed"
}
},
"required": [
"success",
"repository"
],
"title": "GetRepositoryOutput",
"type": "object"
}
list_issues — List issues for a repository
list_issues — List issues for a repository
Parameters
open)Response
{
"$defs": {
"IssueSummary": {
"additionalProperties": false,
"description": "Issue row in ``list_issues`` / single fetch in ``get_issue``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"assignees": {
"items": {
"type": "string"
},
"title": "Assignees",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"closed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Closed At"
},
"comments": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Comments"
}
},
"title": "IssueSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"issues": {
"items": {
"$ref": "#/$defs/IssueSummary"
},
"title": "Issues",
"type": "array"
},
"total": {
"default": 0,
"title": "Total",
"type": "integer"
},
"page": {
"default": 1,
"title": "Page",
"type": "integer"
},
"per_page": {
"default": 30,
"title": "Per Page",
"type": "integer"
}
},
"required": [
"success"
],
"title": "ListIssuesOutput",
"type": "object"
}
create_issue — Create a new issue
create_issue — Create a new issue
Parameters
Response
{
"$defs": {
"IssueCreated": {
"additionalProperties": false,
"description": "Issue representation from ``create_issue``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
}
},
"title": "IssueCreated",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"issue": {
"$ref": "#/$defs/IssueCreated"
}
},
"required": [
"success",
"issue"
],
"title": "CreateIssueOutput",
"type": "object"
}
get_issue — Get issue details
get_issue — Get issue details
Parameters
Response
{
"$defs": {
"IssueSummary": {
"additionalProperties": false,
"description": "Issue row in ``list_issues`` / single fetch in ``get_issue``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"assignees": {
"items": {
"type": "string"
},
"title": "Assignees",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"closed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Closed At"
},
"comments": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Comments"
}
},
"title": "IssueSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"issue": {
"$ref": "#/$defs/IssueSummary"
}
},
"required": [
"success",
"issue"
],
"title": "GetIssueOutput",
"type": "object"
}
update_issue — Update an existing issue
update_issue — Update an existing issue
Parameters
Response
{
"$defs": {
"IssueUpdated": {
"additionalProperties": false,
"description": "Issue representation from ``update_issue``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"title": "IssueUpdated",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"issue": {
"$ref": "#/$defs/IssueUpdated"
}
},
"required": [
"success",
"issue"
],
"title": "UpdateIssueOutput",
"type": "object"
}
list_pull_requests — List pull requests for a repository
list_pull_requests — List pull requests for a repository
Parameters
open)Response
{
"$defs": {
"PullRequestSummary": {
"additionalProperties": false,
"description": "PR row in ``list_pull_requests``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User"
},
"head": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Head"
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Base"
},
"draft": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft"
},
"mergeable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Mergeable"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"merged_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Merged At"
},
"closed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Closed At"
}
},
"title": "PullRequestSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"pull_requests": {
"items": {
"$ref": "#/$defs/PullRequestSummary"
},
"title": "Pull Requests",
"type": "array"
},
"total": {
"default": 0,
"title": "Total",
"type": "integer"
},
"page": {
"default": 1,
"title": "Page",
"type": "integer"
},
"per_page": {
"default": 30,
"title": "Per Page",
"type": "integer"
}
},
"required": [
"success"
],
"title": "ListPullRequestsOutput",
"type": "object"
}
create_pull_request — Create a new pull request
create_pull_request — Create a new pull request
Parameters
Response
{
"$defs": {
"PullRequestCreated": {
"additionalProperties": false,
"description": "PR representation from ``create_pull_request``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"draft": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft"
},
"head": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Head"
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Base"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
}
},
"title": "PullRequestCreated",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"pull_request": {
"$ref": "#/$defs/PullRequestCreated"
}
},
"required": [
"success",
"pull_request"
],
"title": "CreatePullRequestOutput",
"type": "object"
}
get_pull_request — Get pull request details
get_pull_request — Get pull request details
Parameters
Response
{
"$defs": {
"PullRequestDetailed": {
"additionalProperties": false,
"description": "PR representation from ``get_pull_request``.",
"properties": {
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User"
},
"head": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Head"
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Base"
},
"draft": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft"
},
"mergeable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Mergeable"
},
"merged": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Merged"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"merged_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Merged At"
},
"closed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Closed At"
},
"commits": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Commits"
},
"additions": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Additions"
},
"deletions": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Deletions"
},
"changed_files": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Changed Files"
}
},
"title": "PullRequestDetailed",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"pull_request": {
"$ref": "#/$defs/PullRequestDetailed"
}
},
"required": [
"success",
"pull_request"
],
"title": "GetPullRequestOutput",
"type": "object"
}
merge_pull_request — Merge a pull request
merge_pull_request — Merge a pull request
Parameters
merge)Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"merged": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Merged"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message"
},
"sha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sha"
}
},
"required": [
"success"
],
"title": "MergePullRequestOutput",
"type": "object"
}
create_branch — Create a new branch
create_branch — Create a new branch
Parameters
Response
{
"$defs": {
"Branch": {
"additionalProperties": false,
"description": "Branch returned by ``create_branch``.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ref"
},
"sha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sha"
}
},
"title": "Branch",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"branch": {
"$ref": "#/$defs/Branch"
}
},
"required": [
"success",
"branch"
],
"title": "CreateBranchOutput",
"type": "object"
}
get_file_content — Get file contents from a repository
get_file_content — Get file contents from a repository
Parameters
Response
{
"$defs": {
"FileContent": {
"additionalProperties": false,
"description": "File returned by ``get_file_content`` (content is base64-decoded UTF-8).",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Content"
},
"sha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sha"
},
"download_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Download Url"
}
},
"title": "FileContent",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"file": {
"$ref": "#/$defs/FileContent"
}
},
"required": [
"success",
"file"
],
"title": "GetFileContentOutput",
"type": "object"
}
create_commit — Create a commit with file changes
create_commit — Create a commit with file changes
Parameters
Response
{
"$defs": {
"CommitCreated": {
"additionalProperties": false,
"description": "Commit returned by ``create_commit``.",
"properties": {
"sha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sha"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message"
},
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Branch"
}
},
"title": "CommitCreated",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"commit": {
"$ref": "#/$defs/CommitCreated"
}
},
"required": [
"success",
"commit"
],
"title": "CreateCommitOutput",
"type": "object"
}
search_code — Search for code in repositories
search_code — Search for code in repositories
Parameters
indexed)30)Response
{
"$defs": {
"SearchCodeItem": {
"additionalProperties": false,
"description": "One result row of ``search_code``.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"repository": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Repository"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"sha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sha"
}
},
"title": "SearchCodeItem",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"total_count": {
"default": 0,
"title": "Total Count",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SearchCodeItem"
},
"title": "Items",
"type": "array"
},
"page": {
"default": 1,
"title": "Page",
"type": "integer"
},
"per_page": {
"default": 30,
"title": "Per Page",
"type": "integer"
}
},
"required": [
"success"
],
"title": "SearchCodeOutput",
"type": "object"
}
Limits & Quotas
- Authenticated REST API: 5,000 requests per hour per token.
- Search API (
search_code): 30 requests per minute, separate quota — andqmust be at least one valid qualifier (e.g.repo:owner/nameorlanguage:python). create_commitmakes five sequential API calls (ref, base commit, one blob per file, tree, commit, ref update). Budget accordingly when committing many files.delete_repositoryis irreversible and requires the token to carry thedelete_reposcope; Fine-grained tokens additionally need the Administration: write permission.