rest.repos
Octokit exposes these methods on octokit.rest.repos. The last column lists defaults and decorations applied by the SDK.
| Method | Upstream route | Pagination | SDK behavior |
|---|---|---|---|
acceptInvitation |
PATCH /user/repository_invitations/{invitation_id} |
— | renamed to repos.acceptInvitationForAuthenticatedUser |
acceptInvitationForAuthenticatedUser |
PATCH /user/repository_invitations/{invitation_id} |
— | — |
addAppAccessRestrictions |
POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps |
— | mapToData "apps" |
addCollaborator |
PUT /repos/{owner}/{repo}/collaborators/{username} |
— | — |
addStatusCheckContexts |
POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts |
— | mapToData "contexts" |
addTeamAccessRestrictions |
POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams |
— | mapToData "teams" |
addUserAccessRestrictions |
POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users |
— | mapToData "users" |
cancelPagesDeployment |
POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel |
— | — |
checkAutomatedSecurityFixes |
GET /repos/{owner}/{repo}/automated-security-fixes |
— | — |
checkCollaborator |
GET /repos/{owner}/{repo}/collaborators/{username} |
— | — |
checkImmutableReleases |
GET /repos/{owner}/{repo}/immutable-releases |
— | — |
checkPrivateVulnerabilityReporting |
GET /repos/{owner}/{repo}/private-vulnerability-reporting |
— | — |
checkVulnerabilityAlerts |
GET /repos/{owner}/{repo}/vulnerability-alerts |
— | — |
codeownersErrors |
GET /repos/{owner}/{repo}/codeowners/errors |
— | — |
compareCommits |
GET /repos/{owner}/{repo}/compare/{base}...{head} |
yes | — |
compareCommitsWithBasehead |
GET /repos/{owner}/{repo}/compare/{basehead} |
yes | — |
createAttestation |
POST /repos/{owner}/{repo}/attestations |
— | — |
createAutolink |
POST /repos/{owner}/{repo}/autolinks |
— | — |
createCommitComment |
POST /repos/{owner}/{repo}/commits/{commit_sha}/comments |
— | — |
createCommitSignatureProtection |
POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures |
— | — |
createCommitStatus |
POST /repos/{owner}/{repo}/statuses/{sha} |
— | — |
createDeployKey |
POST /repos/{owner}/{repo}/keys |
— | — |
createDeployment |
POST /repos/{owner}/{repo}/deployments |
— | — |
createDeploymentBranchPolicy |
POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies |
— | — |
createDeploymentProtectionRule |
POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules |
— | — |
createDeploymentStatus |
POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses |
— | — |
createDispatchEvent |
POST /repos/{owner}/{repo}/dispatches |
— | — |
createForAuthenticatedUser |
POST /user/repos |
— | — |
createFork |
POST /repos/{owner}/{repo}/forks |
— | — |
createInOrg |
POST /orgs/{org}/repos |
— | — |
createOrUpdateEnvironment |
PUT /repos/{owner}/{repo}/environments/{environment_name} |
— | — |
createOrUpdateFileContents |
PUT /repos/{owner}/{repo}/contents/{path} |
— | — |
createOrgRuleset |
POST /orgs/{org}/rulesets |
— | — |
createPagesDeployment |
POST /repos/{owner}/{repo}/pages/deployments |
— | — |
createPagesSite |
POST /repos/{owner}/{repo}/pages |
— | — |
createRelease |
POST /repos/{owner}/{repo}/releases |
— | — |
createRepoRuleset |
POST /repos/{owner}/{repo}/rulesets |
— | — |
createUsingTemplate |
POST /repos/{template_owner}/{template_repo}/generate |
— | — |
createWebhook |
POST /repos/{owner}/{repo}/hooks |
— | — |
customPropertiesForReposCreateOrUpdateRepositoryValues |
PATCH /repos/{owner}/{repo}/properties/values |
— | — |
customPropertiesForReposGetRepositoryValues |
GET /repos/{owner}/{repo}/properties/values |
— | — |
declineInvitation |
DELETE /user/repository_invitations/{invitation_id} |
— | renamed to repos.declineInvitationForAuthenticatedUser |
declineInvitationForAuthenticatedUser |
DELETE /user/repository_invitations/{invitation_id} |
— | — |
delete |
DELETE /repos/{owner}/{repo} |
— | — |
deleteAccessRestrictions |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions |
— | — |
deleteAdminBranchProtection |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins |
— | — |
deleteAnEnvironment |
DELETE /repos/{owner}/{repo}/environments/{environment_name} |
— | — |
deleteAutolink |
DELETE /repos/{owner}/{repo}/autolinks/{autolink_id} |
— | — |
deleteBranchProtection |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection |
— | — |
deleteCommitComment |
DELETE /repos/{owner}/{repo}/comments/{comment_id} |
— | — |
deleteCommitSignatureProtection |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures |
— | — |
deleteDeployKey |
DELETE /repos/{owner}/{repo}/keys/{key_id} |
— | — |
deleteDeployment |
DELETE /repos/{owner}/{repo}/deployments/{deployment_id} |
— | — |
deleteDeploymentBranchPolicy |
DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} |
— | — |
deleteFile |
DELETE /repos/{owner}/{repo}/contents/{path} |
— | — |
deleteInvitation |
DELETE /repos/{owner}/{repo}/invitations/{invitation_id} |
— | — |
deleteOrgRuleset |
DELETE /orgs/{org}/rulesets/{ruleset_id} |
— | — |
deletePagesSite |
DELETE /repos/{owner}/{repo}/pages |
— | — |
deletePullRequestReviewProtection |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews |
— | — |
deleteRelease |
DELETE /repos/{owner}/{repo}/releases/{release_id} |
— | — |
deleteReleaseAsset |
DELETE /repos/{owner}/{repo}/releases/assets/{asset_id} |
— | — |
deleteRepoRuleset |
DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id} |
— | — |
deleteWebhook |
DELETE /repos/{owner}/{repo}/hooks/{hook_id} |
— | — |
disableAutomatedSecurityFixes |
DELETE /repos/{owner}/{repo}/automated-security-fixes |
— | — |
disableDeploymentProtectionRule |
DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id} |
— | — |
disableImmutableReleases |
DELETE /repos/{owner}/{repo}/immutable-releases |
— | — |
disablePrivateVulnerabilityReporting |
DELETE /repos/{owner}/{repo}/private-vulnerability-reporting |
— | — |
disableVulnerabilityAlerts |
DELETE /repos/{owner}/{repo}/vulnerability-alerts |
— | — |
downloadArchive |
GET /repos/{owner}/{repo}/zipball/{ref} |
— | renamed to repos.downloadZipballArchive |
downloadTarballArchive |
GET /repos/{owner}/{repo}/tarball/{ref} |
— | — |
downloadZipballArchive |
GET /repos/{owner}/{repo}/zipball/{ref} |
— | — |
enableAutomatedSecurityFixes |
PUT /repos/{owner}/{repo}/automated-security-fixes |
— | — |
enableImmutableReleases |
PUT /repos/{owner}/{repo}/immutable-releases |
— | — |
enablePrivateVulnerabilityReporting |
PUT /repos/{owner}/{repo}/private-vulnerability-reporting |
— | — |
enableVulnerabilityAlerts |
PUT /repos/{owner}/{repo}/vulnerability-alerts |
— | — |
generateReleaseNotes |
POST /repos/{owner}/{repo}/releases/generate-notes |
— | — |
get |
GET /repos/{owner}/{repo} |
— | — |
getAccessRestrictions |
GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions |
— | — |
getAdminBranchProtection |
GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins |
— | — |
getAllDeploymentProtectionRules |
GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules |
— | — |
getAllEnvironments |
GET /repos/{owner}/{repo}/environments |
yes | — |
getAllStatusCheckContexts |
GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts |
— | — |
getAllTopics |
GET /repos/{owner}/{repo}/topics |
yes | — |
getAppsWithAccessToProtectedBranch |
GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps |
— | — |
getAutolink |
GET /repos/{owner}/{repo}/autolinks/{autolink_id} |
— | — |
getBranch |
GET /repos/{owner}/{repo}/branches/{branch} |
— | — |
getBranchProtection |
GET /repos/{owner}/{repo}/branches/{branch}/protection |
— | — |
getBranchRules |
GET /repos/{owner}/{repo}/rules/branches/{branch} |
yes | — |
getClones |
GET /repos/{owner}/{repo}/traffic/clones |
— | — |
getCodeFrequencyStats |
GET /repos/{owner}/{repo}/stats/code_frequency |
— | — |
getCollaboratorPermissionLevel |
GET /repos/{owner}/{repo}/collaborators/{username}/permission |
— | — |
getCombinedStatusForRef |
GET /repos/{owner}/{repo}/commits/{ref}/status |
yes | — |
getCommit |
GET /repos/{owner}/{repo}/commits/{ref} |
— | — |
getCommitActivityStats |
GET /repos/{owner}/{repo}/stats/commit_activity |
— | — |
getCommitComment |
GET /repos/{owner}/{repo}/comments/{comment_id} |
— | — |
getCommitSignatureProtection |
GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures |
— | — |
getCommunityProfileMetrics |
GET /repos/{owner}/{repo}/community/profile |
— | — |
getContent |
GET /repos/{owner}/{repo}/contents/{path} |
— | — |
getContributorsStats |
GET /repos/{owner}/{repo}/stats/contributors |
— | — |
getCustomDeploymentProtectionRule |
GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id} |
— | — |
getDeployKey |
GET /repos/{owner}/{repo}/keys/{key_id} |
— | — |
getDeployment |
GET /repos/{owner}/{repo}/deployments/{deployment_id} |
— | — |
getDeploymentBranchPolicy |
GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} |
— | — |
getDeploymentStatus |
GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id} |
— | — |
getEnvironment |
GET /repos/{owner}/{repo}/environments/{environment_name} |
— | — |
getLatestPagesBuild |
GET /repos/{owner}/{repo}/pages/builds/latest |
— | — |
getLatestRelease |
GET /repos/{owner}/{repo}/releases/latest |
— | — |
getOrgRuleSuite |
GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id} |
— | — |
getOrgRuleSuites |
GET /orgs/{org}/rulesets/rule-suites |
yes | — |
getOrgRuleset |
GET /orgs/{org}/rulesets/{ruleset_id} |
— | — |
getOrgRulesets |
GET /orgs/{org}/rulesets |
yes | — |
getPages |
GET /repos/{owner}/{repo}/pages |
— | — |
getPagesBuild |
GET /repos/{owner}/{repo}/pages/builds/{build_id} |
— | — |
getPagesDeployment |
GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id} |
— | — |
getPagesHealthCheck |
GET /repos/{owner}/{repo}/pages/health |
— | — |
getParticipationStats |
GET /repos/{owner}/{repo}/stats/participation |
— | — |
getPullRequestReviewProtection |
GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews |
— | — |
getPunchCardStats |
GET /repos/{owner}/{repo}/stats/punch_card |
— | — |
getReadme |
GET /repos/{owner}/{repo}/readme |
— | — |
getReadmeInDirectory |
GET /repos/{owner}/{repo}/readme/{dir} |
— | — |
getRelease |
GET /repos/{owner}/{repo}/releases/{release_id} |
— | — |
getReleaseAsset |
GET /repos/{owner}/{repo}/releases/assets/{asset_id} |
— | — |
getReleaseByTag |
GET /repos/{owner}/{repo}/releases/tags/{tag} |
— | — |
getRepoRuleSuite |
GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id} |
— | — |
getRepoRuleSuites |
GET /repos/{owner}/{repo}/rulesets/rule-suites |
yes | — |
getRepoRuleset |
GET /repos/{owner}/{repo}/rulesets/{ruleset_id} |
— | — |
getRepoRulesetHistory |
GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history |
yes | — |
getRepoRulesetVersion |
GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id} |
— | — |
getRepoRulesets |
GET /repos/{owner}/{repo}/rulesets |
yes | — |
getStatusChecksProtection |
GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks |
— | — |
getTeamsWithAccessToProtectedBranch |
GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams |
— | — |
getTopPaths |
GET /repos/{owner}/{repo}/traffic/popular/paths |
— | — |
getTopReferrers |
GET /repos/{owner}/{repo}/traffic/popular/referrers |
— | — |
getUsersWithAccessToProtectedBranch |
GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users |
— | — |
getViews |
GET /repos/{owner}/{repo}/traffic/views |
— | — |
getWebhook |
GET /repos/{owner}/{repo}/hooks/{hook_id} |
— | — |
getWebhookConfigForRepo |
GET /repos/{owner}/{repo}/hooks/{hook_id}/config |
— | — |
getWebhookDelivery |
GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id} |
— | — |
listActivities |
GET /repos/{owner}/{repo}/activity |
yes | — |
listAttestations |
GET /repos/{owner}/{repo}/attestations/{subject_digest} |
yes | — |
listAutolinks |
GET /repos/{owner}/{repo}/autolinks |
— | — |
listBranches |
GET /repos/{owner}/{repo}/branches |
yes | — |
listBranchesForHeadCommit |
GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head |
— | — |
listCollaborators |
GET /repos/{owner}/{repo}/collaborators |
yes | — |
listCommentsForCommit |
GET /repos/{owner}/{repo}/commits/{commit_sha}/comments |
yes | — |
listCommitCommentsForRepo |
GET /repos/{owner}/{repo}/comments |
yes | — |
listCommitStatusesForRef |
GET /repos/{owner}/{repo}/commits/{ref}/statuses |
yes | — |
listCommits |
GET /repos/{owner}/{repo}/commits |
yes | — |
listContributors |
GET /repos/{owner}/{repo}/contributors |
yes | — |
listCustomDeploymentRuleIntegrations |
GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps |
yes | — |
listDeployKeys |
GET /repos/{owner}/{repo}/keys |
yes | — |
listDeploymentBranchPolicies |
GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies |
yes | — |
listDeploymentStatuses |
GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses |
yes | — |
listDeployments |
GET /repos/{owner}/{repo}/deployments |
yes | — |
listForAuthenticatedUser |
GET /user/repos |
yes | — |
listForOrg |
GET /orgs/{org}/repos |
yes | — |
listForUser |
GET /users/{username}/repos |
yes | — |
listForks |
GET /repos/{owner}/{repo}/forks |
yes | — |
listInvitations |
GET /repos/{owner}/{repo}/invitations |
yes | — |
listInvitationsForAuthenticatedUser |
GET /user/repository_invitations |
yes | — |
listLanguages |
GET /repos/{owner}/{repo}/languages |
— | — |
listPagesBuilds |
GET /repos/{owner}/{repo}/pages/builds |
yes | — |
listPublic |
GET /repositories |
yes | — |
listPullRequestsAssociatedWithCommit |
GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls |
yes | — |
listReleaseAssets |
GET /repos/{owner}/{repo}/releases/{release_id}/assets |
yes | — |
listReleases |
GET /repos/{owner}/{repo}/releases |
yes | — |
listTags |
GET /repos/{owner}/{repo}/tags |
yes | — |
listTeams |
GET /repos/{owner}/{repo}/teams |
yes | — |
listWebhookDeliveries |
GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries |
yes | — |
listWebhooks |
GET /repos/{owner}/{repo}/hooks |
yes | — |
merge |
POST /repos/{owner}/{repo}/merges |
— | — |
mergeUpstream |
POST /repos/{owner}/{repo}/merge-upstream |
— | — |
pingWebhook |
POST /repos/{owner}/{repo}/hooks/{hook_id}/pings |
— | — |
redeliverWebhookDelivery |
POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts |
— | — |
removeAppAccessRestrictions |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps |
— | mapToData "apps" |
removeCollaborator |
DELETE /repos/{owner}/{repo}/collaborators/{username} |
— | — |
removeStatusCheckContexts |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts |
— | mapToData "contexts" |
removeStatusCheckProtection |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks |
— | — |
removeTeamAccessRestrictions |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams |
— | mapToData "teams" |
removeUserAccessRestrictions |
DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users |
— | mapToData "users" |
renameBranch |
POST /repos/{owner}/{repo}/branches/{branch}/rename |
— | — |
replaceAllTopics |
PUT /repos/{owner}/{repo}/topics |
— | — |
requestPagesBuild |
POST /repos/{owner}/{repo}/pages/builds |
— | — |
setAdminBranchProtection |
POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins |
— | — |
setAppAccessRestrictions |
PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps |
— | mapToData "apps" |
setStatusCheckContexts |
PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts |
— | mapToData "contexts" |
setTeamAccessRestrictions |
PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams |
— | mapToData "teams" |
setUserAccessRestrictions |
PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users |
— | mapToData "users" |
testPushWebhook |
POST /repos/{owner}/{repo}/hooks/{hook_id}/tests |
— | — |
transfer |
POST /repos/{owner}/{repo}/transfer |
— | — |
update |
PATCH /repos/{owner}/{repo} |
— | — |
updateBranchProtection |
PUT /repos/{owner}/{repo}/branches/{branch}/protection |
— | — |
updateCommitComment |
PATCH /repos/{owner}/{repo}/comments/{comment_id} |
— | — |
updateDeploymentBranchPolicy |
PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} |
— | — |
updateInformationAboutPagesSite |
PUT /repos/{owner}/{repo}/pages |
— | — |
updateInvitation |
PATCH /repos/{owner}/{repo}/invitations/{invitation_id} |
— | — |
updateOrgRuleset |
PUT /orgs/{org}/rulesets/{ruleset_id} |
— | — |
updatePullRequestReviewProtection |
PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews |
— | — |
updateRelease |
PATCH /repos/{owner}/{repo}/releases/{release_id} |
— | — |
updateReleaseAsset |
PATCH /repos/{owner}/{repo}/releases/assets/{asset_id} |
— | — |
updateRepoRuleset |
PUT /repos/{owner}/{repo}/rulesets/{ruleset_id} |
— | — |
updateStatusCheckPotection |
PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks |
— | renamed to repos.updateStatusCheckProtection |
updateStatusCheckProtection |
PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks |
— | — |
updateWebhook |
PATCH /repos/{owner}/{repo}/hooks/{hook_id} |
— | — |
updateWebhookConfigForRepo |
PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config |
— | — |
uploadReleaseAsset |
POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label} |
— | defaults {"baseUrl":"https://uploads.github.com"} |