GitHub Repos API
The GitHub Repos API is a set of REST endpoints that let you programmatically create, read, update, and delete repositories and their resources, giving you control over a repos lifecycle and configuration.
Operations 163
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“What repositories does my GitHub organization own?”
“Can I list only an org's private or forked repositories?”
Tell an agent
List every repository in the {org} organization.
Show {type} repositories in {org}, sorted by {sort}.
POST
/orgs/{org}/repos
Create a repository in an organization · GitHub Create an Organization Repository
#
Ask an LLM
“How do I create a new repository under my organization rather than my personal account?”
“Can a new org repo start with a README, a .gitignore template and a license?”
Tell an agent
Create a repository named {name} in the {org} organization.
Create a {visibility} repo {name} in {org} with a {license_template} license.
Ask an LLM
“Where can I see a repository's default branch, visibility and settings?”
“What does the API tell me about a single repo's metadata?”
Tell an agent
Get the details of repository {owner}/{repo}.
Show me the default branch and visibility of {owner}/{repo}.
Ask an LLM
“Can I rename a repository or change its description through the API?”
“Is there a way to switch a repo's default branch or turn off its wiki?”
Tell an agent
Rename repository {owner}/{repo} to {name}.
Change the description of {owner}/{repo} to {description}.
Ask an LLM
“How do I permanently delete a GitHub repository?”
“What permission do I need to delete a repo I administer?”
Tell an agent destructive · confirm first
Delete the repository {owner}/{repo} permanently.
Remove the {repo} repository owned by {owner}.
GET
/repos/{owner}/{repo}/autolinks
List a repository's autolinks · GitHub Get All Autolinks of a Repository
#
Ask an LLM
“Which autolink references are configured on my repository?”
“Can I see all the ticket-number autolinks a repo has set up?”
Tell an agent
List all autolinks configured on {owner}/{repo}.
Show the autolink references for the {repo} repo owned by {owner}.
POST
/repos/{owner}/{repo}/autolinks
Create an autolink reference · GitHub Create an Autolink Reference for a Repository
#
Ask an LLM
“How do I make ticket IDs like JIRA-123 in commits link to our tracker automatically?”
“Can an autolink match alphanumeric IDs or only numbers?”
Tell an agent
Add an autolink on {owner}/{repo} turning {key_prefix} references into links to {url_template}.
Create an autolink with prefix {key_prefix} and URL template {url_template} in {owner}/{repo}, alphanumeric set to {is_alphanumeric}.
GET
/repos/{owner}/{repo}/autolinks/{autolink_id}
Get one autolink reference · GitHub Get an Autolink Reference of a Repository
#
Ask an LLM
“What URL template does a specific autolink use?”
“Can I look up a single autolink by its ID?”
Tell an agent
Get autolink {autolink_id} from {owner}/{repo}.
Show the prefix and URL template of autolink {autolink_id} on {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/autolinks/{autolink_id}
Delete an autolink reference · GitHub Delete an Autolink Reference from a Repository
#
Ask an LLM
“How do I stop a prefix from being auto-linked in my repository?”
“Can I remove an autolink I no longer need?”
Tell an agent destructive · confirm first
Delete autolink {autolink_id} from {owner}/{repo}.
Remove the autolink reference {autolink_id} in the {repo} repo of {owner}.
Ask an LLM
“What branches exist in this repository?”
“Can I list only the protected branches of a repo?”
Tell an agent
List the branches of {owner}/{repo}.
Show only branches in {owner}/{repo} where protected is {protected}.
Ask an LLM
“Which commit is a given branch pointing at right now?”
“Is there a way to check if one particular branch is protected?”
Tell an agent
Get branch {branch} of {owner}/{repo}.
Show the latest commit on the {branch} branch in {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection
Get a branch's protection rules · GitHub Get Branch Protection
#
Ask an LLM
“What protection rules are applied to my main branch?”
“Can I see the full branch protection configuration in one call?”
Tell an agent
Get the full protection settings for {branch} in {owner}/{repo}.
Show me every protection rule on branch {branch} of {owner}/{repo}.
PUT
/repos/{owner}/{repo}/branches/{branch}/protection
Set a branch's protection rules · GitHub Update Branch Protection
#
Ask an LLM
“How do I protect a branch so it requires reviews and passing checks before merging?”
“Can I require a linear history and block force pushes on a branch?”
Tell an agent
Protect {branch} in {owner}/{repo} with status checks {required_status_checks} and reviews {required_pull_request_reviews}.
Replace the protection on {branch} in {owner}/{repo}, enforcing it for admins: {enforce_admins}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection
Remove all protection from a branch · GitHub Delete Branch Protection
#
Ask an LLM
“How do I completely unprotect a branch?”
“Can I drop every protection rule on a branch at once?”
Tell an agent destructive · confirm first
Remove all branch protection from {branch} in {owner}/{repo}.
Unprotect the {branch} branch of {owner}/{repo} entirely.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
Check if admins are bound by protection · GitHub Get Admin Branch Protection
#
Ask an LLM
“Are repository admins also subject to the protection rules on this branch?”
“Can I tell whether enforce-for-admins is on for a protected branch?”
Tell an agent
Check whether admin enforcement is on for {branch} in {owner}/{repo}.
Get the enforce_admins setting of branch {branch} on {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
Enforce branch protection for admins · GitHub Set Admin Branch Protection
#
Ask an LLM
“How do I make repository admins follow the same branch rules as everyone else?”
“Can I stop admins from bypassing protection on a branch?”
Tell an agent
Turn on admin enforcement for branch {branch} in {owner}/{repo}.
Make admins of {owner}/{repo} obey the protection rules on {branch}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
Stop enforcing protection for admins · GitHub Delete Admin Branch Protection
#
Ask an LLM
“How do I let admins bypass branch protection again?”
“Can I turn off enforce-for-admins on a protected branch?”
Tell an agent destructive · confirm first
Turn off admin enforcement on branch {branch} of {owner}/{repo}.
Let admins of {owner}/{repo} bypass protection on {branch} again.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
Get required review settings for a branch · GitHub Get Pull Request Review Protection
#
Ask an LLM
“How many approving reviews does this protected branch require?”
“Does the branch require code owner reviews before merging?”
Tell an agent
Get the required pull request review settings for {branch} in {owner}/{repo}.
Show how many approvals merging into {branch} of {owner}/{repo} needs.
PATCH
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
Change required review rules on a branch · GitHub Update Pull Request Review Protection
#
Ask an LLM
“Can I raise the number of required approvals on a protected branch?”
“Is there a way to dismiss stale reviews automatically when new commits are pushed?”
Tell an agent
Require {required_approving_review_count} approving reviews to merge into {branch} of {owner}/{repo}.
Set require code owner reviews to {require_code_owner_reviews} on {branch} in {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
Stop requiring reviews on a branch · GitHub Delete Pull Request Review Protection
#
Ask an LLM
“How do I remove the required-reviews rule from a protected branch?”
“Can pull requests merge into a branch without any approvals after I drop this rule?”
Tell an agent destructive · confirm first
Remove the required pull request reviews rule from {branch} in {owner}/{repo}.
Stop requiring review approvals on branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
Check if a branch requires signed commits · GitHub Get Commit Signature Protection
#
Ask an LLM
“Does this protected branch require signed commits?”
“Can I see whether commit signature verification is enforced on a branch?”
Tell an agent
Check if signed commits are required on {branch} in {owner}/{repo}.
Get the commit signature protection status of {branch} on {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
Require signed commits on a branch · GitHub Create Commit Signature Protection
#
Ask an LLM
“How do I force every commit on a protected branch to be signed?”
“Can I require GPG or SSH signed commits on main?”
Tell an agent
Require signed commits on branch {branch} of {owner}/{repo}.
Turn on commit signature protection for {branch} in {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
Stop requiring signed commits on a branch · GitHub Delete Commit Signature Protection
#
Ask an LLM
“How do I allow unsigned commits on a protected branch again?”
“Can I switch off the signed-commits requirement?”
Tell an agent destructive · confirm first
Stop requiring signed commits on {branch} in {owner}/{repo}.
Turn off commit signature protection for branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
Get required status checks for a branch · GitHub Get Status Checks Protection
#
Ask an LLM
“Which status checks must pass before merging into this branch?”
“Is the branch required to be up to date before merging?”
Tell an agent
Get the required status checks protection for {branch} in {owner}/{repo}.
Show whether {branch} of {owner}/{repo} is strict about being up to date with required checks.
PATCH
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
Change required status check rules · GitHub Update Status Check Protection
#
Ask an LLM
“Can I require branches to be up to date before they merge?”
“Is it possible to change which CI checks are required on a protected branch?”
Tell an agent
Set strict up-to-date checking to {strict} on {branch} in {owner}/{repo}.
Require the checks {checks} to pass before merging into {branch} of {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
Stop requiring status checks on a branch · GitHub Remove Status Check Protection
#
Ask an LLM
“How do I remove the required status checks rule from a branch entirely?”
“Can a branch accept merges without CI passing once I drop this rule?”
Tell an agent destructive · confirm first
Remove the required status checks rule from {branch} in {owner}/{repo}.
Stop requiring any status checks to pass before merging into {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
List required status check contexts · GitHub Get All Status Check Contexts
#
Ask an LLM
“What are the names of the status check contexts required on this branch?”
“Can I get just the list of required check context names for a branch?”
Tell an agent
List the required status check contexts for {branch} in {owner}/{repo}.
Show the context names required to pass on branch {branch} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
Add required status check contexts · GitHub Add Status Check Contexts
#
Ask an LLM
“How do I add one more required CI check to a protected branch without touching the others?”
“Can I append a context to the required checks list?”
Tell an agent
Add required status check contexts to {branch} in {owner}/{repo}.
Append new contexts to the required checks on branch {branch} of {owner}/{repo}.
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
Replace required status check contexts · GitHub Set Status Check Contexts
#
Ask an LLM
“Can I overwrite the whole list of required check contexts on a branch in one go?”
“What happens to existing required contexts when I set a new list?”
Tell an agent
Replace the required status check contexts on {branch} in {owner}/{repo}.
Overwrite the full set of required check contexts for branch {branch} of {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
Remove required status check contexts · GitHub Remove Status Check Contexts
#
Ask an LLM
“Can I drop just one required check context from a branch and keep the rest?”
“How do I stop a retired CI job from being required on a branch?”
Tell an agent destructive · confirm first
Remove specific required status check contexts from {branch} in {owner}/{repo}.
Take a retired context off the required checks list for branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
See who may push to a protected branch · GitHub Get Access Restrictions
#
Ask an LLM
“Who is allowed to push to this protected branch?”
“Can I see the users, teams and apps with push access on a restricted branch in one response?”
Tell an agent
Get the push access restrictions on {branch} in {owner}/{repo}.
Show every user, team and app allowed to push to {branch} of {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
Remove push restrictions from a branch · GitHub Delete Access Restrictions
#
Ask an LLM
“How do I let anyone with write access push to a restricted branch again?”
“Can I lift all push restrictions on a protected branch at once?”
Tell an agent destructive · confirm first
Delete all push access restrictions on {branch} in {owner}/{repo}.
Lift the who-can-push restriction from branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
List apps allowed to push to a branch · GitHub Get Apps with Access to the Protected Branch
#
Ask an LLM
“Which GitHub Apps can push to this protected branch?”
“Does any installed app have push rights on the restricted main branch?”
Tell an agent
List the apps with push access to {branch} in {owner}/{repo}.
Show which GitHub Apps may push to protected branch {branch} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
Grant an app push access to a branch · GitHub Add App Access Restrictions
#
Ask an LLM
“How do I give an installed GitHub App permission to push to a protected branch?”
“Can I add an app to a branch's push allowlist without removing the others?”
Tell an agent
Add apps to the push allowlist of {branch} in {owner}/{repo}.
Grant another GitHub App push access on protected branch {branch} of {owner}/{repo}.
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
Replace the apps allowed to push to a branch · GitHub Set App Access Restrictions
#
Ask an LLM
“Can I swap out the entire list of apps permitted to push to a protected branch?”
“What happens to apps that already had push access when I set a new app list?”
Tell an agent
Replace the apps allowed to push to {branch} in {owner}/{repo}.
Reset the app push allowlist on branch {branch} of {owner}/{repo} to a new set.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
Revoke an app's push access to a branch · GitHub Remove App Access Restrictions
#
Ask an LLM
“Can I stop a specific GitHub App from pushing to a protected branch?”
“How do I take an app off a branch's push allowlist?”
Tell an agent destructive · confirm first
Remove apps from the push allowlist of {branch} in {owner}/{repo}.
Revoke a GitHub App's push access on protected branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
List teams allowed to push to a branch · GitHub Get Teams with Access to the Protected Branch
#
Ask an LLM
“Which teams can push to this protected branch?”
“Is my team on the push allowlist for the release branch?”
Tell an agent
List the teams with push access to {branch} in {owner}/{repo}.
Show which teams may push to protected branch {branch} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
Grant a team push access to a branch · GitHub Add Team Access Restrictions
#
Ask an LLM
“How do I let another team push to a protected branch?”
“Can I add a team to a branch's push allowlist while keeping the existing teams?”
Tell an agent
Add teams to the push allowlist of {branch} in {owner}/{repo}.
Grant one more team push access on protected branch {branch} of {owner}/{repo}.
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
Replace the teams allowed to push to a branch · GitHub Set Team Access Restrictions
#
Ask an LLM
“Can I overwrite the whole list of teams that may push to a protected branch?”
“Does setting a new team list remove teams that could push before?”
Tell an agent
Replace the teams allowed to push to {branch} in {owner}/{repo}.
Reset the team push allowlist on branch {branch} of {owner}/{repo} to a new set.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
Revoke a team's push access to a branch · GitHub Remove Team Access Restrictions
#
Ask an LLM
“Can I stop one team from pushing to a protected branch?”
“How do I take a team off a restricted branch's push list?”
Tell an agent destructive · confirm first
Remove teams from the push allowlist of {branch} in {owner}/{repo}.
Revoke a team's push access on protected branch {branch} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
List users allowed to push to a branch · GitHub Get Users with Access to the Protected Branch
#
Ask an LLM
“Which individual people can push to this protected branch?”
“Am I personally on the push allowlist for a restricted branch?”
Tell an agent
List the users with push access to {branch} in {owner}/{repo}.
Show which individual people may push to protected branch {branch} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
Grant a user push access to a branch · GitHub Add User Access Restrictions
#
Ask an LLM
“How do I let one more person push directly to a protected branch?”
“Can I add a user to the push allowlist without touching the existing ones?”
Tell an agent
Add users to the push allowlist of {branch} in {owner}/{repo}.
Grant another person push access on protected branch {branch} of {owner}/{repo}.
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
Replace the users allowed to push to a branch · GitHub Set User Access Restrictions
#
Ask an LLM
“Can I overwrite the full list of people who may push to a protected branch?”
“If I set a new user list, do the people already allowed lose push access?”
Tell an agent
Replace the users allowed to push to {branch} in {owner}/{repo}.
Reset the individual push allowlist on branch {branch} of {owner}/{repo} to a new set of people.
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
Revoke a user's push access to a branch · GitHub Remove User Access Restrictions
#
Ask an LLM
“Can I stop a specific person from pushing to a protected branch?”
“How do I take someone off a restricted branch's push list?”
Tell an agent destructive · confirm first
Remove users from the push allowlist of {branch} in {owner}/{repo}.
Revoke an individual's push access on protected branch {branch} of {owner}/{repo}.
Ask an LLM
“How do I rename master to main in a repository?”
“Can I rename a branch through the API without recreating it?”
Tell an agent
Rename branch {branch} in {owner}/{repo} to {new_name}.
Change the name of the {branch} branch on {owner}/{repo} to {new_name}.
GET
/repos/{owner}/{repo}/codeowners/errors
Find errors in a CODEOWNERS file · GitHub List CODEOWNERS Errors
#
Ask an LLM
“Is my CODEOWNERS file valid, and which lines have problems?”
“Can I check the CODEOWNERS file on a branch other than the default?”
Tell an agent
List the CODEOWNERS errors in {owner}/{repo}.
Check the CODEOWNERS file of {owner}/{repo} at ref {ref} for errors.
GET
/repos/{owner}/{repo}/collaborators
List a repository's collaborators · GitHub List Repository Collaborators
#
Ask an LLM
“Who has access to this repository?”
“Can I list only outside collaborators, or only people with admin permission?”
Tell an agent
List the collaborators on {owner}/{repo}.
Show collaborators of {owner}/{repo} with {affiliation} affiliation and {permission} permission.
GET
/repos/{owner}/{repo}/collaborators/{username}
Check if a user is a collaborator · GitHub Check if a User is a Repository Collaborator
#
Ask an LLM
“Is a given person a collaborator on my repository?”
“Can I verify someone has access to a repo before assigning them work?”
Tell an agent
Check whether {username} is a collaborator on {owner}/{repo}.
Confirm that user {username} has access to the {repo} repo of {owner}.
PUT
/repos/{owner}/{repo}/collaborators/{username}
Add a collaborator to a repository · GitHub Add a Repository Collaborator
#
Ask an LLM
“How do I invite someone to collaborate on my repository?”
“Can I give a new collaborator only triage or maintain permission?”
Tell an agent
Add {username} as a collaborator on {owner}/{repo}.
Invite {username} to {owner}/{repo} with {permission} permission.
DELETE
/repos/{owner}/{repo}/collaborators/{username}
Remove a collaborator from a repository · GitHub Remove a Repository Collaborator
#
Ask an LLM
“How do I remove someone's access to my repository?”
“Can I kick a collaborator off a repo through the API?”
Tell an agent destructive · confirm first
Remove {username} as a collaborator from {owner}/{repo}.
Revoke {username}'s collaborator access to the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/collaborators/{username}/permission
Get a user's permission on a repository · GitHub Get Repository Permissions for a User
#
Ask an LLM
“What permission level does a user have on this repository?”
“Does this person have admin, write or only read access to the repo?”
Tell an agent
Get the permission level of {username} on {owner}/{repo}.
Tell me whether {username} has write or admin access to {owner}/{repo}.
GET
/repos/{owner}/{repo}/comments
List all commit comments in a repository · GitHub List Commit Comments for a Repository
#
Ask an LLM
“Where can I see every comment left on commits across a whole repo?”
“Can I review all commit comments in a repository, not just one commit's?”
Tell an agent
List all commit comments across {owner}/{repo}.
Show every comment left on any commit in the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/comments/{comment_id}
Get a commit comment · GitHub Get a Commit Comment
#
Ask an LLM
“Can I fetch one commit comment by its ID?”
“What did a particular commit comment say and where was it placed?”
Tell an agent
Get commit comment {comment_id} in {owner}/{repo}.
Show the text of comment {comment_id} on a commit in {owner}/{repo}.
PATCH
/repos/{owner}/{repo}/comments/{comment_id}
Edit a commit comment · GitHub Update a Commit Comment
#
Ask an LLM
“Can I edit the text of a comment I already left on a commit?”
“Is it possible to fix a typo in an existing commit comment?”
Tell an agent
Change commit comment {comment_id} in {owner}/{repo} to say {body}.
Edit the existing commit comment {comment_id} on {owner}/{repo} with new text {body}.
DELETE
/repos/{owner}/{repo}/comments/{comment_id}
Delete a commit comment · GitHub Delete a Commit Comment
#
Ask an LLM
“How do I delete a comment I left on a commit?”
“Can I remove an inappropriate commit comment from a repository?”
Tell an agent destructive · confirm first
Delete commit comment {comment_id} from {owner}/{repo}.
Remove the comment {comment_id} someone left on a commit in {owner}/{repo}.
Ask an LLM
“What commits were made to this repo last week?”
“Can I list only the commits that touched a particular file path?”
Tell an agent
List recent commits in {owner}/{repo}.
Show commits in {owner}/{repo} by {author} since {since}.
GET
/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head
Find branches whose tip is a commit · GitHub List Branches for HEAD Commit
#
Ask an LLM
“Which branches currently have this commit as their latest commit?”
“Can I find out if a commit is the HEAD of any branch?”
Tell an agent
List branches whose HEAD is commit {commit_sha} in {owner}/{repo}.
Find which branches of {owner}/{repo} point at {commit_sha}.
GET
/repos/{owner}/{repo}/commits/{commit_sha}/comments
List comments on one commit · GitHub List Commit Comments
#
Ask an LLM
“What comments were left on a specific commit?”
“Can I read the review discussion attached to a single commit SHA?”
Tell an agent
List the comments on commit {commit_sha} in {owner}/{repo}.
Show all feedback posted on commit {commit_sha} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/commits/{commit_sha}/comments
Comment on a commit · GitHub Create a Commit Comment
#
Ask an LLM
“How do I leave a comment on a commit?”
“Can I attach a comment to a particular line of a file in a commit?”
Tell an agent
Comment {body} on commit {commit_sha} in {owner}/{repo}.
Add a comment {body} on line {line} of {path} in commit {commit_sha} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/commits/{commit_sha}/pulls
Find pull requests containing a commit · GitHub List Pull Requests Associated with a Commit
#
Ask an LLM
“Which pull request introduced this commit?”
“Can I trace a commit SHA back to the PRs it belongs to?”
Tell an agent
List pull requests associated with commit {commit_sha} in {owner}/{repo}.
Find the PR that brought commit {commit_sha} into {owner}/{repo}.
Ask an LLM
“What files and lines did a specific commit change?”
“Can I look up a commit by branch name or tag as well as by SHA?”
Tell an agent
Get commit {ref} from {owner}/{repo}.
Show the diff and changed files for {ref} in {owner}/{repo}.
GET
/repos/{owner}/{repo}/commits/{ref}/status
Get the overall CI status of a ref · GitHub Get the Combined Status for a Specific Reference
#
Ask an LLM
“Are all the status checks on this commit green?”
“Can I get a single success, pending or failure state for a branch's latest commit?”
Tell an agent
Get the combined status for {ref} in {owner}/{repo}.
Tell me whether all statuses on {ref} of {owner}/{repo} are passing.
GET
/repos/{owner}/{repo}/commits/{ref}/statuses
List every status posted on a ref · GitHub List Commit Statuses for a Reference
#
Ask an LLM
“What individual statuses have been reported on this commit, newest first?”
“Can I see the full history of status updates for a commit, not just the summary?”
Tell an agent
List all commit statuses for {ref} in {owner}/{repo}.
Show the history of each status reported on {ref} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/compare/{basehead}
Compare two commits or branches · GitHub Compare Two Commits
#
Ask an LLM
“What changed between two branches or tags?”
“How far ahead or behind is my feature branch compared with main?”
Tell an agent
Compare {basehead} in {owner}/{repo}.
Show the commits and file changes between the two refs in {basehead} for {owner}/{repo}.
GET
/repos/{owner}/{repo}/contents/{path}
Read a file or directory from a repository · GitHub Get Repository Content
#
Ask an LLM
“How do I read a file's contents from a repository without cloning it?”
“Can I list what's inside a directory of a repo at a specific branch?”
Tell an agent
Get the contents of {path} in {owner}/{repo}.
Read {path} from {owner}/{repo} at ref {ref}.
PUT
/repos/{owner}/{repo}/contents/{path}
Create or update a file in a repository · GitHub Create or Update File Contents
#
Ask an LLM
“Can I commit a new file to a repository through the API?”
“What do I need to supply to overwrite an existing file, like its blob SHA?”
Tell an agent
Create {path} in {owner}/{repo} with content {content} and commit message {message}.
Update {path} on branch {branch} of {owner}/{repo} replacing blob {sha} with {content}, message {message}.
DELETE
/repos/{owner}/{repo}/contents/{path}
Delete a file from a repository · GitHub Delete a File
#
Ask an LLM
“How do I delete a single file from a repo with a commit?”
“Which blob SHA do I need to remove a file through the API?”
Tell an agent destructive · confirm first
Delete {path} from {owner}/{repo} with blob SHA {sha} and message {message}.
Remove file {path} on branch {branch} of {owner}/{repo}, blob {sha}, commit message {message}.
GET
/repos/{owner}/{repo}/contributors
List a repository's contributors · GitHub List Repository Contributors
#
Ask an LLM
“Who has contributed the most commits to this repository?”
“Can anonymous contributors be included in the contributor list?”
Tell an agent
List the contributors to {owner}/{repo}.
Show contributors of {owner}/{repo} including anonymous ones: {anon}.
Ask an LLM
“Which deployments have gone out from this repository?”
“Can I filter deployments by environment, like only production?”
Tell an agent
List deployments for {owner}/{repo}.
Show deployments of {owner}/{repo} to the {environment} environment.
Ask an LLM
“How do I record a new deployment of a branch to staging?”
“Can a deployment be marked as production or as a transient environment?”
Tell an agent
Create a deployment of {ref} in {owner}/{repo}.
Deploy {ref} of {owner}/{repo} to {environment} with description {description}.
Ask an LLM
“What ref and environment did a particular deployment target?”
“Can I look up one deployment by its ID?”
Tell an agent
Get deployment {deployment_id} in {owner}/{repo}.
Show which ref and environment deployment {deployment_id} of {owner}/{repo} used.
DELETE
/repos/{owner}/{repo}/deployments/{deployment_id}
Delete a deployment · GitHub Delete a Deployment
#
Ask an LLM
“How do I delete an old deployment record?”
“Does a deployment need to be inactive before I can delete it?”
Tell an agent destructive · confirm first
Delete deployment {deployment_id} from {owner}/{repo}.
Remove the deployment record {deployment_id} in the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/deployments/{deployment_id}/statuses
List a deployment's status history · GitHub List Deployment Statuses
#
Ask an LLM
“What states has a deployment gone through so far?”
“Can I see when a deployment went from pending to success?”
Tell an agent
List the statuses of deployment {deployment_id} in {owner}/{repo}.
Show the status history for deployment {deployment_id} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/deployments/{deployment_id}/statuses
Report a deployment's status · GitHub Create a Deployment Status
#
Ask an LLM
“How do I mark a deployment as succeeded or failed?”
“Can I attach a log URL and an environment URL when updating a deployment's state?”
Tell an agent
Set deployment {deployment_id} in {owner}/{repo} to {state}.
Mark deployment {deployment_id} of {owner}/{repo} as {state} with logs at {log_url}.
GET
/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}
Get one deployment status · GitHub Get a Deployment Status
#
Ask an LLM
“Can I fetch a single status entry of a deployment by its ID?”
“What did one particular deployment status update report?”
Tell an agent
Get status {status_id} of deployment {deployment_id} in {owner}/{repo}.
Show deployment status entry {status_id} for deployment {deployment_id} on {owner}/{repo}.
POST
/repos/{owner}/{repo}/dispatches
Trigger a repository dispatch event · GitHub Create a Repository Dispatch Event
#
Ask an LLM
“How do I trigger a workflow in a repo from an outside system?”
“Can I send a custom payload along with a repository_dispatch event?”
Tell an agent
Send a repository dispatch event of type {event_type} to {owner}/{repo}.
Fire a {event_type} dispatch on {owner}/{repo} with payload {client_payload}.
GET
/repos/{owner}/{repo}/environments
List a repository's environments · GitHub List Environments
#
Ask an LLM
“What deployment environments are defined for this repository?”
“Does this repo have a production environment set up?”
Tell an agent
List the environments of {owner}/{repo}.
Show every deployment environment configured in the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/environments/{environment_name}
Get an environment's settings · GitHub Get an Environment
#
Ask an LLM
“What protection rules and reviewers does an environment have?”
“Can I see the wait timer configured on the production environment?”
Tell an agent
Get environment {environment_name} in {owner}/{repo}.
Show the reviewers and wait timer for {environment_name} on {owner}/{repo}.
PUT
/repos/{owner}/{repo}/environments/{environment_name}
Create or update an environment · GitHub Create or Update an Environment
#
Ask an LLM
“How do I add a production environment that needs approval before deploying?”
“Can I set a wait timer before deployments to an environment proceed?”
Tell an agent
Create environment {environment_name} in {owner}/{repo}.
Set a {wait_timer}-minute wait timer on environment {environment_name} of {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/environments/{environment_name}
Delete an environment · GitHub Delete an Environment
#
Ask an LLM
“How do I delete a deployment environment I no longer use?”
“Can I remove a staging environment from a repository?”
Tell an agent destructive · confirm first
Delete environment {environment_name} from {owner}/{repo}.
Remove the {environment_name} deployment environment in the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies
List an environment's branch policies · GitHub List Deployment Branch Policies
#
Ask an LLM
“Which branches are allowed to deploy to this environment?”
“Can I see the branch name patterns that gate an environment?”
Tell an agent
List the deployment branch policies for {environment_name} in {owner}/{repo}.
Show which branch patterns may deploy to {environment_name} on {owner}/{repo}.
POST
/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies
Allow a branch pattern to deploy · GitHub Create a Deployment Branch Policy
#
Ask an LLM
“How do I restrict deployments to an environment to release branches only?”
“Can I add a wildcard branch pattern to an environment's deployment rules?”
Tell an agent
Allow branches matching {name} to deploy to {environment_name} in {owner}/{repo}.
Add deployment branch policy {name} to environment {environment_name} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
Get a deployment branch policy · GitHub Get a Deployment Branch Policy
#
Ask an LLM
“What branch pattern does a specific deployment branch policy allow?”
“Can I look up one environment branch policy by ID?”
Tell an agent
Get deployment branch policy {branch_policy_id} of {environment_name} in {owner}/{repo}.
Show the pattern of branch policy {branch_policy_id} on environment {environment_name} for {owner}/{repo}.
PUT
/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
Change a deployment branch policy's pattern · GitHub Update a Deployment Branch Policy
#
Ask an LLM
“Can I change the branch pattern of an existing environment policy?”
“Is it possible to edit a deployment branch rule instead of deleting it?”
Tell an agent
Change branch policy {branch_policy_id} on {environment_name} in {owner}/{repo} to pattern {name}.
Edit existing deployment branch policy {branch_policy_id} of {environment_name}, {owner}/{repo}, to match {name}.
DELETE
/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
Delete a deployment branch policy · GitHub Delete a Deployment Branch Policy
#
Ask an LLM
“How do I remove a branch pattern from an environment's deployment rules?”
“Can I delete one branch policy while keeping the others?”
Tell an agent destructive · confirm first
Delete branch policy {branch_policy_id} from {environment_name} in {owner}/{repo}.
Remove deployment branch rule {branch_policy_id} on environment {environment_name} of {owner}/{repo}.
Ask an LLM
“Who has forked this repository?”
“Can I sort a repo's forks by stargazers to find the popular ones?”
Tell an agent
List the forks of {owner}/{repo}.
Show forks of {owner}/{repo} sorted by {sort}.
Ask an LLM
“How do I fork a repository into my organization?”
“Can I fork only the default branch and give the fork a different name?”
Tell an agent
Fork {owner}/{repo} into my account.
Fork {owner}/{repo} into the {organization} organization as {name}.
Ask an LLM
“Which webhooks are installed on my repository?”
“Can I see all the hooks a repo sends events to?”
Tell an agent
List the webhooks on {owner}/{repo}.
Show every webhook configured for the {repo} repo of {owner}.
Ask an LLM
“How do I get notified at my own URL whenever someone pushes to a repo?”
“Can a new webhook subscribe to pull request events only?”
Tell an agent
Create a webhook on {owner}/{repo} with config {config}.
Add a webhook to {owner}/{repo} for events {events} using config {config}.
GET
/repos/{owner}/{repo}/hooks/{hook_id}
Get a repository webhook · GitHub Get a Repository Webhook
#
Ask an LLM
“What events is a specific repository webhook subscribed to?”
“Is a given webhook active or disabled?”
Tell an agent
Get webhook {hook_id} on {owner}/{repo}.
Show the events and active state of hook {hook_id} in {owner}/{repo}.
PATCH
/repos/{owner}/{repo}/hooks/{hook_id}
Change a webhook's events or state · GitHub Update a Repository Webhook
#
Ask an LLM
“Can I add or remove events on an existing webhook without recreating it?”
“Is there a way to deactivate a webhook temporarily?”
Tell an agent
Add events {add_events} to webhook {hook_id} on {owner}/{repo}.
Remove events {remove_events} from webhook {hook_id} on {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/hooks/{hook_id}
Delete a repository webhook · GitHub Delete a Repository Webhook
#
Ask an LLM
“How do I remove a webhook from my repository?”
“Can I stop a repo from sending events to an old endpoint by deleting its hook?”
Tell an agent destructive · confirm first
Delete webhook {hook_id} from {owner}/{repo}.
Remove repository hook {hook_id} in the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/hooks/{hook_id}/config
Get a webhook's delivery configuration · GitHub Get a Webhook Configuration for a Repository
#
Ask an LLM
“What URL and content type does a repository webhook deliver to?”
“Can I check whether a hook skips SSL verification?”
Tell an agent
Get the delivery configuration of webhook {hook_id} on {owner}/{repo}.
Show the payload URL and content type for hook {hook_id} in {owner}/{repo}.
PATCH
/repos/{owner}/{repo}/hooks/{hook_id}/config
Change a webhook's URL, secret or format · GitHub Update a Webhook Configuration for a Repository
#
Ask an LLM
“How do I point an existing webhook at a new URL?”
“Can I rotate the secret a repository webhook signs its payloads with?”
Tell an agent
Point webhook {hook_id} on {owner}/{repo} at {url}.
Rotate the secret of hook {hook_id} in {owner}/{repo} to {secret}.
GET
/repos/{owner}/{repo}/hooks/{hook_id}/deliveries
List a webhook's recent deliveries · GitHub List Deliveries for a Repository Webhook
#
Ask an LLM
“Did my webhook deliveries succeed, and when were they sent?”
“Can I see only redeliveries of a repository webhook?”
Tell an agent
List the deliveries of webhook {hook_id} on {owner}/{repo}.
Show deliveries of hook {hook_id} in {owner}/{repo} where redelivery is {redelivery}.
GET
/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}
Inspect one webhook delivery · GitHub Get a Delivery for a Repository Webhook
#
Ask an LLM
“What request and response did a particular webhook delivery have?”
“Why did one webhook delivery fail?”
Tell an agent
Get delivery {delivery_id} of webhook {hook_id} on {owner}/{repo}.
Show the request and response of delivery {delivery_id} for hook {hook_id} in {owner}/{repo}.
POST
/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts
Redeliver a webhook delivery · GitHub Redeliver a Delivery for a Repository Webhook
#
Ask an LLM
“How do I resend a webhook delivery that my server missed?”
“Can I replay a failed repository webhook event?”
Tell an agent
Redeliver delivery {delivery_id} of webhook {hook_id} on {owner}/{repo}.
Replay the failed webhook delivery {delivery_id} for hook {hook_id} in {owner}/{repo}.
POST
/repos/{owner}/{repo}/hooks/{hook_id}/pings
Ping a repository webhook · GitHub Ping a Repository Webhook
#
Ask an LLM
“How can I check that my webhook endpoint is reachable?”
“Is there a way to send a ping event to a repository hook?”
Tell an agent
Ping webhook {hook_id} on {owner}/{repo}.
Send a ping event to hook {hook_id} in the {repo} repo of {owner}.
POST
/repos/{owner}/{repo}/hooks/{hook_id}/tests
Test a webhook with the latest push · GitHub Test the Push Repository Webhook
#
Ask an LLM
“Can I trigger a webhook with the most recent push to test it?”
“What happens if I test a hook that isn't subscribed to push events?”
Tell an agent
Test webhook {hook_id} on {owner}/{repo} with the latest push.
Replay the most recent push event to hook {hook_id} of {owner}/{repo} as a test.
GET
/repos/{owner}/{repo}/invitations
List pending invitations to a repository · GitHub List Repository Invitations
#
Ask an LLM
“Who has been invited to my repository but hasn't accepted yet?”
“Can I see all outstanding collaborator invitations on a repo?”
Tell an agent
List pending invitations for {owner}/{repo}.
Show everyone with an open collaborator invitation to the {repo} repo of {owner}.
PATCH
/repos/{owner}/{repo}/invitations/{invitation_id}
Change a pending invitation's permission · GitHub Update a Repository Invitation
#
Ask an LLM
“Can I change the permission on an invitation that hasn't been accepted?”
“Is it possible to downgrade a pending invite from admin to write?”
Tell an agent
Change invitation {invitation_id} on {owner}/{repo} to {permissions} permission.
Update the pending invite {invitation_id} for {owner}/{repo} so it grants {permissions}.
DELETE
/repos/{owner}/{repo}/invitations/{invitation_id}
Cancel a repository invitation · GitHub Delete a Repository Invitation
#
Ask an LLM
“How do I withdraw an invitation I sent to collaborate on a repo?”
“Can I cancel a collaborator invite before it's accepted?”
Tell an agent destructive · confirm first
Delete invitation {invitation_id} on {owner}/{repo}.
Withdraw the pending collaborator invite {invitation_id} to {owner}/{repo}.
Ask an LLM
“Which SSH deploy keys have access to this repository?”
“Can I audit the deploy keys on a repo?”
Tell an agent
List the deploy keys on {owner}/{repo}.
Show every SSH deploy key with access to the {repo} repo of {owner}.
Ask an LLM
“How do I give a server read-only SSH access to one repository?”
“Can a deploy key be given write access?”
Tell an agent
Add deploy key {key} titled {title} to {owner}/{repo}.
Add SSH deploy key {key} to {owner}/{repo} with read only set to {read_only}.
Ask an LLM
“Is a particular deploy key read-only?”
“Can I look up one deploy key by its ID?”
Tell an agent
Get deploy key {key_id} on {owner}/{repo}.
Show whether deploy key {key_id} in {owner}/{repo} is read only.
Ask an LLM
“How do I revoke a deploy key from a repository?”
“Can I remove an SSH key a CI server used for a repo?”
Tell an agent destructive · confirm first
Delete deploy key {key_id} from {owner}/{repo}.
Revoke SSH deploy key {key_id} on the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/languages
List a repository's languages · GitHub List Repository Languages
#
Ask an LLM
“What programming languages is this repository written in?”
“How many bytes of each language does a repo contain?”
Tell an agent
List the languages used in {owner}/{repo}.
Show the byte count per language for the {repo} repo of {owner}.
PUT
/repos/{owner}/{repo}/lfs
Enable Git LFS for a repository · GitHub Enable Git LFS for a Repository
#
Ask an LLM
“How do I turn on Git LFS for a repository?”
“Can large file storage be enabled per repository?”
Tell an agent
Enable Git LFS on {owner}/{repo}.
Turn on large file storage for the {repo} repository of {owner}.
DELETE
/repos/{owner}/{repo}/lfs
Disable Git LFS for a repository · GitHub Disable Git LFS for a Repository
#
Ask an LLM
“Can I switch off Git LFS on a repository?”
“What's the call to stop a repo from using large file storage?”
Tell an agent destructive · confirm first
Disable Git LFS on {owner}/{repo}.
Turn off large file storage for the {repo} repository of {owner}.
POST
/repos/{owner}/{repo}/merge-upstream
Sync a fork branch with upstream · GitHub Sync a Fork Branch with the Upstream Repository
#
Ask an LLM
“How do I update my fork with the latest changes from the original repository?”
“Can I sync a single branch of a fork with its upstream?”
Tell an agent
Sync branch {branch} of my fork {owner}/{repo} with upstream.
Pull the upstream changes into {branch} of fork {owner}/{repo}.
Ask an LLM
“Can I merge a branch into another directly, without a pull request?”
“Is it possible to set the merge commit message when merging branches through the API?”
Tell an agent
Merge {head} into {base} in {owner}/{repo}.
Merge {head} into {base} on {owner}/{repo} with message {commit_message}.
GET
/repos/{owner}/{repo}/pages
Get a repository's Pages site · GitHub Get a GitHub Enterprise Server Pages Site
#
Ask an LLM
“Does this repository have a Pages site, and what's its URL?”
“Can I see which branch and folder a Pages site builds from?”
Tell an agent
Get the Pages site for {owner}/{repo}.
Show the Pages URL and source branch of the {repo} repo of {owner}.
POST
/repos/{owner}/{repo}/pages
Turn on a Pages site for a repository · GitHub Create a GitHub Enterprise Server Pages Site
#
Ask an LLM
“How do I publish a repository as a Pages site for the first time?”
“Can a new Pages site build with a workflow instead of from a branch?”
Tell an agent
Enable a Pages site for {owner}/{repo}.
Create a Pages site on {owner}/{repo} with build type {build_type}.
PUT
/repos/{owner}/{repo}/pages
Update a Pages site's settings · GitHub Update Information About a GitHub Enterprise Server Pages Site
#
Ask an LLM
“How do I set a custom domain on my Pages site?”
“Can I force HTTPS or change the source branch of an existing Pages site?”
Tell an agent
Set the custom domain of the Pages site for {owner}/{repo} to {cname}.
Set HTTPS enforcement on the {owner}/{repo} Pages site to {https_enforced}.
DELETE
/repos/{owner}/{repo}/pages
Take down a repository's Pages site · GitHub Delete a GitHub Enterprise Server Pages Site
#
Ask an LLM
“How do I unpublish a repository's Pages site?”
“Can I delete a Pages site but keep the repo?”
Tell an agent destructive · confirm first
Delete the Pages site for {owner}/{repo}.
Unpublish the Pages site of the {repo} repository owned by {owner}.
GET
/repos/{owner}/{repo}/pages/builds
List a Pages site's builds · GitHub List GitHub Enterprise Server Pages Builds
#
Ask an LLM
“What's the build history of my Pages site?”
“Can I see past Pages builds and whether they errored?”
Tell an agent
List the Pages builds for {owner}/{repo}.
Show the history of Pages site builds on the {repo} repo of {owner}.
POST
/repos/{owner}/{repo}/pages/builds
Rebuild a Pages site · GitHub Request a GitHub Enterprise Server Pages Build
#
Ask an LLM
“How do I force my Pages site to rebuild without pushing a commit?”
“Can I request a fresh Pages build from the latest revision?”
Tell an agent
Request a new Pages build for {owner}/{repo}.
Trigger a rebuild of the Pages site on the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/pages/builds/latest
Get the latest Pages build · GitHub Get Latest Pages Build
#
Ask an LLM
“Did the most recent Pages build succeed?”
“When did my Pages site last build?”
Tell an agent
Get the latest Pages build for {owner}/{repo}.
Show the status of the most recent Pages build on the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/pages/builds/{build_id}
Get a specific Pages build · GitHub Get GitHub Enterprise Server Pages Build
#
Ask an LLM
“Can I look up one Pages build by its ID?”
“What error did a particular Pages build hit?”
Tell an agent
Get Pages build {build_id} for {owner}/{repo}.
Show the status and error of Pages build {build_id} in {owner}/{repo}.
POST
/repos/{owner}/{repo}/pages/deployments
Deploy an artifact to Pages · GitHub Create a GitHub Pages Deployment
#
Ask an LLM
“How do I publish a built artifact to Pages from a workflow?”
“What do I need, like an OIDC token and build version, to create a Pages deployment?”
Tell an agent
Deploy artifact {artifact_url} to Pages for {owner}/{repo} as build version {pages_build_version} using token {oidc_token}.
Publish Pages version {pages_build_version} of {owner}/{repo} from {artifact_url} to {environment}, OIDC token {oidc_token}.
Ask an LLM
“How do I fetch a project's README without knowing its exact filename?”
“Can I read the README as it was on another branch?”
Tell an agent
Get the README of {owner}/{repo}.
Read the README for {owner}/{repo} at ref {ref}.
GET
/repos/{owner}/{repo}/readme/{dir}
Get the README inside a folder · GitHub Get a Repository README for a Directory
#
Ask an LLM
“Can I fetch the README that lives in a subdirectory of a repo?”
“Which README applies to a particular folder in a monorepo?”
Tell an agent
Get the README in directory {dir} of {owner}/{repo}.
Read the {dir} folder's README in {owner}/{repo} at ref {ref}.
Ask an LLM
“What releases has this project published?”
“Does the release list include drafts I can see?”
Tell an agent
List the releases of {owner}/{repo}.
Show every published and draft release for the {repo} repository of {owner}.
Ask an LLM
“How do I cut a new release from a tag?”
“Can release notes be generated automatically when I create a release?”
Tell an agent
Create release {tag_name} on {owner}/{repo}.
Create release {tag_name} named {name} on {owner}/{repo} with auto-generated notes set to {generate_release_notes}.
GET
/repos/{owner}/{repo}/releases/assets/{asset_id}
Get a release asset · GitHub Get a Release Asset
#
Ask an LLM
“Can I get the download details of one file attached to a release?”
“What's the size and download count of a release asset?”
Tell an agent
Get release asset {asset_id} from {owner}/{repo}.
Show the size and download count of asset {asset_id} in {owner}/{repo}.
PATCH
/repos/{owner}/{repo}/releases/assets/{asset_id}
Rename or relabel a release asset · GitHub Update a Release Asset
#
Ask an LLM
“Can I rename a file that's already attached to a release?”
“Is it possible to change the label shown for a release download?”
Tell an agent
Rename release asset {asset_id} in {owner}/{repo} to {name}.
Set the label of release asset {asset_id} on {owner}/{repo} to {label}.
DELETE
/repos/{owner}/{repo}/releases/assets/{asset_id}
Delete a release asset · GitHub Delete a Release Asset
#
Ask an LLM
“How do I remove a wrong binary I attached to a release?”
“Can I delete a single file from a release without deleting the release?”
Tell an agent destructive · confirm first
Delete release asset {asset_id} from {owner}/{repo}.
Remove the uploaded file {asset_id} attached to a release in {owner}/{repo}.
POST
/repos/{owner}/{repo}/releases/generate-notes
Draft release notes for a tag · GitHub Generate Release Notes Content for a Release
#
Ask an LLM
“Can I preview auto-generated release notes before publishing a release?”
“What changed since the previous tag, written up as release notes?”
Tell an agent
Generate release notes for {tag_name} in {owner}/{repo}.
Write release notes for {tag_name} of {owner}/{repo} covering changes since {previous_tag_name}.
Ask an LLM
“What's the newest published release of this project?”
“Which version is marked as latest, ignoring drafts and prereleases?”
Tell an agent
Get the latest release of {owner}/{repo}.
Tell me the newest non-prerelease version of the {repo} project by {owner}.
GET
/repos/{owner}/{repo}/releases/tags/{tag}
Find a release by its tag · GitHub Get a Release by Tag Name
#
Ask an LLM
“Can I look up a release using its tag name like v2.1.0?”
“Which release is attached to a particular tag?”
Tell an agent
Get the release tagged {tag} in {owner}/{repo}.
Find the release for tag {tag} of {owner}/{repo}.
Ask an LLM
“Can I fetch a release by its numeric ID?”
“Where do I get a release's upload URL for attaching assets?”
Tell an agent
Get release {release_id} of {owner}/{repo}.
Show the details and upload URL of release {release_id} in {owner}/{repo}.
Ask an LLM
“Can I publish a draft release or change its notes after creating it?”
“Is it possible to mark an existing release as latest?”
Tell an agent
Update the notes of release {release_id} in {owner}/{repo} to {body}.
Set draft to {draft} on release {release_id} of {owner}/{repo}.
Ask an LLM
“How do I delete a release I published by mistake?”
“Does deleting a release also remove its tag?”
Tell an agent destructive · confirm first
Delete release {release_id} from {owner}/{repo}.
Remove the published release {release_id} in the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/releases/{release_id}/assets
List a release's downloadable files · GitHub List Release Assets
#
Ask an LLM
“What binaries are attached to a release?”
“Can I list every asset of one release?”
Tell an agent
List the assets of release {release_id} in {owner}/{repo}.
Show the downloadable files attached to release {release_id} of {owner}/{repo}.
POST
/repos/{owner}/{repo}/releases/{release_id}/assets
Upload a file to a release · GitHub Upload a Release Asset
#
Ask an LLM
“How do I attach a compiled binary to a release?”
“Can an uploaded release file have a display label different from its filename?”
Tell an agent
Upload {name} as an asset to release {release_id} in {owner}/{repo}.
Attach file {name} labeled {label} to release {release_id} of {owner}/{repo}.
GET
/repos/{owner}/{repo}/replicas/caches
List repository cache replica status · GitHub List Repository Cache Replication Status
#
Ask an LLM
“Are the repository cache replicas up to date with the primary?”
“Can I see the sync status of each cache replica for a repo?”
Tell an agent
List cache replication status for {owner}/{repo}.
Show each repository cache replica's sync state for the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/stats/code_frequency
Get weekly additions and deletions · GitHub Get the Weekly Commit Activity
#
Ask an LLM
“How many lines were added and deleted each week in this repository?”
“Can I chart a repo's code churn over time?”
Tell an agent
Get weekly code frequency stats for {owner}/{repo}.
Show lines added and deleted per week in the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/stats/commit_activity
Get a year of commit activity · GitHub Get the Last Year of Commit Activity
#
Ask an LLM
“How active has this repository been over the last year?”
“Can I get commit counts per day for each of the past 52 weeks?”
Tell an agent
Get the last year of commit activity for {owner}/{repo}.
Show daily commit counts across the past 52 weeks for the {repo} project of {owner}.
GET
/repos/{owner}/{repo}/stats/contributors
Get commit activity per contributor · GitHub Get All Contributor Commit Activity
#
Ask an LLM
“Which contributors have been most active, week by week?”
“Can I see each author's additions, deletions and commits over time?”
Tell an agent
Get per-contributor commit activity for {owner}/{repo}.
Show each author's weekly additions, deletions and commits in the {repo} repo of {owner}.
GET
/repos/{owner}/{repo}/stats/participation
Compare owner vs everyone's commits · GitHub Get the Weekly Commit Count
#
Ask an LLM
“How many weekly commits came from the owner versus everyone else?”
“What does the repository's participation graph look like?”
Tell an agent
Get weekly participation stats for {owner}/{repo}.
Compare the owner's weekly commit count with all contributors for the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/stats/punch_card
Get commits by hour and weekday · GitHub Get the Hourly Commit Count for Each Day
#
Ask an LLM
“At what hours and on which days do people usually commit to this repo?”
“Can I get a punch card of commit counts by hour of the week?”
Tell an agent
Get the hourly punch card stats for {owner}/{repo}.
Show commit counts for each hour of each weekday in the {repo} repo of {owner}.
POST
/repos/{owner}/{repo}/statuses/{sha}
Post a CI status on a commit · GitHub Create a Commit Status
#
Ask an LLM
“How do I mark a commit as passing or failing from my own CI system?”
“Can I link a commit status to my build logs and give it a named context?”
Tell an agent
Set the status of commit {sha} in {owner}/{repo} to {state}.
Report {state} for context {context} on commit {sha} of {owner}/{repo} linking to {target_url}.
Ask an LLM
“What tags exist in this repository?”
“Can I list all the version tags of a project?”
Tell an agent
List the tags of {owner}/{repo}.
Show every git tag in the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/tags/protection
List tag protection rules · GitHub List Tag Protection States for a Repository
#
Ask an LLM
“Which tag patterns are protected in this repository?”
“Can I see the rules that stop people from creating or deleting certain tags?”
Tell an agent
List the tag protection rules on {owner}/{repo}.
Show which tag patterns are protected in the {repo} repo of {owner}.
POST
/repos/{owner}/{repo}/tags/protection
Protect tags matching a pattern · GitHub Create a Tag Protection State for a Repository
#
Ask an LLM
“How do I stop non-admins from creating or deleting release tags like v*?”
“Can I protect tags by a wildcard pattern?”
Tell an agent
Protect tags matching {pattern} in {owner}/{repo}.
Add a tag protection rule for {pattern} on {owner}/{repo}.
DELETE
/repos/{owner}/{repo}/tags/protection/{tag_protection_id}
Remove a tag protection rule · GitHub Delete a Tag Protection State for a Repository
#
Ask an LLM
“How do I remove protection from a tag pattern?”
“Can I delete one tag protection rule by its ID?”
Tell an agent destructive · confirm first
Delete tag protection rule {tag_protection_id} from {owner}/{repo}.
Unprotect the tag pattern with rule {tag_protection_id} in {owner}/{repo}.
GET
/repos/{owner}/{repo}/tarball/{ref}
Download a repository as a tarball · GitHub Download a Repository Archive (tar)
#
Ask an LLM
“How do I download a snapshot of a repo as a .tar.gz file?”
“Can I get a tar archive of the code at a particular tag?”
Tell an agent
Download a tarball of {owner}/{repo} at {ref}.
Get a tar.gz archive of the {repo} repo by {owner} at ref {ref}.
GET
/repos/{owner}/{repo}/teams
List teams with access to a repository · GitHub List Repository Teams
#
Ask an LLM
“Which teams have access to this repository?”
“Can I see every organization team granted permission on a repo?”
Tell an agent
List the teams with access to {owner}/{repo}.
Show every team granted permission on the {repo} repository of {owner}.
Ask an LLM
“What topics is this repository tagged with?”
“Can I read a repo's topic labels through the API?”
Tell an agent
Get the topics of {owner}/{repo}.
Show the topic labels applied to the {repo} repo of {owner}.
PUT
/repos/{owner}/{repo}/topics
Replace a repository's topics · GitHub Replace All Repository Topics
#
Ask an LLM
“How do I set the topics on a repository?”
“Can I clear all of a repo's topics at once?”
Tell an agent
Set the topics of {owner}/{repo} to {names}.
Replace every topic label on the {repo} repository of {owner} with {names}.
POST
/repos/{owner}/{repo}/transfer
Transfer a repository to a new owner · GitHub Transfer a Repository
#
Ask an LLM
“How do I move a repository from my account to an organization?”
“Can I rename a repository as part of transferring it?”
Tell an agent destructive · confirm first
Transfer {owner}/{repo} to {new_owner}.
Move {owner}/{repo} to {new_owner} and rename it {new_name}.
GET
/repos/{owner}/{repo}/vulnerability-alerts
Check if vulnerability alerts are on · GitHub Check if Vulnerability Alerts Are Enabled for a Repository
#
Ask an LLM
“Are dependency vulnerability alerts enabled for this repository?”
“Can I tell whether a repo will warn me about vulnerable dependencies?”
Tell an agent
Check whether vulnerability alerts are enabled on {owner}/{repo}.
Tell me if the {repo} repository of {owner} has dependency vulnerability alerts turned on.
PUT
/repos/{owner}/{repo}/vulnerability-alerts
Turn on vulnerability alerts · GitHub Enable Vulnerability Alerts
#
Ask an LLM
“How do I turn on alerts for vulnerable dependencies in my repo?”
“Can I enable dependency vulnerability alerts through the API?”
Tell an agent
Enable vulnerability alerts on {owner}/{repo}.
Start alerting on vulnerable dependencies in the {repo} repository of {owner}.
DELETE
/repos/{owner}/{repo}/vulnerability-alerts
Turn off vulnerability alerts · GitHub Disable Vulnerability Alerts
#
Ask an LLM
“Can I switch off dependency vulnerability alerts for a repository?”
“What's the way to disable vulnerable-dependency alerts on a repo?”
Tell an agent destructive · confirm first
Disable vulnerability alerts on {owner}/{repo}.
Stop alerting on vulnerable dependencies in the {repo} repository of {owner}.
GET
/repos/{owner}/{repo}/zipball/{ref}
Download a repository as a zip · GitHub Download a Repository Archive (zip)
#
Ask an LLM
“How do I download a repository as a .zip file?”
“Can I get a zip of the source code at a specific branch or tag?”
Tell an agent
Download a zip of {owner}/{repo} at {ref}.
Get a zipball archive of the {repo} repo by {owner} at ref {ref}.
POST
/repos/{template_owner}/{template_repo}/generate
Create a repository from a template · GitHub Create a Repository Using a Template
#
Ask an LLM
“How do I start a new project from a template repository?”
“Can a repo generated from a template include all of the template's branches?”
Tell an agent
Create a repository {name} from template {template_owner}/{template_repo}.
Generate {name} under {owner} from template {template_owner}/{template_repo}, private {private}.
Ask an LLM
“Can I page through every public repository in the order they were created?”
“Where do I start listing public repos after a given repository ID?”
Tell an agent
List all public repositories.
List public repositories created after repository ID {since}.
Ask an LLM
“Which repositories do I have access to, including org ones?”
“Can I list only the repos I own, or only private ones?”
Tell an agent
List all repositories I can access.
Show my {visibility} repositories sorted by {sort}.
POST
/user/repos
Create a repository in my account · GitHub Create a Repository for the Authenticated User
#
Ask an LLM
“How do I create a new personal repository?”
“Can a new repo in my account be private and start with a README?”
Tell an agent
Create a repository named {name} in my account.
Create a private repo {name} for me with private set to {private} and auto_init {auto_init}.
GET
/user/repository_invitations
List my pending repository invitations · GitHub List Repository Invitations for the Authenticated User
#
Ask an LLM
“Have I been invited to collaborate on any repositories?”
“Which repository invites are waiting for me to accept?”
Tell an agent
List my pending repository invitations.
Show the repo collaboration invites waiting for my response.
PATCH
/user/repository_invitations/{invitation_id}
Accept a repository invitation · GitHub Accept a Repository Invitation
#
Ask an LLM
“How do I accept an invitation to collaborate on someone's repository?”
“Can I accept a repo invite through the API instead of email?”
Tell an agent
Accept repository invitation {invitation_id}.
Join the repository I was invited to via invitation {invitation_id}.
DELETE
/user/repository_invitations/{invitation_id}
Decline a repository invitation · GitHub Decline a Repository Invitation
#
Ask an LLM
“How do I turn down an invitation to collaborate on a repo?”
“Can I reject a repository invite I received?”
Tell an agent destructive · confirm first
Decline repository invitation {invitation_id}.
Reject the collaboration invite {invitation_id} sent to me.
GET
/users/{username}/repos
List another user's public repositories · GitHub List Repositories for a User
#
Ask an LLM
“What public repositories does a particular user own?”
“Can I sort someone's repos by when they were last updated?”
Tell an agent
List the repositories of user {username}.
Show {type} repos belonging to {username}, sorted by {sort}.