Operations 13
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
“How do I upload raw file content as a Git blob without cloning the repo?”
“Can I create a blob from base64-encoded content instead of UTF-8 text?”
Tell an agent
Create a blob in {owner}/{repo} with the content {content}.
Store {content} as a {encoding}-encoded Git blob in {owner}/{repo}.
Ask an LLM
“How can I read a file's contents from the Git database by its blob SHA?”
“Why is blob content always base64 encoded, and can I get it raw instead?”
Tell an agent
Get blob {file_sha} from {owner}/{repo}.
Fetch the contents of Git blob {file_sha} in the {repo} repository owned by {owner}.
Ask an LLM
“How do I create a commit directly through the Git database from a tree SHA?”
“Can I set a custom author and committer on a low-level Git commit?”
Tell an agent
Create a commit in {owner}/{repo} with message {message} pointing at tree {tree}.
Make a Git commit object in {owner}/{repo} for tree {tree} with parents {parents} and message {message}.
GET
/repos/{owner}/{repo}/git/commits/{commit_sha}
Get a Git commit object by SHA · Get a commit object
#
Ask an LLM
“How do I look up the raw Git commit object, including its tree and parents, for a SHA?”
“Can I check whether a commit's signature was verified?”
Tell an agent
Get Git commit object {commit_sha} from {owner}/{repo}.
Show the tree, parents and signature verification for commit {commit_sha} in {owner}/{repo}.
GET
/repos/{owner}/{repo}/git/matching-refs/{ref}
List Git references matching a prefix · List matching references
#
Ask an LLM
“How do I find all branches whose names start with feature/?”
“Can I list every tag reference that begins with v1 in a repository?”
Tell an agent
List all refs in {owner}/{repo} that match {ref}.
Find every branch or tag in {owner}/{repo} whose name starts with {ref}.
Ask an LLM
“What commit SHA does a specific branch point to right now?”
“How do I check if an exact tag reference exists in a repo?”
Tell an agent
Get the reference {ref} in {owner}/{repo}.
Tell me which SHA the exact ref {ref} points to in {owner}/{repo}.
Ask an LLM
“How do I create a new branch from a commit SHA through the API?”
“Why can't I create a reference in an empty repository?”
Tell an agent
Create the ref {ref} in {owner}/{repo} pointing at {sha}.
Make a new branch {ref} in {owner}/{repo} starting from commit {sha}.
Ask an LLM
“How do I point an existing branch at a different commit?”
“Can I force-update a branch ref even when it isn't a fast-forward?”
Tell an agent
Update the ref {ref} in {owner}/{repo} to point at {sha}.
Force-move existing branch {ref} in {owner}/{repo} to commit {sha} (force: {force}).
Ask an LLM
“How do I delete a branch through the Git references API?”
“Can I remove a tag ref from a repository without deleting the commit?”
Tell an agent destructive · confirm first
Delete the reference {ref} from {owner}/{repo}.
Remove branch ref {ref} in the {repo} repository owned by {owner}.
Ask an LLM
“How do I create an annotated tag with a message and tagger through the API?”
“Does creating a tag object also create the refs/tags reference?”
Tell an agent
Create an annotated tag object {tag} in {owner}/{repo} on {object} with message {message}.
Make tag object {tag} for {type} {object} in {owner}/{repo} with the note {message}.
Ask an LLM
“How do I read the message and tagger of an annotated tag?”
“Can I see if a tag object's signature is verified?”
Tell an agent
Get tag object {tag_sha} from {owner}/{repo}.
Show the tagger, message and verification for annotated tag {tag_sha} in {owner}/{repo}.
Ask an LLM
“How do I build a new tree of file changes on top of an existing base tree?”
“Can I add or modify several files in one tree without touching the rest of the repo?”
Tell an agent
Create a tree in {owner}/{repo} with the entries {tree}.
Build a new tree in {owner}/{repo} from base tree {base_tree} with these changes {tree}.
GET
/repos/{owner}/{repo}/git/trees/{tree_sha}
Get a Git tree, optionally recursively · Get a tree
#
Ask an LLM
“How do I list every file in a repository at a given commit tree?”
“What happens when a tree response comes back truncated?”
Tell an agent
Get tree {tree_sha} from {owner}/{repo}.
List all files recursively in tree {tree_sha} of {owner}/{repo} (recursive: {recursive}).
Documentation
Documentation
https://docs.github.com/en/rest/apps
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
Documentation
https://docs.github.com/en/rest/emojis
Documentation
https://docs.github.com/en/rest/gitignore
Documentation
https://docs.github.com/en/rest/apps/installations
Documentation
https://docs.github.com/en/rest/enterprise-admin
Documentation
https://docs.github.com/en/rest/activity/events
Documentation
https://docs.github.com/en/rest/orgs
Documentation
https://docs.github.com/en/rest/rate-limit
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
Documentation
https://docs.github.com/en/rest/teams
Documentation
https://docs.github.com/en/rest/meta/meta
Documentation
https://docs.github.com/en/rest/actions
Documentation
https://docs.github.com/en/rest/branches
Documentation
https://docs.github.com/en/rest/code-scanning
Documentation
https://docs.github.com/en/rest/collaborators
Documentation
https://docs.github.com/en/rest/dependabot
Documentation
https://docs.github.com/en/rest/webhooks
Documentation
https://docs.github.com/en/rest/pulls
Documentation
https://docs.github.com/en/rest/git/tags
Documentation
https://docs.github.com/en/rest/repos/autolinks
Documentation
https://docs.github.com/en/rest/collaborators/invitations
Specifications
OpenAPI
https://artifacts.apis.io/github/openapi/github-git-api-openapi.yml
AsyncAPI
https://artifacts.apis.io/github/asyncapi/github-webhooks-asyncapi.yml
Schemas & Data
JSONSchema
https://artifacts.apis.io/github/json-schema/github-git-commit-schema.json
JSONSchema
https://artifacts.apis.io/github/json-schema/github-git-tree-schema.json
JSONSchema
https://artifacts.apis.io/github/json-schema/github-git-tag-schema.json
JSONSchema
https://artifacts.apis.io/github/json-schema/github-git-ref-schema.json
JSONSchema
https://artifacts.apis.io/github/json-schema/github-blob-schema.json
JSONSchema
https://artifacts.apis.io/github/json-schema/github-short-blob-schema.json