From a340162d841e7ae6a0b319eb6e5af229e77d857f Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Mon, 10 Jan 2022 17:53:12 -0800 Subject: [PATCH] reorganize repository apis (#23728) Co-authored-by: Lucas Costi Co-authored-by: Peter Bengtsson --- components/article/ArticlePage.tsx | 36 + .../article/ClientsideRedirectExceptions.tsx | 35 + components/page-header/RestRepoBanner.tsx | 4 +- content/rest/reference/branches.md | 14 +- content/rest/reference/collaborators.md | 4 +- content/rest/reference/commits.md | 8 +- content/rest/reference/deployments.md | 31 +- content/rest/reference/index.md | 6 +- .../{repository-metrics.md => metrics.md} | 8 +- content/rest/reference/pages.md | 2 +- content/rest/reference/releases.md | 8 +- content/rest/reference/webhooks.md | 34 +- .../webhooks/webhooks-rest-api-links.md | 2 +- .../static/rest-api-redirect-exceptions.json | 124 +++ lib/rest/index.js | 11 - lib/rest/static/decorated/api.github.com.json | 772 ++++++++---------- lib/rest/static/decorated/ghes-3.0.json | 688 +++++++--------- lib/rest/static/decorated/ghes-3.1.json | 694 +++++++--------- lib/rest/static/decorated/ghes-3.2.json | 734 ++++++++--------- lib/rest/static/decorated/ghes-3.3.json | 746 ++++++++--------- lib/rest/static/decorated/github.ae.json | 718 ++++++++-------- middleware/contextualizers/rest.js | 9 +- script/rest/update-files.js | 31 +- script/rest/utils/operation.js | 25 +- script/rest/utils/rest-api-overrides.json | 612 ++++++++++++++ tests/rendering/rest.js | 3 +- .../rest/reference/repository-metrics.md | 61 -- .../rest/reference/repository-metrics.md | 61 -- .../rest/reference/repository-metrics.md | 61 -- .../rest/reference/repository-metrics.md | 61 -- 30 files changed, 2904 insertions(+), 2699 deletions(-) create mode 100644 components/article/ClientsideRedirectExceptions.tsx rename content/rest/reference/{repository-metrics.md => metrics.md} (91%) create mode 100644 lib/redirects/static/rest-api-redirect-exceptions.json create mode 100644 script/rest/utils/rest-api-overrides.json delete mode 100644 translations/es-ES/content/rest/reference/repository-metrics.md delete mode 100644 translations/ja-JP/content/rest/reference/repository-metrics.md delete mode 100644 translations/pt-BR/content/rest/reference/repository-metrics.md delete mode 100644 translations/zh-CN/content/rest/reference/repository-metrics.md diff --git a/components/article/ArticlePage.tsx b/components/article/ArticlePage.tsx index 08133d768c47..483bb44f5bde 100644 --- a/components/article/ArticlePage.tsx +++ b/components/article/ArticlePage.tsx @@ -1,4 +1,6 @@ +import { useState, useEffect } from 'react' import { useRouter } from 'next/router' +import dynamic from 'next/dynamic' import cx from 'classnames' import { ActionList, Heading } from '@primer/components' @@ -17,6 +19,10 @@ import { ArticleGridLayout } from './ArticleGridLayout' import { PlatformPicker } from 'components/article/PlatformPicker' import { ToolPicker } from 'components/article/ToolPicker' +const ClientSideRedirectExceptions = dynamic(() => import('./ClientsideRedirectExceptions'), { + ssr: false, +}) + // Mapping of a "normal" article to it's interactive counterpart const interactiveAlternatives: Record = { '/actions/automating-builds-and-tests/building-and-testing-nodejs': { @@ -79,8 +85,38 @@ export const ArticlePage = () => { ) } + // We have some one-off redirects for rest api docs + // currently those are limited to the repos page, but + // that will grow soon as we restructure the rest api docs. + // This is a workaround to updating the hardcoded links + // directly in the REST API code in a separate repo, which + // requires many file changes and teams to sign off. + // While the organization is turbulent, we can do this. + // Once it's more settled, we can refactor the rest api code + // to leverage the OpenAPI urls rather than hardcoded urls. + // The code below determines if we should bother loading this redirecting + // component at all. + // The reason this isn't done at the server-level is because there you + // can't possibly access the URL hash. That's only known in client-side + // code. + const [loadClientsideRedirectExceptions, setLoadClientsideRedirectExceptions] = useState(false) + useEffect(() => { + const { hash, pathname } = window.location + // Today, Jan 2022, it's known explicitly what the pathname. + // In the future there might be more. + // Hopefully, we can some day delete all of this and no longer + // be dependent on the URL hash to do the redirect. + if (hash && pathname.endsWith('/rest/reference/repos')) { + setLoadClientsideRedirectExceptions(true) + } + }, []) + return ( + {/* Doesn't matter *where* this is included because it will + never render anything. It always just return null. */} + {loadClientsideRedirectExceptions && } +
{title}} diff --git a/components/article/ClientsideRedirectExceptions.tsx b/components/article/ClientsideRedirectExceptions.tsx new file mode 100644 index 000000000000..8c3923a8149f --- /dev/null +++ b/components/article/ClientsideRedirectExceptions.tsx @@ -0,0 +1,35 @@ +import { useEffect } from 'react' +import { useRouter } from 'next/router' + +import overrides from '../../lib/redirects/static/rest-api-redirect-exceptions.json' +const overrideRedirects: Record = overrides + +export default function ClientSideRedirectExceptions() { + const router = useRouter() + useEffect(() => { + // We have some one-off redirects for rest api docs + // currently those are limited to the repos page, but + // that will grow soon as we restructure the rest api docs. + // This is a workaround to updating the hardcoded links + // directly in the REST API code in a separate repo, which + // requires many file changes and teams to sign off. + // While the organization is turbulent, we can do this. + // Once it's more settled, we can refactor the rest api code + // to leverage the OpenAPI urls rather than hardcoded urls. + const { hash, pathname } = window.location + + // The `hash` will start with a `#` but all the keys in + // `overrideRedirects` do not. Hence, this slice. + const combined = pathname + hash + const overrideKey = combined + .replace(`/${router.locale}`, '') + .replace(`/${router.query.versionId || ''}`, '') + const redirectToName = overrideRedirects[overrideKey] + if (redirectToName) { + const newPathname = combined.replace(overrideKey, redirectToName) + router.replace(newPathname) + } + }, []) + + return null +} diff --git a/components/page-header/RestRepoBanner.tsx b/components/page-header/RestRepoBanner.tsx index ec0230d52893..07d229abecfc 100644 --- a/components/page-header/RestRepoBanner.tsx +++ b/components/page-header/RestRepoBanner.tsx @@ -11,7 +11,7 @@ const restDisplayPages = [ '/rest/reference/pages', '/rest/reference/releases', '/rest/reference/repos', - '/rest/reference/repository-metrics', + '/rest/reference/metrics', '/rest/reference/webhooks', ] const restRepoCategoryExceptionsTitles = { @@ -21,7 +21,7 @@ const restRepoCategoryExceptionsTitles = { deployments: 'Deployments', pages: 'GitHub Pages', releases: 'Releases', - 'repository-metrics': 'Repository metrics', + metrics: 'Metrics', webhooks: 'Webhooks', } diff --git a/content/rest/reference/branches.md b/content/rest/reference/branches.md index 60a187a93b68..e6f2f129828e 100644 --- a/content/rest/reference/branches.md +++ b/content/rest/reference/branches.md @@ -12,19 +12,11 @@ topics: miniTocMaxHeadingLevel: 3 --- -## Branches {% for operation in currentRestOperations %} - {% if operation.subcategory == 'branches' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %} -## Merging - -The Repo Merging API supports merging branches in a repository. This accomplishes -essentially the same thing as merging one branch into another in a local repository -and then pushing to {% data variables.product.product_name %}. The benefit is that the merge is done on the server side and a local repository is not needed. This makes it more appropriate for automation and other tools where maintaining local repositories would be cumbersome and inefficient. - -The authenticated user will be the author of any merges done through this endpoint. - +## Protected branches {% for operation in currentRestOperations %} - {% if operation.subcategory == 'merging' %}{% include rest_operation %}{% endif %} + {% if operation.subcategory == 'branch-protection' %}{% include rest_operation %}{% endif %} {% endfor %} \ No newline at end of file diff --git a/content/rest/reference/collaborators.md b/content/rest/reference/collaborators.md index c4842b704938..bec03092ee78 100644 --- a/content/rest/reference/collaborators.md +++ b/content/rest/reference/collaborators.md @@ -12,10 +12,8 @@ topics: miniTocMaxHeadingLevel: 3 --- -## Collaborators - {% for operation in currentRestOperations %} - {% if operation.subcategory == 'collaborators' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %} ## Invitations diff --git a/content/rest/reference/commits.md b/content/rest/reference/commits.md index 79591a09a6af..4a017fd4564f 100644 --- a/content/rest/reference/commits.md +++ b/content/rest/reference/commits.md @@ -1,6 +1,6 @@ --- title: Commits -intro: 'The commits API allows you to retrieve information and commits, create commit comments, and create commit statuses.' +intro: 'The commits API allows you to list, view, and compare commits in a repository. You can also interact with commit comments and commit statuses.' allowTitleToDifferFromFilename: true versions: fpt: '*' @@ -12,12 +12,8 @@ topics: miniTocMaxHeadingLevel: 3 --- -## Commits - -The Repo Commits API supports listing, viewing, and comparing commits in a repository. - {% for operation in currentRestOperations %} - {% if operation.subcategory == 'commits' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %} ## Commit comments diff --git a/content/rest/reference/deployments.md b/content/rest/reference/deployments.md index 1170b204853f..c83f7a5ae4e0 100644 --- a/content/rest/reference/deployments.md +++ b/content/rest/reference/deployments.md @@ -12,18 +12,6 @@ topics: miniTocMaxHeadingLevel: 3 --- -## Deploy keys - -{% data reusables.repositories.deploy-keys %} - -Deploy keys can either be setup using the following API endpoints, or by using GitHub. To learn how to set deploy keys up in GitHub, see "[Managing deploy keys](/developers/overview/managing-deploy-keys)." - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'keys' %}{% include rest_operation %}{% endif %} -{% endfor %} - -## Deployments - Deployments are requests to deploy a specific ref (branch, SHA, tag). GitHub dispatches a [`deployment` event](/developers/webhooks-and-events/webhook-events-and-payloads#deployment) that external services can listen for and act on when new deployments are created. Deployments enable developers and organizations to build loosely coupled tooling around deployments, without having to worry about the implementation details of delivering different types of applications (e.g., web, native). Deployment statuses allow external services to mark deployments with an `error`, `failure`, `pending`, `in_progress`, `queued`, or `success` state that systems listening to [`deployment_status` events](/developers/webhooks-and-events/webhook-events-and-payloads#deployment_status) can consume. @@ -66,7 +54,6 @@ Keep in mind that GitHub is never actually accessing your servers. It's up to yo Note that the `repo_deployment` [OAuth scope](/developers/apps/scopes-for-oauth-apps) grants targeted access to deployments and deployment statuses **without** granting access to repository code, while the {% ifversion not ghae %}`public_repo` and{% endif %}`repo` scopes grant permission to code as well. - ### Inactive deployments When you set the state of a deployment to `success`, then all prior non-transient, non-production environment deployments in the same repository with the same environment name will become `inactive`. To avoid this, you can set `auto_inactive` to `false` when creating the deployment status. @@ -74,7 +61,23 @@ When you set the state of a deployment to `success`, then all prior non-transien You can communicate that a transient environment no longer exists by setting its `state` to `inactive`. Setting the `state` to `inactive` shows the deployment as `destroyed` in {% data variables.product.prodname_dotcom %} and removes access to it. {% for operation in currentRestOperations %} - {% if operation.subcategory == 'deployments' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} +{% endfor %} + +## Deployment statuses + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'statuses' %}{% include rest_operation %}{% endif %} +{% endfor %} + +## Deploy keys + +{% data reusables.repositories.deploy-keys %} + +Deploy keys can either be setup using the following API endpoints, or by using GitHub. To learn how to set deploy keys up in GitHub, see "[Managing deploy keys](/developers/overview/managing-deploy-keys)." + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'keys' %}{% include rest_operation %}{% endif %} {% endfor %} {% ifversion fpt or ghes > 3.1 or ghae or ghec %} diff --git a/content/rest/reference/index.md b/content/rest/reference/index.md index 5494db97e994..b17a0da79412 100644 --- a/content/rest/reference/index.md +++ b/content/rest/reference/index.md @@ -19,32 +19,32 @@ children: - /codes-of-conduct - /code-scanning - /codespaces - - /commits - /collaborators + - /commits - /dependabot - /deployments - /emojis - /enterprise-admin - /gists - /git - - /pages - /gitignore - /interactions - /issues - /licenses - /markdown - /meta + - /metrics - /migrations - /oauth-authorizations - /orgs - /packages + - /pages - /projects - /pulls - /rate-limit - /reactions - /releases - /repos - - /repository-metrics - /scim - /search - /secret-scanning diff --git a/content/rest/reference/repository-metrics.md b/content/rest/reference/metrics.md similarity index 91% rename from content/rest/reference/repository-metrics.md rename to content/rest/reference/metrics.md index aea394d6e09c..e7e1dd1926eb 100644 --- a/content/rest/reference/repository-metrics.md +++ b/content/rest/reference/metrics.md @@ -1,7 +1,9 @@ --- -title: Repository metrics +title: Metrics intro: 'The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository.' allowTitleToDifferFromFilename: true +redirect_from: + - /rest/reference/repository-metrics versions: fpt: '*' ghes: '*' @@ -12,6 +14,10 @@ topics: miniTocMaxHeadingLevel: 3 --- +{% for operation in currentRestOperations %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} +{% endfor %} + {% ifversion fpt or ghec %} ## Community diff --git a/content/rest/reference/pages.md b/content/rest/reference/pages.md index 713ca428fc79..4892f85cfebf 100644 --- a/content/rest/reference/pages.md +++ b/content/rest/reference/pages.md @@ -28,5 +28,5 @@ In {% data variables.product.prodname_pages %} API endpoints that return GitHub - `path`: The repository directory from which the site publishes. Will be either `/` or `/docs`. {% for operation in currentRestOperations %} - {% if operation.subcategory == 'pages' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %} \ No newline at end of file diff --git a/content/rest/reference/releases.md b/content/rest/reference/releases.md index a434451beab9..db97fc243f37 100644 --- a/content/rest/reference/releases.md +++ b/content/rest/reference/releases.md @@ -19,5 +19,11 @@ miniTocMaxHeadingLevel: 3 {% endnote %} {% for operation in currentRestOperations %} - {% if operation.subcategory == 'releases' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} +{% endfor %} + +## Release assets + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'assets' %}{% include rest_operation %}{% endif %} {% endfor %} \ No newline at end of file diff --git a/content/rest/reference/webhooks.md b/content/rest/reference/webhooks.md index c9908012c15c..c3ca959dc860 100644 --- a/content/rest/reference/webhooks.md +++ b/content/rest/reference/webhooks.md @@ -19,18 +19,36 @@ If you would like to set up a single webhook to receive events from all of your In addition to the REST API, {% data variables.product.prodname_dotcom %} can also serve as a [PubSubHubbub](#pubsubhubbub) hub for repositories. {% for operation in currentRestOperations %} - {% if operation.subcategory == 'webhooks' %}{% include rest_operation %}{% endif %} + {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %} -### Receiving Webhooks +## Repository webhooks + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'repos' %}{% include rest_operation %}{% endif %} +{% endfor %} + +## Repository webhook configuration + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'repo-config' %}{% include rest_operation %}{% endif %} +{% endfor %} + +## Repository webhook deliveries + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'repo-deliveries' %}{% include rest_operation %}{% endif %} +{% endfor %} + +## Receiving Webhooks In order for {% data variables.product.product_name %} to send webhook payloads, your server needs to be accessible from the Internet. We also highly suggest using SSL so that we can send encrypted payloads over HTTPS. -#### Webhook headers +### Webhook headers {% data variables.product.product_name %} will send along several HTTP headers to differentiate between event types and payload identifiers. See [webhook headers](/developers/webhooks-and-events/webhook-events-and-payloads#delivery-headers) for details. -### PubSubHubbub +## PubSubHubbub GitHub can also serve as a [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub) hub for all repositories. PSHB is a simple publish/subscribe protocol that lets servers register to receive updates when a topic is updated. The updates are sent with an HTTP POST request to a callback URL. Topic URLs for a GitHub repository's pushes are in this format: @@ -39,21 +57,21 @@ Topic URLs for a GitHub repository's pushes are in this format: The event can be any available webhook event. For more information, see "[Webhook events and payloads](/developers/webhooks-and-events/webhook-events-and-payloads)." -#### Response format +### Response format The default format is what [existing post-receive hooks should expect](/post-receive-hooks/): A JSON body sent as the `payload` parameter in a POST. You can also specify to receive the raw JSON body with either an `Accept` header, or a `.json` extension. Accept: application/json https://github.com/{owner}/{repo}/events/push.json -#### Callback URLs +### Callback URLs Callback URLs can use the `http://` protocol. # Send updates to postbin.org http://postbin.org/123 -#### Subscribing +### Subscribing The GitHub PubSubHubbub endpoint is: `{% data variables.product.api_url_code %}/hub`. A successful request with curl looks like: @@ -67,7 +85,7 @@ curl -u "user" -i \ PubSubHubbub requests can be sent multiple times. If the hook already exists, it will be modified according to the request. -##### Parameters +#### Parameters Name | Type | Description -----|------|-------------- diff --git a/data/reusables/webhooks/webhooks-rest-api-links.md b/data/reusables/webhooks/webhooks-rest-api-links.md index 3c55718e762e..affa74f408f5 100644 --- a/data/reusables/webhooks/webhooks-rest-api-links.md +++ b/data/reusables/webhooks/webhooks-rest-api-links.md @@ -1,5 +1,5 @@ The webhook REST APIs enable you to manage repository, organization, and app webhooks.{% ifversion fpt or ghes > 3.2 or ghae or ghec %} You can use this API to list webhook deliveries for a webhook, or get and redeliver an individual delivery for a webhook, which can be integrated into an external app or service.{% endif %} You can also use the REST API to change the configuration of the webhook. For example, you can modify the payload URL, content type, SSL verification, and secret. For more information, see: -- [Repository Webhooks REST API](/rest/reference/repos#webhooks) +- [Repository Webhooks REST API](/rest/reference/webhooks#repository-webhooks) - [Organization Webhooks REST API](/rest/reference/orgs#webhooks) - [{% data variables.product.prodname_github_app %} Webhooks REST API](/rest/reference/apps#webhooks) diff --git a/lib/redirects/static/rest-api-redirect-exceptions.json b/lib/redirects/static/rest-api-redirect-exceptions.json new file mode 100644 index 000000000000..7bb45b7b9f6a --- /dev/null +++ b/lib/redirects/static/rest-api-redirect-exceptions.json @@ -0,0 +1,124 @@ +{ + "/rest/reference/repos#list-repository-collaborators": "/rest/reference/collaborators#list-repository-collaborators", + "/rest/reference/repos#check-if-a-user-is-a-repository-collaborator": "/rest/reference/collaborators#check-if-a-user-is-a-repository-collaborator", + "/rest/reference/repos#add-a-repository-collaborator": "/rest/reference/collaborators#add-a-repository-collaborator", + "/rest/reference/repos#remove-a-repository-collaborator": "/rest/reference/collaborators#remove-a-repository-collaborator", + "/rest/reference/repos#get-repository-permissions-for-a-user": "/rest/reference/collaborators#get-repository-permissions-for-a-user", + "/rest/reference/repos#list-commit-comments-for-a-repository": "/rest/reference/commits#list-commit-comments-for-a-repository", + "/rest/reference/repos#get-a-commit-comment": "/rest/reference/commits#get-a-commit-comment", + "/rest/reference/repos#update-a-commit-comment": "/rest/reference/commits#update-a-commit-comment", + "/rest/reference/repos#delete-a-commit-comment": "/rest/reference/commits#delete-a-commit-comment", + "/rest/reference/repos#list-commits": "/rest/reference/commits#list-commits", + "/rest/reference/repos#list-branches-for-head-commit": "/rest/reference/commits#list-branches-for-head-commit", + "/rest/reference/repos#list-commit-comments": "/rest/reference/commits#list-commit-comments", + "/rest/reference/repos#create-a-commit-comment": "/rest/reference/commits#create-a-commit-comment", + "/rest/reference/repos#list-pull-requests-associated-with-a-commit": "/rest/reference/commits#list-pull-requests-associated-with-a-commit", + "/rest/reference/repos#get-a-commit": "/rest/reference/commits#get-a-commit", + "/rest/reference/repos#get-the-combined-status-for-a-specific-reference": "/rest/reference/commits#get-the-combined-status-for-a-specific-reference", + "/rest/reference/repos#list-commit-statuses-for-a-reference": "/rest/reference/commits#list-commit-statuses-for-a-reference", + "/rest/reference/repos#get-community-profile-metrics": "/rest/reference/metrics#get-community-profile-metrics", + "/rest/reference/repos#compare-two-commits": "/rest/reference/commits#compare-two-commits", + "/rest/reference/repos#get-all-environments": "/rest/reference/deployments#get-all-environments", + "/rest/reference/repos#get-an-environment": "/rest/reference/deployments#get-an-environment", + "/rest/reference/repos#create-or-update-an-environment": "/rest/reference/deployments#create-or-update-an-environment", + "/rest/reference/repos#delete-an-environment": "/rest/reference/deployments#delete-an-environment", + "/rest/reference/repos#list-repository-invitations": "/rest/reference/collaborators#list-repository-invitations", + "/rest/reference/repos#update-a-repository-invitation": "/rest/reference/collaborators#update-a-repository-invitation", + "/rest/reference/repos#delete-a-repository-invitation": "/rest/reference/collaborators#delete-a-repository-invitation", + "/rest/reference/repos#list-deploy-keys": "/rest/reference/deployments#list-deploy-keys", + "/rest/reference/repos#create-a-deploy-key": "/rest/reference/deployments#create-a-deploy-key", + "/rest/reference/repos#get-a-deploy-key": "/rest/reference/deployments#get-a-deploy-key", + "/rest/reference/repos#delete-a-deploy-key": "/rest/reference/deployments#delete-a-deploy-key", + "/rest/reference/repos#get-a-github-pages-site": "/rest/reference/pages#get-a-github-pages-site", + "/rest/reference/repos#create-a-github-pages-site": "/rest/reference/pages#create-a-github-pages-site", + "/rest/reference/repos#update-information-about-a-github-pages-site": "/rest/reference/pages#update-information-about-a-github-pages-site", + "/rest/reference/repos#delete-a-github-pages-site": "/rest/reference/pages#delete-a-github-pages-site", + "/rest/reference/repos#list-github-pages-builds": "/rest/reference/pages#list-github-pages-builds", + "/rest/reference/repos#request-a-github-pages-build": "/rest/reference/pages#request-a-github-pages-build", + "/rest/reference/repos#get-latest-pages-build": "/rest/reference/pages#get-latest-pages-build", + "/rest/reference/repos#get-github-pages-build": "/rest/reference/pages#get-github-pages-build", + "/rest/reference/repos#get-a-dns-health-check-for-github-pages": "/rest/reference/pages#get-a-dns-health-check-for-github-pages", + "/rest/reference/repos#get-the-weekly-commit-activity": "/rest/reference/metrics#get-the-weekly-commit-activity", + "/rest/reference/repos#get-the-last-year-of-commit-activity": "/rest/reference/metrics#get-the-last-year-of-commit-activity", + "/rest/reference/repos#get-all-contributor-commit-activity": "/rest/reference/metrics#get-all-contributor-commit-activity", + "/rest/reference/repos#get-the-weekly-commit-count": "/rest/reference/metrics#get-the-weekly-commit-count", + "/rest/reference/repos#get-the-hourly-commit-count-for-each-day": "/rest/reference/metrics#get-the-hourly-commit-count-for-each-day", + "/rest/reference/repos#create-a-commit-status": "/rest/reference/commits#create-a-commit-status", + "/rest/reference/repos#get-repository-clones": "/rest/reference/metrics#get-repository-clones", + "/rest/reference/repos#get-top-referral-paths": "/rest/reference/metrics#get-top-referral-paths", + "/rest/reference/repos#get-top-referral-sources": "/rest/reference/metrics#get-top-referral-sources", + "/rest/reference/repos#get-page-views": "/rest/reference/metrics#get-page-views", + "/rest/reference/repos#list-repository-invitations-for-the-authenticated-user": "/rest/reference/collaborators#list-repository-invitations-for-the-authenticated-user", + "/rest/reference/repos#accept-a-repository-invitation": "/rest/reference/collaborators#accept-a-repository-invitation", + "/rest/reference/repos#decline-a-repository-invitation": "/rest/reference/collaborators#decline-a-repository-invitation", + "/rest/reference/repos#list-branches": "/rest/reference/branches#list-branches", + "/rest/reference/repos#get-a-branch": "/rest/reference/branches#get-a-branch", + "/rest/reference/repos#rename-a-branch": "/rest/reference/branches#rename-a-branch", + "/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository": "/rest/reference/branches#sync-a-fork-branch-with-the-upstream-repository", + "/rest/reference/repos#merge-a-branch": "/rest/reference/branches#merge-a-branch", + "/rest/reference/repos#add-app-access-restrictions": "/rest/reference/branches#add-app-access-restrictions", + "/rest/reference/repos#add-status-check-contexts": "/rest/reference/branches#add-status-check-contexts", + "/rest/reference/repos#add-team-access-restrictions": "/rest/reference/branches#add-team-access-restrictions", + "/rest/reference/repos#add-user-access-restrictions": "/rest/reference/branches#add-user-access-restrictions", + "/rest/reference/repos#create-commit-signature-protection": "/rest/reference/branches#create-commit-signature-protection", + "/rest/reference/repos#delete-access-restrictions": "/rest/reference/branches#delete-access-restrictions", + "/rest/reference/repos#delete-admin-branch-protection": "/rest/reference/branches#delete-admin-branch-protection", + "/rest/reference/repos#delete-branch-protection": "/rest/reference/branches#delete-branch-protection", + "/rest/reference/repos#delete-commit-signature-protection": "/rest/reference/branches#delete-commit-signature-protection", + "/rest/reference/repos#delete-pull-request-review-protection": "/rest/reference/branches#delete-pull-request-review-protection", + "/rest/reference/repos#get-access-restrictions": "/rest/reference/branches#get-access-restrictions", + "/rest/reference/repos#get-admin-branch-protection": "/rest/reference/branches#get-admin-branch-protection", + "/rest/reference/repos#get-all-status-check-contexts": "/rest/reference/branches#get-all-status-check-contexts", + "/rest/reference/repos#list-apps-with-access-to-the-protected-branch": "/rest/reference/branches#list-apps-with-access-to-the-protected-branch", + "/rest/reference/repos#update-pull-request-review-protection": "/rest/reference/branches#update-pull-request-review-protection", + "/rest/reference/repos#get-branch-protection": "/rest/reference/branches#get-branch-protection", + "/rest/reference/repos#get-commit-signature-protection": "/rest/reference/branches#get-commit-signature-protection", + "/rest/reference/repos#get-pull-request-review-protection": "/rest/reference/branches#get-pull-request-review-protection", + "/rest/reference/repos#get-status-checks-protection": "/rest/reference/branches#get-status-checks-protection", + "/rest/reference/repos#list-teams-with-access-to-the-protected-branch": "/rest/reference/branches#list-teams-with-access-to-the-protected-branch", + "/rest/reference/repos#list-users-with-access-to-the-protected-branch": "/rest/reference/branches#list-users-with-access-to-the-protected-branch", + "/rest/reference/repos#remove-app-access-restrictions": "/rest/reference/branches#remove-app-access-restrictions", + "/rest/reference/repos#remove-status-check-contexts": "/rest/reference/branches#remove-status-check-contexts", + "/rest/reference/repos#remove-status-check-protection": "/rest/reference/branches#remove-status-check-protection", + "/rest/reference/repos#remove-team-access-restrictions": "/rest/reference/branches#remove-team-access-restrictions", + "/rest/reference/repos#remove-user-access-restrictions": "/rest/reference/branches#remove-user-access-restrictions", + "/rest/reference/repos#set-admin-branch-protection": "/rest/reference/branches#set-admin-branch-protection", + "/rest/reference/repos#set-app-access-restrictions": "/rest/reference/branches#set-app-access-restrictions", + "/rest/reference/repos#set-status-check-contexts": "/rest/reference/branches#set-status-check-contexts", + "/rest/reference/repos#set-team-access-restrictions": "/rest/reference/branches#set-team-access-restrictions", + "/rest/reference/repos#set-user-access-restrictions": "/rest/reference/branches#set-user-access-restrictions", + "/rest/reference/repos#update-branch-protection": "/rest/reference/branches#update-branch-protection", + "/rest/reference/repos#update-status-check-protection": "/rest/reference/branches#update-status-check-protection", + "/rest/reference/repos#create-a-deployment-status": "/rest/reference/deployments#create-a-deployment-status", + "/rest/reference/repos#list-deployment-statuses": "/rest/reference/deployments#list-deployment-statuses", + "/rest/reference/repos#get-a-deployment-status": "/rest/reference/deployments#get-a-deployment-status", + "/rest/reference/repos#list-deployments": "/rest/reference/deployments#list-deployments", + "/rest/reference/repos#create-a-deployment": "/rest/reference/deployments#create-a-deployment", + "/rest/reference/repos#get-a-deployment": "/rest/reference/deployments#get-a-deployment", + "/rest/reference/repos#delete-a-deployment": "/rest/reference/deployments#delete-a-deployment", + "/rest/reference/repos#list-releases": "/rest/reference/releases#list-releases", + "/rest/reference/repos#create-a-release": "/rest/reference/releases#create-a-release", + "/rest/reference/repos#generate-release-notes": "/rest/reference/releases#generate-release-notes", + "/rest/reference/repos#get-the-latest-release": "/rest/reference/releases#get-the-latest-release", + "/rest/reference/repos#get-a-release-by-tag-name": "/rest/reference/releases#get-a-release-by-tag-name", + "/rest/reference/repos#get-a-release": "/rest/reference/releases#get-a-release", + "/rest/reference/repos#update-a-release": "/rest/reference/releases#update-a-release", + "/rest/reference/repos#delete-a-release": "/rest/reference/releases#delete-a-release", + "/rest/reference/repos#delete-a-release-asset": "/rest/reference/releases#delete-a-release-asset", + "/rest/reference/repos#get-a-release-asset": "/rest/reference/releases#get-a-release-asset", + "/rest/reference/repos#list-release-assets": "/rest/reference/releases#list-release-assets", + "/rest/reference/repos#update-a-release-asset": "/rest/reference/releases#update-a-release-asset", + "/rest/reference/repos#upload-a-release-asset": "/rest/reference/releases#upload-a-release-asset", + "/rest/reference/repos#list-repository-webhooks": "/rest/reference/webhooks#list-repository-webhooks", + "/rest/reference/repos#create-a-repository-webhook": "/rest/reference/webhooks#create-a-repository-webhook", + "/rest/reference/repos#get-a-repository-webhook": "/rest/reference/webhooks#get-a-repository-webhook", + "/rest/reference/repos#update-a-repository-webhook": "/rest/reference/webhooks#update-a-repository-webhook", + "/rest/reference/repos#delete-a-repository-webhook": "/rest/reference/webhooks#delete-a-repository-webhook", + "/rest/reference/repos#ping-a-repository-webhook": "/rest/reference/webhooks#ping-a-repository-webhook", + "/rest/reference/repos#test-the-push-repository-webhook": "/rest/reference/webhooks#test-the-push-repository-webhook", + "/rest/reference/repos#get-a-webhook-configuration-for-a-repository": "/rest/reference/webhooks#get-a-webhook-configuration-for-a-repository", + "/rest/reference/repos#update-a-webhook-configuration-for-a-repository": "/rest/reference/webhooks#update-a-webhook-configuration-for-a-repository", + "/rest/reference/repos#get-a-delivery-for-a-repository-webhook": "/rest/reference/webhooks#get-a-delivery-for-a-repository-webhook", + "/rest/reference/repos#list-deliveries-for-a-repository-webhook": "/rest/reference/webhooks#list-deliveries-for-a-repository-webhook", + "/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook": "/rest/reference/webhooks#redeliver-a-delivery-for-a-repository-webhook" +} \ No newline at end of file diff --git a/lib/rest/index.js b/lib/rest/index.js index d698dc27f202..b6572babd093 100644 --- a/lib/rest/index.js +++ b/lib/rest/index.js @@ -8,17 +8,6 @@ import { readCompressedJsonFileFallback } from '../read-json-file.js' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const schemasPath = path.join(__dirname, 'static/decorated') -export const restRepoCategoryExceptions = [ - 'branches', - 'collaborators', - 'commits', - 'deployments', - 'pages', - 'releases', - 'repository-metrics', - 'webhooks', -] - export default async function getRest() { const operations = {} fs.readdirSync(schemasPath).forEach((filename) => { diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 8458a270e3c2..359bdb0d19df 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -40387,10 +40387,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -40472,10 +40470,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -40566,10 +40562,10 @@ "subcategory": "branches" }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -41478,10 +41474,10 @@ "subcategory": "branches" }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -42338,10 +42334,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -42422,10 +42418,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -42502,10 +42498,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -42582,10 +42578,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -42666,10 +42662,10 @@ "subcategory": "branches" }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -42941,10 +42937,10 @@ "subcategory": "branches" }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -43190,10 +43186,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -43274,10 +43270,10 @@ "subcategory": "branches" }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -43359,10 +43355,10 @@ "subcategory": "branches" }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -43444,10 +43440,10 @@ "subcategory": "branches" }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -43528,10 +43524,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -43714,10 +43710,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -43889,10 +43885,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -43968,10 +43964,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -44097,10 +44093,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -44250,10 +44246,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -44397,10 +44393,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -44501,10 +44497,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -44586,10 +44582,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -44665,10 +44661,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -44793,10 +44789,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -44935,10 +44931,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45076,10 +45072,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45175,10 +45171,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -45304,10 +45300,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45447,10 +45443,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45589,10 +45585,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45688,10 +45684,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -45816,10 +45812,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -45958,10 +45954,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -46099,10 +46095,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -46225,10 +46221,8 @@ "subcategory": "branches" }, "slug": "rename-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Renames a branch in a repository.

\n

Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"Renaming a branch\".

\n

The permissions required to use this endpoint depends on whether you are renaming the default branch.

\n

To rename a non-default branch:

\n
    \n
  • Users must have push access.
  • \n
  • GitHub Apps must have the contents:write repository permission.
  • \n
\n

To rename the default branch:

\n
    \n
  • Users must have admin or owner permissions.
  • \n
  • GitHub Apps must have the administration:write repository permission.
  • \n
", @@ -53032,10 +53026,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -53115,10 +53107,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -53236,10 +53226,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -53357,10 +53345,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -53434,10 +53420,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -53528,8 +53512,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -53607,8 +53591,8 @@ "subcategory": "comments" }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -53718,8 +53702,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -53813,8 +53797,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -54316,10 +54300,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -54416,10 +54398,8 @@ "subcategory": "commits" }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -54521,8 +54501,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -54659,8 +54639,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -54807,10 +54787,8 @@ "subcategory": "commits" }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -54907,10 +54885,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -55292,8 +55268,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -55397,8 +55373,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -55471,8 +55447,8 @@ "subcategory": "community" }, "slug": "get-community-profile-metrics", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "community", "subcategoryLabel": "Community", "notes": [], @@ -55570,10 +55546,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

To process a response with a large number of commits, you can use (per_page or page) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see \"Traversing with pagination.\"

\n

When calling this API without any paging parameters (per_page or page), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -57327,10 +57301,8 @@ "subcategory": "deployments" }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -57533,10 +57505,8 @@ "subcategory": "deployments" }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -57729,10 +57699,8 @@ "subcategory": "deployments" }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -57813,10 +57781,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -57921,10 +57887,10 @@ "subcategory": "deployments" }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -58107,10 +58073,10 @@ "subcategory": "deployments" }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -58283,10 +58249,10 @@ "subcategory": "deployments" }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -58496,8 +58462,8 @@ "subcategory": "environments" }, "slug": "get-all-environments", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -58575,8 +58541,8 @@ "subcategory": "environments" }, "slug": "get-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -58809,8 +58775,8 @@ "subcategory": "environments" }, "slug": "create-or-update-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "contentType": "application/json", @@ -59036,8 +59002,8 @@ "subcategory": "environments" }, "slug": "delete-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -61769,10 +61735,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -62055,10 +62021,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -62335,10 +62301,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -62639,10 +62605,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -62932,10 +62898,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -63014,10 +62980,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -63159,10 +63125,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -63307,10 +63273,10 @@ "subcategory": "webhooks" }, "slug": "list-deliveries-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a list of webhook deliveries for a webhook configured in a repository.

", @@ -63404,10 +63370,10 @@ "subcategory": "webhooks" }, "slug": "get-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a delivery for a webhook configured in a repository.

", @@ -63501,10 +63467,10 @@ "subcategory": "webhooks" }, "slug": "redeliver-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "responses": [ { @@ -63588,10 +63554,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -63670,10 +63636,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -65078,8 +65044,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -65185,8 +65151,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -65282,8 +65248,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -69273,8 +69239,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -69389,8 +69355,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -69502,8 +69468,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -69586,8 +69552,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -70516,10 +70482,8 @@ "subcategory": "branches" }, "slug": "sync-a-fork-branch-with-the-upstream-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Sync a branch of a forked repository to keep it up-to-date with the upstream repository.

", @@ -70654,10 +70618,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -71792,10 +71754,8 @@ "subcategory": "pages" }, "slug": "get-a-github-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -71957,10 +71917,8 @@ "subcategory": "pages" }, "slug": "create-a-github-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub Pages site. For more information, see \"About GitHub Pages.\"

", @@ -72215,10 +72173,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -72363,10 +72319,8 @@ "subcategory": "pages" }, "slug": "delete-a-github-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -72461,10 +72415,8 @@ "subcategory": "pages" }, "slug": "list-github-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -72530,10 +72482,8 @@ "subcategory": "pages" }, "slug": "request-a-github-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -72599,10 +72549,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -72677,10 +72625,8 @@ "subcategory": "pages" }, "slug": "get-github-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -72746,10 +72692,8 @@ "subcategory": "pages" }, "slug": "get-a-dns-health-check-for-github-pages", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

Gets a health check of the DNS settings for the CNAME record configured for a repository's GitHub Pages.

\n

The first request to this endpoint returns a 202 Accepted status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a 200 OK status with the health check results in the response.

\n

Users must have admin or owner permissions. GitHub Apps must have the pages:write and administration:write permission to use this endpoint.

", @@ -77911,10 +77855,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -78085,10 +78027,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -78251,10 +78191,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -78388,10 +78328,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -78496,10 +78436,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -78621,10 +78561,8 @@ "subcategory": "releases" }, "slug": "generate-release-notes-content-for-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Generate a name and body describing a release. The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.

", @@ -78733,10 +78671,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -78813,10 +78749,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -78897,10 +78831,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -79064,10 +78996,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -79213,10 +79143,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -79311,10 +79239,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -79429,10 +79357,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -80254,8 +80182,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -80333,8 +80261,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -80412,8 +80340,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -80491,8 +80419,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -80565,8 +80493,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -80713,8 +80641,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -81667,8 +81595,8 @@ "subcategory": "traffic" }, "slug": "get-repository-clones", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "traffic", "subcategoryLabel": "Traffic", "notes": [], @@ -81741,8 +81669,8 @@ "subcategory": "traffic" }, "slug": "get-top-referral-paths", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "traffic", "subcategoryLabel": "Traffic", "notes": [], @@ -81815,8 +81743,8 @@ "subcategory": "traffic" }, "slug": "get-top-referral-sources", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "traffic", "subcategoryLabel": "Traffic", "notes": [], @@ -81905,8 +81833,8 @@ "subcategory": "traffic" }, "slug": "get-page-views", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "traffic", "subcategoryLabel": "Traffic", "notes": [], @@ -99917,8 +99845,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -99998,8 +99926,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -100078,8 +100006,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/lib/rest/static/decorated/ghes-3.0.json b/lib/rest/static/decorated/ghes-3.0.json index 6987f9c48290..b796b67e556e 100644 --- a/lib/rest/static/decorated/ghes-3.0.json +++ b/lib/rest/static/decorated/ghes-3.0.json @@ -35832,10 +35832,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -35917,10 +35915,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -36018,10 +36014,10 @@ ] }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -36782,10 +36778,10 @@ ] }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -37487,10 +37483,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -37571,10 +37567,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -37651,10 +37647,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -37731,10 +37727,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -37822,10 +37818,10 @@ ] }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38036,10 +38032,10 @@ ] }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -38217,10 +38213,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38308,10 +38304,10 @@ ] }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -38400,10 +38396,10 @@ ] }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -38492,10 +38488,10 @@ ] }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38576,10 +38572,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38701,10 +38697,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -38815,10 +38811,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38894,10 +38890,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39023,10 +39019,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39176,10 +39172,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39323,10 +39319,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39427,10 +39423,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -39512,10 +39508,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39591,10 +39587,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -39719,10 +39715,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -39861,10 +39857,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40002,10 +39998,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40101,10 +40097,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -40230,10 +40226,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40373,10 +40369,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40515,10 +40511,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40614,10 +40610,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -40742,10 +40738,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40884,10 +40880,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41025,10 +41021,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -46866,10 +46862,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -46949,10 +46943,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -47070,10 +47062,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -47191,10 +47181,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -47268,10 +47256,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -47369,8 +47355,8 @@ ] }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -47455,8 +47441,8 @@ ] }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -47566,8 +47552,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -47661,8 +47647,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -48182,10 +48168,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -48289,10 +48273,8 @@ ] }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -48401,8 +48383,8 @@ ] }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -48539,8 +48521,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -48694,10 +48676,8 @@ ] }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -48794,10 +48774,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -49179,8 +49157,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -49284,8 +49262,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -49368,10 +49346,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the List commits to enumerate all commits in the range.

\n

For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long\nto generate. You can typically resolve this error by using a smaller commit range.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -50858,10 +50834,8 @@ ] }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -51071,10 +51045,8 @@ ] }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -51279,10 +51251,8 @@ ] }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -51363,10 +51333,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -51483,10 +51451,10 @@ ] }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -51681,10 +51649,10 @@ ] }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -51869,10 +51837,10 @@ ] }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -54747,10 +54715,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -55033,10 +55001,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -55313,10 +55281,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -55617,10 +55585,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -55910,10 +55878,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -55992,10 +55960,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -56137,10 +56105,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -56265,10 +56233,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -56347,10 +56315,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -56517,8 +56485,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -56624,8 +56592,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -56721,8 +56689,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -60824,8 +60792,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -60940,8 +60908,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -61053,8 +61021,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -61137,8 +61105,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -61947,10 +61915,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -63085,10 +63051,8 @@ "subcategory": "pages" }, "slug": "get-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -63257,10 +63221,8 @@ ] }, "slug": "create-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"

", @@ -63515,10 +63477,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -63670,10 +63630,8 @@ ] }, "slug": "delete-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -63768,10 +63726,8 @@ "subcategory": "pages" }, "slug": "list-github-enterprise-server-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -63837,10 +63793,8 @@ "subcategory": "pages" }, "slug": "request-a-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -63906,10 +63860,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -63984,10 +63936,8 @@ "subcategory": "pages" }, "slug": "get-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -69453,10 +69403,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -69607,10 +69555,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -69749,10 +69695,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -69886,10 +69832,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -69994,10 +69940,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -70062,10 +70008,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -70142,10 +70086,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -70226,10 +70168,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -70384,10 +70324,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -70519,10 +70457,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -70617,10 +70553,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -70735,10 +70671,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -70910,8 +70846,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -70989,8 +70925,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -71068,8 +71004,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -71147,8 +71083,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -71221,8 +71157,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -71369,8 +71305,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -81552,8 +81488,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -81633,8 +81569,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -81713,8 +81649,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index 424f0bebc538..96c42e3ae94b 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -35954,10 +35954,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -36039,10 +36037,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -36140,10 +36136,10 @@ ] }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -36904,10 +36900,10 @@ ] }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -37609,10 +37605,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -37693,10 +37689,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -37773,10 +37769,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -37853,10 +37849,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -37944,10 +37940,10 @@ ] }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38158,10 +38154,10 @@ ] }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -38339,10 +38335,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38430,10 +38426,10 @@ ] }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -38522,10 +38518,10 @@ ] }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -38614,10 +38610,10 @@ ] }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38698,10 +38694,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38823,10 +38819,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -38937,10 +38933,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39016,10 +39012,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39145,10 +39141,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39298,10 +39294,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39445,10 +39441,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39549,10 +39545,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -39634,10 +39630,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39713,10 +39709,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -39841,10 +39837,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -39983,10 +39979,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40124,10 +40120,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40223,10 +40219,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -40352,10 +40348,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40495,10 +40491,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40637,10 +40633,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -40736,10 +40732,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -40864,10 +40860,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41006,10 +41002,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41147,10 +41143,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41273,10 +41269,8 @@ "subcategory": "branches" }, "slug": "rename-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Renames a branch in a repository.

\n

Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"Renaming a branch\".

\n

The permissions required to use this endpoint depends on whether you are renaming the default branch.

\n

To rename a non-default branch:

\n
    \n
  • Users must have push access.
  • \n
  • GitHub Apps must have the contents:write repository permission.
  • \n
\n

To rename the default branch:

\n
    \n
  • Users must have admin or owner permissions.
  • \n
  • GitHub Apps must have the administration:write repository permission.
  • \n
", @@ -47535,10 +47529,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -47618,10 +47610,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -47739,10 +47729,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -47860,10 +47848,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -47937,10 +47923,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -48038,8 +48022,8 @@ ] }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -48124,8 +48108,8 @@ ] }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -48235,8 +48219,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -48330,8 +48314,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -48851,10 +48835,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -48958,10 +48940,8 @@ ] }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -49070,8 +49050,8 @@ ] }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -49208,8 +49188,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -49363,10 +49343,8 @@ ] }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -49463,10 +49441,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -49848,8 +49824,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -49953,8 +49929,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -50037,10 +50013,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the List commits to enumerate all commits in the range.

\n

For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long\nto generate. You can typically resolve this error by using a smaller commit range.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -51527,10 +51501,8 @@ ] }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -51740,10 +51712,8 @@ ] }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -51948,10 +51918,8 @@ ] }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -52032,10 +52000,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -52152,10 +52118,10 @@ ] }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -52350,10 +52316,10 @@ ] }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -52538,10 +52504,10 @@ ] }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -55416,10 +55382,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -55702,10 +55668,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -55982,10 +55948,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -56286,10 +56252,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -56579,10 +56545,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -56661,10 +56627,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -56806,10 +56772,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -56934,10 +56900,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -57016,10 +56982,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -57186,8 +57152,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -57293,8 +57259,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -57390,8 +57356,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -61493,8 +61459,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -61609,8 +61575,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -61722,8 +61688,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -61806,8 +61772,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -62616,10 +62582,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -63754,10 +63718,8 @@ "subcategory": "pages" }, "slug": "get-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -63926,10 +63888,8 @@ ] }, "slug": "create-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"

", @@ -64184,10 +64144,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -64339,10 +64297,8 @@ ] }, "slug": "delete-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -64437,10 +64393,8 @@ "subcategory": "pages" }, "slug": "list-github-enterprise-server-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -64506,10 +64460,8 @@ "subcategory": "pages" }, "slug": "request-a-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -64575,10 +64527,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -64653,10 +64603,8 @@ "subcategory": "pages" }, "slug": "get-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -70122,10 +70070,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -70276,10 +70222,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -70418,10 +70362,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -70555,10 +70499,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -70663,10 +70607,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -70731,10 +70675,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -70811,10 +70753,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -70895,10 +70835,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -71053,10 +70991,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -71188,10 +71124,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -71286,10 +71220,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -71404,10 +71338,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -71978,8 +71912,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -72057,8 +71991,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -72136,8 +72070,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -72215,8 +72149,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -72289,8 +72223,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -72437,8 +72371,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -82620,8 +82554,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -82701,8 +82635,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -82781,8 +82715,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/lib/rest/static/decorated/ghes-3.2.json b/lib/rest/static/decorated/ghes-3.2.json index 9ef354c39447..ac8afb5345d3 100644 --- a/lib/rest/static/decorated/ghes-3.2.json +++ b/lib/rest/static/decorated/ghes-3.2.json @@ -37204,10 +37204,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -37289,10 +37287,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -37390,10 +37386,10 @@ ] }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38154,10 +38150,10 @@ ] }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -38859,10 +38855,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -38943,10 +38939,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39023,10 +39019,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -39103,10 +39099,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39194,10 +39190,10 @@ ] }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39408,10 +39404,10 @@ ] }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -39589,10 +39585,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39680,10 +39676,10 @@ ] }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -39772,10 +39768,10 @@ ] }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -39864,10 +39860,10 @@ ] }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39948,10 +39944,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40073,10 +40069,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -40187,10 +40183,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -40266,10 +40262,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40395,10 +40391,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40548,10 +40544,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40695,10 +40691,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40799,10 +40795,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -40884,10 +40880,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -40963,10 +40959,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -41091,10 +41087,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41233,10 +41229,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41374,10 +41370,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41473,10 +41469,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -41602,10 +41598,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41745,10 +41741,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41887,10 +41883,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41986,10 +41982,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -42114,10 +42110,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42256,10 +42252,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42397,10 +42393,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42523,10 +42519,8 @@ "subcategory": "branches" }, "slug": "rename-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Renames a branch in a repository.

\n

Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"Renaming a branch\".

\n

The permissions required to use this endpoint depends on whether you are renaming the default branch.

\n

To rename a non-default branch:

\n
    \n
  • Users must have push access.
  • \n
  • GitHub Apps must have the contents:write repository permission.
  • \n
\n

To rename the default branch:

\n
    \n
  • Users must have admin or owner permissions.
  • \n
  • GitHub Apps must have the administration:write repository permission.
  • \n
", @@ -48785,10 +48779,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -48868,10 +48860,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -48989,10 +48979,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -49110,10 +49098,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -49187,10 +49173,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -49288,8 +49272,8 @@ ] }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -49374,8 +49358,8 @@ ] }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -49485,8 +49469,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -49580,8 +49564,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -50101,10 +50085,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -50208,10 +50190,8 @@ ] }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -50320,8 +50300,8 @@ ] }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -50458,8 +50438,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -50613,10 +50593,8 @@ ] }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -50713,10 +50691,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -51098,8 +51074,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -51203,8 +51179,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -51307,10 +51283,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

To process a response with a large number of commits, you can use (per_page or page) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see \"Traversing with pagination.\"

\n

When calling this API without any paging parameters (per_page or page), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -52797,10 +52771,8 @@ ] }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -53010,10 +52982,8 @@ ] }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -53218,10 +53188,8 @@ ] }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -53302,10 +53270,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -53422,10 +53388,10 @@ ] }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -53620,10 +53586,10 @@ ] }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -53808,10 +53774,10 @@ ] }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -54021,8 +53987,8 @@ "subcategory": "environments" }, "slug": "get-all-environments", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -54100,8 +54066,8 @@ "subcategory": "environments" }, "slug": "get-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -54334,8 +54300,8 @@ "subcategory": "environments" }, "slug": "create-or-update-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "contentType": "application/json", @@ -54561,8 +54527,8 @@ "subcategory": "environments" }, "slug": "delete-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -57294,10 +57260,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -57580,10 +57546,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -57860,10 +57826,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -58164,10 +58130,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -58457,10 +58423,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -58539,10 +58505,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -58684,10 +58650,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -58832,10 +58798,10 @@ "subcategory": "webhooks" }, "slug": "list-deliveries-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a list of webhook deliveries for a webhook configured in a repository.

", @@ -58929,10 +58895,10 @@ "subcategory": "webhooks" }, "slug": "get-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a delivery for a webhook configured in a repository.

", @@ -59026,10 +58992,10 @@ "subcategory": "webhooks" }, "slug": "redeliver-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "responses": [ { @@ -59113,10 +59079,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -59195,10 +59161,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -59365,8 +59331,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -59472,8 +59438,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -59569,8 +59535,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -63672,8 +63638,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -63788,8 +63754,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -63901,8 +63867,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -63985,8 +63951,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -64795,10 +64761,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -65933,10 +65897,8 @@ "subcategory": "pages" }, "slug": "get-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -66105,10 +66067,8 @@ ] }, "slug": "create-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"

", @@ -66363,10 +66323,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -66518,10 +66476,8 @@ ] }, "slug": "delete-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -66616,10 +66572,8 @@ "subcategory": "pages" }, "slug": "list-github-enterprise-server-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -66685,10 +66639,8 @@ "subcategory": "pages" }, "slug": "request-a-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -66754,10 +66706,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -66832,10 +66782,8 @@ "subcategory": "pages" }, "slug": "get-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -72301,10 +72249,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -72455,10 +72401,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -72597,10 +72541,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -72734,10 +72678,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -72842,10 +72786,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -72910,10 +72854,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -72990,10 +72932,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -73074,10 +73014,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -73232,10 +73170,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -73367,10 +73303,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -73465,10 +73399,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -73583,10 +73517,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -74305,8 +74239,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74384,8 +74318,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74463,8 +74397,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74542,8 +74476,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74616,8 +74550,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74764,8 +74698,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -85421,8 +85355,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -85502,8 +85436,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -85582,8 +85516,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/lib/rest/static/decorated/ghes-3.3.json b/lib/rest/static/decorated/ghes-3.3.json index e8f4257c47b9..877f7893cc92 100644 --- a/lib/rest/static/decorated/ghes-3.3.json +++ b/lib/rest/static/decorated/ghes-3.3.json @@ -37521,10 +37521,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -37606,10 +37604,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -37700,10 +37696,10 @@ "subcategory": "branches" }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -38457,10 +38453,10 @@ "subcategory": "branches" }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -39162,10 +39158,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39246,10 +39242,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39326,10 +39322,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -39406,10 +39402,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39490,10 +39486,10 @@ "subcategory": "branches" }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -39697,10 +39693,10 @@ "subcategory": "branches" }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -39878,10 +39874,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -39962,10 +39958,10 @@ "subcategory": "branches" }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -40047,10 +40043,10 @@ "subcategory": "branches" }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -40132,10 +40128,10 @@ "subcategory": "branches" }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -40216,10 +40212,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40341,10 +40337,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -40455,10 +40451,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -40534,10 +40530,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40663,10 +40659,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40816,10 +40812,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -40963,10 +40959,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -41067,10 +41063,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -41152,10 +41148,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -41231,10 +41227,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -41359,10 +41355,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41501,10 +41497,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41642,10 +41638,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41741,10 +41737,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -41870,10 +41866,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42013,10 +42009,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42155,10 +42151,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42254,10 +42250,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -42382,10 +42378,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42524,10 +42520,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42665,10 +42661,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -42791,10 +42787,8 @@ "subcategory": "branches" }, "slug": "rename-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Renames a branch in a repository.

\n

Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"Renaming a branch\".

\n

The permissions required to use this endpoint depends on whether you are renaming the default branch.

\n

To rename a non-default branch:

\n
    \n
  • Users must have push access.
  • \n
  • GitHub Apps must have the contents:write repository permission.
  • \n
\n

To rename the default branch:

\n
    \n
  • Users must have admin or owner permissions.
  • \n
  • GitHub Apps must have the administration:write repository permission.
  • \n
", @@ -49153,10 +49147,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -49236,10 +49228,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -49357,10 +49347,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -49478,10 +49466,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -49555,10 +49541,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -49649,8 +49633,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -49728,8 +49712,8 @@ "subcategory": "comments" }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -49839,8 +49823,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -49934,8 +49918,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -50437,10 +50421,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -50537,10 +50519,8 @@ "subcategory": "commits" }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -50642,8 +50622,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -50780,8 +50760,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -50928,10 +50908,8 @@ "subcategory": "commits" }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -51028,10 +51006,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -51413,8 +51389,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -51518,8 +51494,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -51622,10 +51598,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

To process a response with a large number of commits, you can use (per_page or page) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see \"Traversing with pagination.\"

\n

When calling this API without any paging parameters (per_page or page), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -53105,10 +53079,8 @@ "subcategory": "deployments" }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -53311,10 +53283,8 @@ "subcategory": "deployments" }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -53507,10 +53477,8 @@ "subcategory": "deployments" }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -53591,10 +53559,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -53699,10 +53665,10 @@ "subcategory": "deployments" }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -53885,10 +53851,10 @@ "subcategory": "deployments" }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -54061,10 +54027,10 @@ "subcategory": "deployments" }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -54274,8 +54240,8 @@ "subcategory": "environments" }, "slug": "get-all-environments", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -54353,8 +54319,8 @@ "subcategory": "environments" }, "slug": "get-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -54587,8 +54553,8 @@ "subcategory": "environments" }, "slug": "create-or-update-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "contentType": "application/json", @@ -54814,8 +54780,8 @@ "subcategory": "environments" }, "slug": "delete-an-environment", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "environments", "subcategoryLabel": "Environments", "notes": [], @@ -57547,10 +57513,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -57833,10 +57799,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -58113,10 +58079,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -58417,10 +58383,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -58710,10 +58676,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -58792,10 +58758,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -58937,10 +58903,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -59085,10 +59051,10 @@ "subcategory": "webhooks" }, "slug": "list-deliveries-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a list of webhook deliveries for a webhook configured in a repository.

", @@ -59182,10 +59148,10 @@ "subcategory": "webhooks" }, "slug": "get-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a delivery for a webhook configured in a repository.

", @@ -59279,10 +59245,10 @@ "subcategory": "webhooks" }, "slug": "redeliver-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "responses": [ { @@ -59366,10 +59332,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -59448,10 +59414,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -59618,8 +59584,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -59725,8 +59691,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -59822,8 +59788,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -63813,8 +63779,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -63929,8 +63895,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -64042,8 +64008,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -64126,8 +64092,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -65056,10 +65022,8 @@ "subcategory": "branches" }, "slug": "sync-a-fork-branch-with-the-upstream-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Sync a branch of a forked repository to keep it up-to-date with the upstream repository.

", @@ -65194,10 +65158,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -66332,10 +66294,8 @@ "subcategory": "pages" }, "slug": "get-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -66497,10 +66457,8 @@ "subcategory": "pages" }, "slug": "create-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"

", @@ -66755,10 +66713,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -66903,10 +66859,8 @@ "subcategory": "pages" }, "slug": "delete-a-github-enterprise-server-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -67001,10 +66955,8 @@ "subcategory": "pages" }, "slug": "list-github-enterprise-server-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -67070,10 +67022,8 @@ "subcategory": "pages" }, "slug": "request-a-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -67139,10 +67089,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -67217,10 +67165,8 @@ "subcategory": "pages" }, "slug": "get-github-enterprise-server-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -72572,10 +72518,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -72737,10 +72681,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -72889,10 +72831,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -73026,10 +72968,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -73134,10 +73076,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -73259,10 +73201,8 @@ "subcategory": "releases" }, "slug": "generate-release-notes-content-for-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Generate a name and body describing a release. The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.

", @@ -73371,10 +73311,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -73451,10 +73389,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -73535,10 +73471,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -73693,10 +73627,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -73828,10 +73760,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -73926,10 +73856,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -74044,10 +73974,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -74869,8 +74799,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -74948,8 +74878,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -75027,8 +74957,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -75106,8 +75036,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -75180,8 +75110,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -75328,8 +75258,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -85818,8 +85748,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -85899,8 +85829,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -85979,8 +85909,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 7d89ca391b90..775b96a69b78 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -29823,10 +29823,8 @@ "subcategory": "branches" }, "slug": "list-branches", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -29908,10 +29906,8 @@ "subcategory": "branches" }, "slug": "get-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "notes": [], "descriptionHTML": "", "responses": [ @@ -30002,10 +29998,10 @@ "subcategory": "branches" }, "slug": "get-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -30914,10 +30910,10 @@ "subcategory": "branches" }, "slug": "update-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "responses": [ @@ -31774,10 +31770,10 @@ "subcategory": "branches" }, "slug": "delete-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -31858,10 +31854,10 @@ "subcategory": "branches" }, "slug": "get-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -31938,10 +31934,10 @@ "subcategory": "branches" }, "slug": "set-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -32018,10 +32014,10 @@ "subcategory": "branches" }, "slug": "delete-admin-branch-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -32102,10 +32098,10 @@ "subcategory": "branches" }, "slug": "get-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -32377,10 +32373,10 @@ "subcategory": "branches" }, "slug": "update-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

\n

Note: Passing new arrays of users and teams replaces their previous values.

", @@ -32626,10 +32622,10 @@ "subcategory": "branches" }, "slug": "delete-pull-request-review-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -32710,10 +32706,10 @@ "subcategory": "branches" }, "slug": "get-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.

\n

Note: You must enable branch protection to require signed commits.

", @@ -32795,10 +32791,10 @@ "subcategory": "branches" }, "slug": "create-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

", @@ -32880,10 +32876,10 @@ "subcategory": "branches" }, "slug": "delete-commit-signature-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -32964,10 +32960,10 @@ "subcategory": "branches" }, "slug": "get-status-checks-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -33150,10 +33146,10 @@ "subcategory": "branches" }, "slug": "update-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

", @@ -33325,10 +33321,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-protection", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -33404,10 +33400,10 @@ "subcategory": "branches" }, "slug": "get-all-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -33533,10 +33529,10 @@ "subcategory": "branches" }, "slug": "add-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -33686,10 +33682,10 @@ "subcategory": "branches" }, "slug": "set-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -33833,10 +33829,10 @@ "subcategory": "branches" }, "slug": "remove-status-check-contexts", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

", @@ -33937,10 +33933,10 @@ "subcategory": "branches" }, "slug": "get-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists who has access to this protected branch.

\n

Note: Users, apps, and teams restrictions are only available for organization-owned repositories.

", @@ -34022,10 +34018,10 @@ "subcategory": "branches" }, "slug": "delete-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "responses": [ { @@ -34101,10 +34097,10 @@ "subcategory": "branches" }, "slug": "get-apps-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

", @@ -34229,10 +34225,10 @@ "subcategory": "branches" }, "slug": "add-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -34371,10 +34367,10 @@ "subcategory": "branches" }, "slug": "set-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -34512,10 +34508,10 @@ "subcategory": "branches" }, "slug": "remove-app-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -34611,10 +34607,10 @@ "subcategory": "branches" }, "slug": "get-teams-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the teams who have push access to this branch. The list includes child teams.

", @@ -34740,10 +34736,10 @@ "subcategory": "branches" }, "slug": "add-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified teams push access for this branch. You can also give push access to child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -34883,10 +34879,10 @@ "subcategory": "branches" }, "slug": "set-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayThe teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -35025,10 +35021,10 @@ "subcategory": "branches" }, "slug": "remove-team-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayTeams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -35124,10 +35120,10 @@ "subcategory": "branches" }, "slug": "get-users-with-access-to-the-protected-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Lists the people who have push access to this branch.

", @@ -35252,10 +35248,10 @@ "subcategory": "branches" }, "slug": "add-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Grants the specified people push access for this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -35394,10 +35390,10 @@ "subcategory": "branches" }, "slug": "set-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -35535,10 +35531,10 @@ "subcategory": "branches" }, "slug": "remove-user-access-restrictions", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", + "subcategory": "branch-protection", + "subcategoryLabel": "Branch protection", "contentType": "application/json", "notes": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Removes the ability of a user to push to this branch.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescription
arrayUsernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items.
", @@ -41883,10 +41879,8 @@ "subcategory": "collaborators" }, "slug": "list-repository-collaborators", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

\n

Team members will include the members of child teams.

\n

You must have push access to the repository in order to list collaborators.

", @@ -41966,10 +41960,8 @@ "subcategory": "collaborators" }, "slug": "check-if-a-user-is-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "responses": [ { @@ -42087,10 +42079,8 @@ "subcategory": "collaborators" }, "slug": "add-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

", @@ -42208,10 +42198,8 @@ "subcategory": "collaborators" }, "slug": "remove-a-repository-collaborator", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "descriptionHTML": "", "responses": [ @@ -42285,10 +42273,8 @@ "subcategory": "collaborators" }, "slug": "get-repository-permissions-for-a-user", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "collaborators", - "subcategoryLabel": "Collaborators", + "category": "collaborators", + "categoryLabel": "Collaborators", "notes": [], "bodyParameters": [], "descriptionHTML": "

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

", @@ -42379,8 +42365,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -42458,8 +42444,8 @@ "subcategory": "comments" }, "slug": "get-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -42569,8 +42555,8 @@ "subcategory": "comments" }, "slug": "update-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -42664,8 +42650,8 @@ "subcategory": "comments" }, "slug": "delete-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -43167,10 +43153,8 @@ "subcategory": "commits" }, "slug": "list-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -43267,10 +43251,8 @@ "subcategory": "commits" }, "slug": "list-branches-for-head-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

\n

Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

", @@ -43372,8 +43354,8 @@ "subcategory": "comments" }, "slug": "list-commit-comments", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "notes": [], @@ -43510,8 +43492,8 @@ "subcategory": "comments" }, "slug": "create-a-commit-comment", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", @@ -43658,10 +43640,8 @@ "subcategory": "commits" }, "slug": "list-pull-requests-associated-with-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.

", @@ -43758,10 +43738,8 @@ "subcategory": "commits" }, "slug": "get-a-commit", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.

\n

Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

\n

You can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.

\n

To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -44143,8 +44121,8 @@ "subcategory": "statuses" }, "slug": "get-the-combined-status-for-a-specific-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -44248,8 +44226,8 @@ "subcategory": "statuses" }, "slug": "list-commit-statuses-for-a-reference", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "notes": [], @@ -44352,10 +44330,8 @@ "subcategory": "commits" }, "slug": "compare-two-commits", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "commits", - "subcategoryLabel": "Commits", + "category": "commits", + "categoryLabel": "Commits", "notes": [], "bodyParameters": [], "descriptionHTML": "

The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.

\n

The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.

\n

The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.

\n

Working with large comparisons

\n

To process a response with a large number of commits, you can use (per_page or page) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see \"Traversing with pagination.\"

\n

When calling this API without any paging parameters (per_page or page), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.

\n

Signature verification object

\n

The response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameTypeDescription
verifiedbooleanIndicates whether GitHub considers the signature in this commit to be verified.
reasonstringThe reason for verified value. Possible values and their meanings are enumerated in table below.
signaturestringThe signature that was extracted from the commit.
payloadstringThe value that was signed.
\n

These are the possible values for reason in the verification object:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ValueDescription
expired_keyThe key that made the signature is expired.
not_signing_keyThe \"signing\" flag is not among the usage flags in the GPG key that made the signature.
gpgverify_errorThere was an error communicating with the signature verification service.
gpgverify_unavailableThe signature verification service is currently unavailable.
unsignedThe object does not include a signature.
unknown_signature_typeA non-PGP signature was found in the commit.
no_userNo user was associated with the committer email address in the commit.
unverified_emailThe committer email address in the commit was associated with a user, but the email address is not verified on her/his account.
bad_emailThe committer email address in the commit is not included in the identities of the PGP key that made the signature.
unknown_keyThe key that made the signature has not been registered with any user's account.
malformed_signatureThere was an error parsing the signature.
invalidThe signature could not be cryptographically verified using the key whose key-id was found in the signature.
validNone of the above errors applied, so the signature is considered to be verified.
", @@ -45655,10 +45631,8 @@ "subcategory": "deployments" }, "slug": "list-deployments", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "bodyParameters": [], "descriptionHTML": "

Simple filtering of deployments is available via query parameters:

", @@ -45861,10 +45835,8 @@ "subcategory": "deployments" }, "slug": "create-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "contentType": "application/json", "notes": [], "descriptionHTML": "

Deployments offer a few configurable parameters with certain defaults.

\n

The ref parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.

\n

The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.

\n

The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.

\n

By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.

\n

The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.

\n

The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.

\n

Users with repo or repo_deployment scopes can create a deployment for a given ref.

\n

Merged branch response

\n

You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:

\n
    \n
  • Auto-merge option is enabled in the repository
  • \n
  • Topic branch does not include the latest changes on the base branch, which is master in the response example
  • \n
  • There are no merge conflicts
  • \n
\n

If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.

\n

Merge conflict response

\n

This error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.

\n

Failed commit status checks

\n

This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.

", @@ -46057,10 +46029,8 @@ "subcategory": "deployments" }, "slug": "get-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -46141,10 +46111,8 @@ "subcategory": "deployments" }, "slug": "delete-a-deployment", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", "notes": [], "responses": [ { @@ -46249,10 +46217,10 @@ "subcategory": "deployments" }, "slug": "list-deployment-statuses", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view deployment statuses for a deployment:

", @@ -46435,10 +46403,10 @@ "subcategory": "deployments" }, "slug": "create-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access can create deployment statuses for a given deployment.

\n

GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.

", @@ -46611,10 +46579,10 @@ "subcategory": "deployments" }, "slug": "get-a-deployment-status", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "deployments", - "subcategoryLabel": "Deployments", + "category": "deployments", + "categoryLabel": "Deployments", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", "notes": [], "bodyParameters": [], "descriptionHTML": "

Users with pull access can view a deployment status for a deployment:

", @@ -49350,10 +49318,10 @@ "subcategory": "webhooks" }, "slug": "list-repository-webhooks", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -49636,10 +49604,10 @@ "subcategory": "webhooks" }, "slug": "create-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.

", @@ -49916,10 +49884,10 @@ "subcategory": "webhooks" }, "slug": "get-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"

", @@ -50220,10 +50188,10 @@ "subcategory": "webhooks" }, "slug": "update-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"

", @@ -50513,10 +50481,10 @@ "subcategory": "webhooks" }, "slug": "delete-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "descriptionHTML": "", "responses": [ @@ -50595,10 +50563,10 @@ "subcategory": "webhooks" }, "slug": "get-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"

\n

Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.

", @@ -50740,10 +50708,10 @@ "subcategory": "webhooks" }, "slug": "update-a-webhook-configuration-for-a-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-config", + "subcategoryLabel": "Repo config", "contentType": "application/json", "notes": [], "descriptionHTML": "

Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"

\n

Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.

", @@ -50888,10 +50856,10 @@ "subcategory": "webhooks" }, "slug": "list-deliveries-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a list of webhook deliveries for a webhook configured in a repository.

", @@ -50985,10 +50953,10 @@ "subcategory": "webhooks" }, "slug": "get-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "bodyParameters": [], "descriptionHTML": "

Returns a delivery for a webhook configured in a repository.

", @@ -51082,10 +51050,10 @@ "subcategory": "webhooks" }, "slug": "redeliver-a-delivery-for-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repo-deliveries", + "subcategoryLabel": "Repo deliveries", "notes": [], "responses": [ { @@ -51169,10 +51137,10 @@ "subcategory": "webhooks" }, "slug": "ping-a-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -51251,10 +51219,10 @@ "subcategory": "webhooks" }, "slug": "test-the-push-repository-webhook", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "webhooks", - "subcategoryLabel": "Webhooks", + "category": "webhooks", + "categoryLabel": "Webhooks", + "subcategory": "repos", + "subcategoryLabel": "Repos", "notes": [], "responses": [ { @@ -51421,8 +51389,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -51528,8 +51496,8 @@ "subcategory": "invitations" }, "slug": "update-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "contentType": "application/json", @@ -51625,8 +51593,8 @@ "subcategory": "invitations" }, "slug": "delete-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -55616,8 +55584,8 @@ "subcategory": "keys" }, "slug": "list-deploy-keys", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -55732,8 +55700,8 @@ "subcategory": "keys" }, "slug": "create-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", @@ -55845,8 +55813,8 @@ "subcategory": "keys" }, "slug": "get-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -55929,8 +55897,8 @@ "subcategory": "keys" }, "slug": "delete-a-deploy-key", - "category": "repos", - "categoryLabel": "Repos", + "category": "deployments", + "categoryLabel": "Deployments", "subcategory": "keys", "subcategoryLabel": "Keys", "notes": [], @@ -56859,10 +56827,8 @@ "subcategory": "branches" }, "slug": "sync-a-fork-branch-with-the-upstream-repository", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "branches", - "subcategoryLabel": "Branches", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "

Sync a branch of a forked repository to keep it up-to-date with the upstream repository.

", @@ -56997,10 +56963,8 @@ "subcategory": "merging" }, "slug": "merge-a-branch", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "merging", - "subcategoryLabel": "Merging", + "category": "branches", + "categoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "", @@ -58135,10 +58099,8 @@ "subcategory": "pages" }, "slug": "get-a-github-ae-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -58307,10 +58269,8 @@ ] }, "slug": "create-a-github-ae-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "descriptionHTML": "

Configures a GitHub AE Pages site. For more information, see \"About GitHub Pages.\"

", @@ -58565,10 +58525,8 @@ "subcategory": "pages" }, "slug": "update-information-about-a-github-ae-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "contentType": "application/json", "notes": [], "responses": [ @@ -58720,10 +58678,8 @@ ] }, "slug": "delete-a-github-ae-pages-site", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "responses": [ @@ -58818,10 +58774,8 @@ "subcategory": "pages" }, "slug": "list-github-ae-pages-builds", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -58887,10 +58841,8 @@ "subcategory": "pages" }, "slug": "request-a-github-ae-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "bodyParameters": [], "descriptionHTML": "

You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

\n

Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

", @@ -58956,10 +58908,8 @@ "subcategory": "pages" }, "slug": "get-latest-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -59034,10 +58984,8 @@ "subcategory": "pages" }, "slug": "get-github-ae-pages-build", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "pages", - "subcategoryLabel": "Pages", + "category": "pages", + "categoryLabel": "Pages", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -63989,10 +63937,8 @@ "subcategory": "releases" }, "slug": "list-releases", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

\n

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

", @@ -64143,10 +64089,8 @@ "subcategory": "releases" }, "slug": "create-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can create a release.

\n

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

", @@ -64285,10 +64229,10 @@ "subcategory": "releases" }, "slug": "get-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "bodyParameters": [], "descriptionHTML": "

To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.

", @@ -64422,10 +64366,10 @@ "subcategory": "releases" }, "slug": "update-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release asset.

", @@ -64530,10 +64474,10 @@ "subcategory": "releases" }, "slug": "delete-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "responses": [ @@ -64598,10 +64542,8 @@ "subcategory": "releases" }, "slug": "get-the-latest-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

View the latest published full release for the repository.

\n

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

", @@ -64678,10 +64620,8 @@ "subcategory": "releases" }, "slug": "get-a-release-by-tag-name", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Get a published release with the specified tag.

", @@ -64762,10 +64702,8 @@ "subcategory": "releases" }, "slug": "get-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "bodyParameters": [], "descriptionHTML": "

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

", @@ -64920,10 +64858,8 @@ "subcategory": "releases" }, "slug": "update-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "

Users with push access to the repository can edit a release.

", @@ -65055,10 +64991,8 @@ "subcategory": "releases" }, "slug": "delete-a-release", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", "notes": [], "responses": [ { @@ -65153,10 +65087,10 @@ "subcategory": "releases" }, "slug": "list-release-assets", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "notes": [], "descriptionHTML": "", "bodyParameters": [], @@ -65271,10 +65205,10 @@ "subcategory": "releases" }, "slug": "upload-a-release-asset", - "category": "repos", - "categoryLabel": "Repos", - "subcategory": "releases", - "subcategoryLabel": "Releases", + "category": "releases", + "categoryLabel": "Releases", + "subcategory": "assets", + "subcategoryLabel": "Assets", "contentType": "*/*", "notes": [], "bodyParameters": [], @@ -65987,8 +65921,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -66066,8 +66000,8 @@ "subcategory": "statistics" }, "slug": "get-the-last-year-of-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -66145,8 +66079,8 @@ "subcategory": "statistics" }, "slug": "get-all-contributor-commit-activity", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -66224,8 +66158,8 @@ "subcategory": "statistics" }, "slug": "get-the-weekly-commit-count", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -66298,8 +66232,8 @@ "subcategory": "statistics" }, "slug": "get-the-hourly-commit-count-for-each-day", - "category": "repos", - "categoryLabel": "Repos", + "category": "metrics", + "categoryLabel": "Metrics", "subcategory": "statistics", "subcategoryLabel": "Statistics", "notes": [], @@ -66446,8 +66380,8 @@ "subcategory": "statuses" }, "slug": "create-a-commit-status", - "category": "repos", - "categoryLabel": "Repos", + "category": "commits", + "categoryLabel": "Commits", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", @@ -76126,8 +76060,8 @@ "subcategory": "invitations" }, "slug": "list-repository-invitations-for-the-authenticated-user", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -76207,8 +76141,8 @@ "subcategory": "invitations" }, "slug": "accept-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], @@ -76287,8 +76221,8 @@ "subcategory": "invitations" }, "slug": "decline-a-repository-invitation", - "category": "repos", - "categoryLabel": "Repos", + "category": "collaborators", + "categoryLabel": "Collaborators", "subcategory": "invitations", "subcategoryLabel": "Invitations", "notes": [], diff --git a/middleware/contextualizers/rest.js b/middleware/contextualizers/rest.js index bc5c0b6119a8..9ed8f2a06e7b 100644 --- a/middleware/contextualizers/rest.js +++ b/middleware/contextualizers/rest.js @@ -1,5 +1,5 @@ import path from 'path' -import getRest, { restRepoCategoryExceptions } from '../../lib/rest/index.js' +import getRest from '../../lib/rest/index.js' import removeFPTFromPath from '../../lib/remove-fpt-from-path.js' // Global cache to avoid calling getRest() more than once @@ -24,16 +24,11 @@ export default async function restContext(req, res, next) { if (!req.pagePath.includes('rest/reference')) return next() // e.g. the `activity` from `/en/rest/reference/activity#events` - let category = req.pagePath + const category = req.pagePath .split('rest/reference')[1] .replace(/^\//, '') // remove leading slash .split('/')[0] - // override the category if the category is in the restRepoCategoryExceptions list - if (restRepoCategoryExceptions.includes(category)) { - category = 'repos' - } - // ignore empty strings or bare `/` if (!category || category.length < 2) return next() diff --git a/script/rest/update-files.js b/script/rest/update-files.js index 4d40680f837f..9aca5d62b4f5 100755 --- a/script/rest/update-files.js +++ b/script/rest/update-files.js @@ -33,13 +33,15 @@ program ) .option('-d --include-deprecated', 'Includes schemas that are marked as `deprecated: true`') .option('-u --include-unpublished', 'Includes schemas that are marked as `published: false`') + .option('--redirects-only', 'Only generate the redirects file') .parse(process.argv) -const { decorateOnly, versions, includeUnpublished, includeDeprecated } = program.opts() +const { decorateOnly, versions, includeUnpublished, includeDeprecated, redirectsOnly } = + program.opts() // Check that the github/github repo exists. If the files are only being // decorated, the github/github repo isn't needed. -if (!decorateOnly) { +if (!decorateOnly && !redirectsOnly) { try { await stat(githubRepoDir) } catch (error) { @@ -68,11 +70,15 @@ main() async function main() { // Generate the dereferenced OpenAPI schema files - if (!decorateOnly) { + if (!decorateOnly && !redirectsOnly) { await getDereferencedFiles() } // Decorate the dereferenced files in a format ingestible by docs.github.com - await decorate() + if (!redirectsOnly) { + await decorate() + } + + await updateRedirectOverrides() console.log( '\n🏁 The static REST API files are now up-to-date with your local `github/github` checkout. To revert uncommitted changes, run `git checkout lib/rest/static/*.\n\n' @@ -128,6 +134,23 @@ async function getDereferencedFiles() { } } +async function updateRedirectOverrides() { + const overrides = JSON.parse(await readFile('script/rest/utils/rest-api-overrides.json', 'utf8')) + + const redirects = {} + console.log('\n➡️ Updating REST API redirect exception list.\n') + for (const value of Object.values(overrides)) { + const oldUrl = value.originalUrl + const anchor = oldUrl.replace('/rest/reference', '').split('#')[1] + redirects[oldUrl] = `/rest/reference/${value.category}#${anchor}` + } + await writeFile( + 'lib/redirects/static/rest-api-redirect-exceptions.json', + JSON.stringify(redirects, null, 2), + 'utf8' + ) +} + async function decorate() { console.log('\n🎄 Decorating the OpenAPI schema files in lib/rest/static/dereferenced.\n') const dereferencedSchemas = {} diff --git a/script/rest/utils/operation.js b/script/rest/utils/operation.js index 23f9e648419d..6c01fbf519c6 100644 --- a/script/rest/utils/operation.js +++ b/script/rest/utils/operation.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +import { readFile } from 'fs/promises' import { get, flatten, isPlainObject } from 'lodash-es' import { sentenceCase } from 'change-case' import GitHubSlugger from 'github-slugger' @@ -7,6 +8,9 @@ import renderContent from '../../../lib/render-content/index.js' import createCodeSamples from './create-code-samples.js' import Ajv from 'ajv' import operationSchema from './operation-schema.js' +const overrideOperations = JSON.parse( + await readFile('script/rest/utils/rest-api-overrides.json', 'utf8') +) const slugger = new GitHubSlugger() // titles that can't be derived by sentence-casing the ID @@ -26,14 +30,31 @@ export default class Operation { this.slug = slugger.slug(this.summary) // Add category + // workaround for misnamed `code-scanning.` category bug // https://github.com/github/rest-api-description/issues/38 this['x-github'].category = this['x-github'].category.replace('.', '') - this.category = this['x-github'].category + // A temporary override file allows us to override the category defined in + // the openapi schema. Without it, we'd have to update several + // @documentation_urls in the github/github code every time we move + // an endpoint to a new page. + this.category = overrideOperations[this.operationId] + ? overrideOperations[this.operationId].category + : this['x-github'].category this.categoryLabel = categoryTitles[this.category] || sentenceCase(this.category) // Add subcategory - if (this['x-github'].subcategory) { + + // A temporary override file allows us to override the subcategory + // defined in the openapi schema. Without it, we'd have to update several + // @documentation_urls in the github/github code every time we move + // an endpoint to a new page. + if (overrideOperations[this.operationId]) { + if (overrideOperations[this.operationId].subcategory) { + this.subcategory = overrideOperations[this.operationId].subcategory + this.subcategoryLabel = sentenceCase(this.subcategory) + } + } else if (this['x-github'].subcategory) { this.subcategory = this['x-github'].subcategory this.subcategoryLabel = sentenceCase(this.subcategory) } diff --git a/script/rest/utils/rest-api-overrides.json b/script/rest/utils/rest-api-overrides.json new file mode 100644 index 000000000000..491b9587d9ce --- /dev/null +++ b/script/rest/utils/rest-api-overrides.json @@ -0,0 +1,612 @@ +{ + "repos/list-collaborators": { + "category": "collaborators", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-repository-collaborators" + }, + "repos/check-collaborator": { + "category": "collaborators", + "subcategory": null, + "originalUrl": "/rest/reference/repos#check-if-a-user-is-a-repository-collaborator" + }, + "repos/add-collaborator": { + "category": "collaborators", + "subcategory": null, + "originalUrl": "/rest/reference/repos#add-a-repository-collaborator" + }, + "repos/remove-collaborator": { + "category": "collaborators", + "subcategory": null, + "originalUrl": "/rest/reference/repos#remove-a-repository-collaborator" + }, + "repos/get-collaborator-permission-level": { + "category": "collaborators", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-repository-permissions-for-a-user" + }, + "repos/list-commit-comments-for-repo": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#list-commit-comments-for-a-repository" + }, + "repos/get-commit-comment": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#get-a-commit-comment" + }, + "repos/update-commit-comment": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#update-a-commit-comment" + }, + "repos/delete-commit-comment": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#delete-a-commit-comment" + }, + "repos/list-commits": { + "category": "commits", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-commits" + }, + "repos/list-branches-for-head-commit": { + "category": "commits", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-branches-for-head-commit" + }, + "repos/list-comments-for-commit": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#list-commit-comments" + }, + "repos/create-commit-comment": { + "category": "commits", + "subcategory": "comments", + "originalUrl": "/rest/reference/repos#create-a-commit-comment" + }, + "repos/list-pull-requests-associated-with-commit": { + "category": "commits", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-pull-requests-associated-with-a-commit" + }, + "repos/get-commit": { + "category": "commits", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-commit" + }, + "repos/get-combined-status-for-ref": { + "category": "commits", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#get-the-combined-status-for-a-specific-reference" + }, + "repos/list-commit-statuses-for-ref": { + "category": "commits", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#list-commit-statuses-for-a-reference" + }, + "repos/get-community-profile-metrics": { + "category": "metrics", + "subcategory": "community", + "originalUrl": "/rest/reference/repos#get-community-profile-metrics" + }, + "repos/compare-commits": { + "category": "commits", + "subcategory": null, + "originalUrl": "/rest/reference/repos#compare-two-commits" + }, + "repos/get-all-environments": { + "category": "deployments", + "subcategory": "environments", + "originalUrl": "/rest/reference/repos#get-all-environments" + }, + "repos/get-environment": { + "category": "deployments", + "subcategory": "environments", + "originalUrl": "/rest/reference/repos#get-an-environment" + }, + "repos/create-or-update-environment": { + "category": "deployments", + "subcategory": "environments", + "originalUrl": "/rest/reference/repos#create-or-update-an-environment" + }, + "repos/delete-an-environment": { + "category": "deployments", + "subcategory": "environments", + "originalUrl": "/rest/reference/repos#delete-an-environment" + }, + "repos/list-invitations": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#list-repository-invitations" + }, + "repos/update-invitation": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#update-a-repository-invitation" + }, + "repos/delete-invitation": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#delete-a-repository-invitation" + }, + "repos/list-deploy-keys": { + "category": "deployments", + "subcategory": "keys", + "originalUrl": "/rest/reference/repos#list-deploy-keys" + }, + "repos/create-deploy-key": { + "category": "deployments", + "subcategory": "keys", + "originalUrl": "/rest/reference/repos#create-a-deploy-key" + }, + "repos/get-deploy-key": { + "category": "deployments", + "subcategory": "keys", + "originalUrl": "/rest/reference/repos#get-a-deploy-key" + }, + "repos/delete-deploy-key": { + "category": "deployments", + "subcategory": "keys", + "originalUrl": "/rest/reference/repos#delete-a-deploy-key" + }, + "repos/get-pages": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-github-pages-site" + }, + "repos/create-pages-site": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#create-a-github-pages-site" + }, + "repos/update-information-about-pages-site": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#update-information-about-a-github-pages-site" + }, + "repos/delete-pages-site": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#delete-a-github-pages-site" + }, + "repos/list-pages-builds": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-github-pages-builds" + }, + "repos/request-pages-build": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#request-a-github-pages-build" + }, + "repos/get-latest-pages-build": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-latest-pages-build" + }, + "repos/get-pages-build": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-github-pages-build" + }, + "repos/get-pages-health-check": { + "category": "pages", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-dns-health-check-for-github-pages" + }, + "repos/get-code-frequency-stats": { + "category": "metrics", + "subcategory": "statistics", + "originalUrl": "/rest/reference/repos#get-the-weekly-commit-activity" + }, + "repos/get-commit-activity-stats": { + "category": "metrics", + "subcategory": "statistics", + "originalUrl": "/rest/reference/repos#get-the-last-year-of-commit-activity" + }, + "repos/get-contributors-stats": { + "category": "metrics", + "subcategory": "statistics", + "originalUrl": "/rest/reference/repos#get-all-contributor-commit-activity" + }, + "repos/get-participation-stats": { + "category": "metrics", + "subcategory": "statistics", + "originalUrl": "/rest/reference/repos#get-the-weekly-commit-count" + }, + "repos/get-punch-card-stats": { + "category": "metrics", + "subcategory": "statistics", + "originalUrl": "/rest/reference/repos#get-the-hourly-commit-count-for-each-day" + }, + "repos/create-commit-status": { + "category": "commits", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#create-a-commit-status" + }, + "repos/get-clones": { + "category": "metrics", + "subcategory": "traffic", + "originalUrl": "/rest/reference/repos#get-repository-clones" + }, + "repos/get-top-paths": { + "category": "metrics", + "subcategory": "traffic", + "originalUrl": "/rest/reference/repos#get-top-referral-paths" + }, + "repos/get-top-referrers": { + "category": "metrics", + "subcategory": "traffic", + "originalUrl": "/rest/reference/repos#get-top-referral-sources" + }, + "repos/get-views": { + "category": "metrics", + "subcategory": "traffic", + "originalUrl": "/rest/reference/repos#get-page-views" + }, + "repos/list-invitations-for-authenticated-user": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#list-repository-invitations-for-the-authenticated-user" + }, + "repos/accept-invitation-for-authenticated-user": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#accept-a-repository-invitation" + }, + "repos/decline-invitation-for-authenticated-user": { + "category": "collaborators", + "subcategory": "invitations", + "originalUrl": "/rest/reference/repos#decline-a-repository-invitation" + }, + "repos/list-branches": { + "category": "branches", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-branches" + }, + "repos/get-branch": { + "category": "branches", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-branch" + }, + "repos/rename-branch": { + "category": "branches", + "subcategory": null, + "originalUrl": "/rest/reference/repos#rename-a-branch" + }, + "repos/merge-upstream": { + "category": "branches", + "subcategory": null, + "originalUrl": "/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository" + }, + "repos/merge": { + "category": "branches", + "subcategory": null, + "originalUrl": "/rest/reference/repos#merge-a-branch" + }, + "repos/add-app-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#add-app-access-restrictions" + }, + "repos/add-status-check-contexts": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#add-status-check-contexts" + }, + "repos/add-team-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#add-team-access-restrictions" + }, + "repos/add-user-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#add-user-access-restrictions" + }, + "repos/create-commit-signature-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#create-commit-signature-protection" + }, + "repos/delete-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#delete-access-restrictions" + }, + "repos/delete-admin-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#delete-admin-branch-protection" + }, + "repos/delete-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#delete-branch-protection" + }, + "repos/delete-commit-signature-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#delete-commit-signature-protection" + }, + "repos/delete-pull-request-review-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#delete-pull-request-review-protection" + }, + "repos/get-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-access-restrictions" + }, + "repos/get-admin-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-admin-branch-protection" + }, + "repos/get-all-status-check-contexts": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-all-status-check-contexts" + }, + "repos/get-apps-with-access-to-protected-branch": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#list-apps-with-access-to-the-protected-branch" + }, + "repos/update-pull-request-review-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#update-pull-request-review-protection" + }, + "repos/get-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-branch-protection" + }, + "repos/get-commit-signature-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-commit-signature-protection" + }, + "repos/get-pull-request-review-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-pull-request-review-protection" + }, + "repos/get-status-checks-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#get-status-checks-protection" + }, + "repos/get-teams-with-access-to-protected-branch": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#list-teams-with-access-to-the-protected-branch" + }, + "repos/get-users-with-access-to-protected-branch": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#list-users-with-access-to-the-protected-branch" + }, + "repos/remove-app-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#remove-app-access-restrictions" + }, + "repos/remove-status-check-contexts": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#remove-status-check-contexts" + }, + "repos/remove-status-check-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#remove-status-check-protection" + }, + "repos/remove-team-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#remove-team-access-restrictions" + }, + "repos/remove-user-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#remove-user-access-restrictions" + }, + "repos/set-admin-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#set-admin-branch-protection" + }, + "repos/set-app-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#set-app-access-restrictions" + }, + "repos/set-status-check-contexts": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#set-status-check-contexts" + }, + "repos/set-team-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#set-team-access-restrictions" + }, + "repos/set-user-access-restrictions": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#set-user-access-restrictions" + }, + "repos/update-branch-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#update-branch-protection" + }, + "repos/update-status-check-protection": { + "category": "branches", + "subcategory": "branch-protection", + "originalUrl": "/rest/reference/repos#update-status-check-protection" + }, + "repos/create-deployment-status": { + "category": "deployments", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#create-a-deployment-status" + }, + "repos/list-deployment-statuses": { + "category": "deployments", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#list-deployment-statuses" + }, + "repos/get-deployment-status": { + "category": "deployments", + "subcategory": "statuses", + "originalUrl": "/rest/reference/repos#get-a-deployment-status" + }, + "repos/list-deployments": { + "category": "deployments", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-deployments" + }, + "repos/create-deployment": { + "category": "deployments", + "subcategory": null, + "originalUrl": "/rest/reference/repos#create-a-deployment" + }, + "repos/get-deployment": { + "category": "deployments", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-deployment" + }, + "repos/delete-deployment": { + "category": "deployments", + "subcategory": null, + "originalUrl": "/rest/reference/repos#delete-a-deployment" + }, + "repos/list-releases": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#list-releases" + }, + "repos/create-release": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#create-a-release" + }, + "repos/generate-release-notes": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#generate-release-notes" + }, + "repos/get-latest-release": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-the-latest-release" + }, + "repos/get-release-by-tag": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-release-by-tag-name" + }, + "repos/get-release": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#get-a-release" + }, + "repos/update-release": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#update-a-release" + }, + "repos/delete-release": { + "category": "releases", + "subcategory": null, + "originalUrl": "/rest/reference/repos#delete-a-release" + }, + "repos/delete-release-asset": { + "category": "releases", + "subcategory": "assets", + "originalUrl": "/rest/reference/repos#delete-a-release-asset" + }, + "repos/get-release-asset": { + "category": "releases", + "subcategory": "assets", + "originalUrl": "/rest/reference/repos#get-a-release-asset" + }, + "repos/list-release-assets": { + "category": "releases", + "subcategory": "assets", + "originalUrl": "/rest/reference/repos#list-release-assets" + }, + "repos/update-release-asset": { + "category": "releases", + "subcategory": "assets", + "originalUrl": "/rest/reference/repos#update-a-release-asset" + }, + "repos/upload-release-asset": { + "category": "releases", + "subcategory": "assets", + "originalUrl": "/rest/reference/repos#upload-a-release-asset" + }, + "repos/list-webhooks": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#list-repository-webhooks" + }, + "repos/create-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#create-a-repository-webhook" + }, + "repos/get-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#get-a-repository-webhook" + }, + "repos/update-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#update-a-repository-webhook" + }, + "repos/delete-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#delete-a-repository-webhook" + }, + "repos/ping-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#ping-a-repository-webhook" + }, + "repos/test-push-webhook": { + "category": "webhooks", + "subcategory": "repos", + "originalUrl": "/rest/reference/repos#test-the-push-repository-webhook" + }, + "repos/get-webhook-config-for-repo": { + "category": "webhooks", + "subcategory": "repo-config", + "originalUrl": "/rest/reference/repos#get-a-webhook-configuration-for-a-repository" + }, + "repos/update-webhook-config-for-repo": { + "category": "webhooks", + "subcategory": "repo-config", + "originalUrl": "/rest/reference/repos#update-a-webhook-configuration-for-a-repository" + }, + "repos/get-webhook-delivery": { + "category": "webhooks", + "subcategory": "repo-deliveries", + "originalUrl": "/rest/reference/repos#get-a-delivery-for-a-repository-webhook" + }, + "repos/list-webhook-deliveries": { + "category": "webhooks", + "subcategory": "repo-deliveries", + "originalUrl": "/rest/reference/repos#list-deliveries-for-a-repository-webhook" + }, + "repos/redeliver-webhook-delivery": { + "category": "webhooks", + "subcategory": "repo-deliveries", + "originalUrl": "/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook" + } +} \ No newline at end of file diff --git a/tests/rendering/rest.js b/tests/rendering/rest.js index 00104ab042b0..8f6609759939 100644 --- a/tests/rendering/rest.js +++ b/tests/rendering/rest.js @@ -4,7 +4,7 @@ import fs from 'fs/promises' import { difference, isPlainObject } from 'lodash-es' import { getJSON } from '../helpers/supertest.js' import enterpriseServerReleases from '../../lib/enterprise-server-releases.js' -import getRest, { restRepoCategoryExceptions } from '../../lib/rest/index.js' +import getRest from '../../lib/rest/index.js' import { jest } from '@jest/globals' const __dirname = path.dirname(fileURLToPath(import.meta.url)) @@ -28,7 +28,6 @@ describe('REST references docs', () => { !excludeFromResourceNameCheck.find((excludedFile) => filename.endsWith(excludedFile)) ) .map((filename) => filename.replace('.md', '')) - .filter((filename) => !restRepoCategoryExceptions.includes(filename)) const missingResource = 'Found a markdown file in content/rest/reference that is not represented by an OpenAPI REST operation category.' diff --git a/translations/es-ES/content/rest/reference/repository-metrics.md b/translations/es-ES/content/rest/reference/repository-metrics.md deleted file mode 100644 index aea394d6e09c..000000000000 --- a/translations/es-ES/content/rest/reference/repository-metrics.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Repository metrics -intro: 'The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository.' -allowTitleToDifferFromFilename: true -versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' -topics: - - API -miniTocMaxHeadingLevel: 3 ---- - -{% ifversion fpt or ghec %} -## Community - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'community' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% endif %} - -## Statistics - -The Repository Statistics API allows you to fetch the data that {% data variables.product.product_name %} uses for visualizing different -types of repository activity. - -### A word about caching - -Computing repository statistics is an expensive operation, so we try to return cached -data whenever possible. If the data hasn't been cached when you query a repository's -statistics, you'll receive a `202` response; a background job is also fired to -start compiling these statistics. Give the job a few moments to complete, and -then submit the request again. If the job has completed, that request will receive a -`200` response with the statistics in the response body. - -Repository statistics are cached by the SHA of the repository's default branch; pushing to the default branch resets the statistics cache. - -### Statistics exclude some types of commits - -The statistics exposed by the API match the statistics shown by [different repository graphs](/github/visualizing-repository-data-with-graphs/about-repository-graphs). - -To summarize: -- All statistics exclude merge commits. -- Contributor statistics also exclude empty commits. - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'statistics' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% ifversion fpt or ghec %} -## Traffic - -For repositories that you have push access to, the traffic API provides access -to the information provided in your repository graph. For more information, see "Viewing traffic to a repository." - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'traffic' %}{% include rest_operation %}{% endif %} -{% endfor %} -{% endif %} \ No newline at end of file diff --git a/translations/ja-JP/content/rest/reference/repository-metrics.md b/translations/ja-JP/content/rest/reference/repository-metrics.md deleted file mode 100644 index aea394d6e09c..000000000000 --- a/translations/ja-JP/content/rest/reference/repository-metrics.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Repository metrics -intro: 'The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository.' -allowTitleToDifferFromFilename: true -versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' -topics: - - API -miniTocMaxHeadingLevel: 3 ---- - -{% ifversion fpt or ghec %} -## Community - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'community' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% endif %} - -## Statistics - -The Repository Statistics API allows you to fetch the data that {% data variables.product.product_name %} uses for visualizing different -types of repository activity. - -### A word about caching - -Computing repository statistics is an expensive operation, so we try to return cached -data whenever possible. If the data hasn't been cached when you query a repository's -statistics, you'll receive a `202` response; a background job is also fired to -start compiling these statistics. Give the job a few moments to complete, and -then submit the request again. If the job has completed, that request will receive a -`200` response with the statistics in the response body. - -Repository statistics are cached by the SHA of the repository's default branch; pushing to the default branch resets the statistics cache. - -### Statistics exclude some types of commits - -The statistics exposed by the API match the statistics shown by [different repository graphs](/github/visualizing-repository-data-with-graphs/about-repository-graphs). - -To summarize: -- All statistics exclude merge commits. -- Contributor statistics also exclude empty commits. - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'statistics' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% ifversion fpt or ghec %} -## Traffic - -For repositories that you have push access to, the traffic API provides access -to the information provided in your repository graph. For more information, see "Viewing traffic to a repository." - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'traffic' %}{% include rest_operation %}{% endif %} -{% endfor %} -{% endif %} \ No newline at end of file diff --git a/translations/pt-BR/content/rest/reference/repository-metrics.md b/translations/pt-BR/content/rest/reference/repository-metrics.md deleted file mode 100644 index aea394d6e09c..000000000000 --- a/translations/pt-BR/content/rest/reference/repository-metrics.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Repository metrics -intro: 'The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository.' -allowTitleToDifferFromFilename: true -versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' -topics: - - API -miniTocMaxHeadingLevel: 3 ---- - -{% ifversion fpt or ghec %} -## Community - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'community' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% endif %} - -## Statistics - -The Repository Statistics API allows you to fetch the data that {% data variables.product.product_name %} uses for visualizing different -types of repository activity. - -### A word about caching - -Computing repository statistics is an expensive operation, so we try to return cached -data whenever possible. If the data hasn't been cached when you query a repository's -statistics, you'll receive a `202` response; a background job is also fired to -start compiling these statistics. Give the job a few moments to complete, and -then submit the request again. If the job has completed, that request will receive a -`200` response with the statistics in the response body. - -Repository statistics are cached by the SHA of the repository's default branch; pushing to the default branch resets the statistics cache. - -### Statistics exclude some types of commits - -The statistics exposed by the API match the statistics shown by [different repository graphs](/github/visualizing-repository-data-with-graphs/about-repository-graphs). - -To summarize: -- All statistics exclude merge commits. -- Contributor statistics also exclude empty commits. - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'statistics' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% ifversion fpt or ghec %} -## Traffic - -For repositories that you have push access to, the traffic API provides access -to the information provided in your repository graph. For more information, see "Viewing traffic to a repository." - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'traffic' %}{% include rest_operation %}{% endif %} -{% endfor %} -{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/repository-metrics.md b/translations/zh-CN/content/rest/reference/repository-metrics.md deleted file mode 100644 index aea394d6e09c..000000000000 --- a/translations/zh-CN/content/rest/reference/repository-metrics.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Repository metrics -intro: 'The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository.' -allowTitleToDifferFromFilename: true -versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' -topics: - - API -miniTocMaxHeadingLevel: 3 ---- - -{% ifversion fpt or ghec %} -## Community - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'community' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% endif %} - -## Statistics - -The Repository Statistics API allows you to fetch the data that {% data variables.product.product_name %} uses for visualizing different -types of repository activity. - -### A word about caching - -Computing repository statistics is an expensive operation, so we try to return cached -data whenever possible. If the data hasn't been cached when you query a repository's -statistics, you'll receive a `202` response; a background job is also fired to -start compiling these statistics. Give the job a few moments to complete, and -then submit the request again. If the job has completed, that request will receive a -`200` response with the statistics in the response body. - -Repository statistics are cached by the SHA of the repository's default branch; pushing to the default branch resets the statistics cache. - -### Statistics exclude some types of commits - -The statistics exposed by the API match the statistics shown by [different repository graphs](/github/visualizing-repository-data-with-graphs/about-repository-graphs). - -To summarize: -- All statistics exclude merge commits. -- Contributor statistics also exclude empty commits. - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'statistics' %}{% include rest_operation %}{% endif %} -{% endfor %} - -{% ifversion fpt or ghec %} -## Traffic - -For repositories that you have push access to, the traffic API provides access -to the information provided in your repository graph. For more information, see "Viewing traffic to a repository." - -{% for operation in currentRestOperations %} - {% if operation.subcategory == 'traffic' %}{% include rest_operation %}{% endif %} -{% endfor %} -{% endif %} \ No newline at end of file