UNPKG

1.5 MBTypeScriptView Raw
1/**
2 * This file was auto-generated by openapi-typescript.
3 * Do not make direct changes to the file.
4 */
5
6export interface paths {
7 "/": {
8 /** Get Hypermedia links to resources accessible in GitHub's REST API */
9 get: operations["meta/root"];
10 };
11 "/app": {
12 /**
13 * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint.
14 *
15 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
16 */
17 get: operations["apps/get-authenticated"];
18 };
19 "/app-manifests/{code}/conversions": {
20 /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */
21 post: operations["apps/create-from-manifest"];
22 };
23 "/app/hook/config": {
24 /**
25 * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
26 *
27 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
28 */
29 get: operations["apps/get-webhook-config-for-app"];
30 /**
31 * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
32 *
33 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
34 */
35 patch: operations["apps/update-webhook-config-for-app"];
36 };
37 "/app/installations": {
38 /**
39 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
40 *
41 * The permissions the installation has are included under the `permissions` key.
42 */
43 get: operations["apps/list-installations"];
44 };
45 "/app/installations/{installation_id}": {
46 /**
47 * Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to.
48 *
49 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
50 */
51 get: operations["apps/get-installation"];
52 /**
53 * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint.
54 *
55 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
56 */
57 delete: operations["apps/delete-installation"];
58 };
59 "/app/installations/{installation_id}/access_tokens": {
60 /**
61 * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.
62 *
63 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
64 */
65 post: operations["apps/create-installation-access-token"];
66 };
67 "/app/installations/{installation_id}/suspended": {
68 /**
69 * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
70 *
71 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
72 */
73 put: operations["apps/suspend-installation"];
74 /**
75 * Removes a GitHub App installation suspension.
76 *
77 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
78 */
79 delete: operations["apps/unsuspend-installation"];
80 };
81 "/applications/grants": {
82 /**
83 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
84 *
85 * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.
86 */
87 get: operations["oauth-authorizations/list-grants"];
88 };
89 "/applications/grants/{grant_id}": {
90 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
91 get: operations["oauth-authorizations/get-grant"];
92 /**
93 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
94 *
95 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
96 */
97 delete: operations["oauth-authorizations/delete-grant"];
98 };
99 "/applications/{client_id}/grant": {
100 /**
101 * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
102 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
103 */
104 delete: operations["apps/delete-authorization"];
105 };
106 "/applications/{client_id}/grants/{access_token}": {
107 /**
108 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
109 *
110 * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted.
111 *
112 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized).
113 */
114 delete: operations["apps/revoke-grant-for-application"];
115 };
116 "/applications/{client_id}/token": {
117 /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */
118 post: operations["apps/check-token"];
119 /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */
120 delete: operations["apps/delete-token"];
121 /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */
122 patch: operations["apps/reset-token"];
123 };
124 "/applications/{client_id}/token/scoped": {
125 /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */
126 post: operations["apps/scope-token"];
127 };
128 "/applications/{client_id}/tokens/{access_token}": {
129 /**
130 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
131 *
132 * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
133 */
134 get: operations["apps/check-authorization"];
135 /**
136 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
137 *
138 * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
139 */
140 post: operations["apps/reset-authorization"];
141 /**
142 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
143 *
144 * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.
145 */
146 delete: operations["apps/revoke-authorization-for-application"];
147 };
148 "/apps/{app_slug}": {
149 /**
150 * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
151 *
152 * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
153 */
154 get: operations["apps/get-by-slug"];
155 };
156 "/authorizations": {
157 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
158 get: operations["oauth-authorizations/list-authorizations"];
159 /**
160 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
161 *
162 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
163 *
164 * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
165 *
166 * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.
167 *
168 * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).
169 *
170 * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).
171 */
172 post: operations["oauth-authorizations/create-authorization"];
173 };
174 "/authorizations/clients/{client_id}": {
175 /**
176 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
177 *
178 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
179 *
180 * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
181 *
182 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
183 *
184 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
185 */
186 put: operations["oauth-authorizations/get-or-create-authorization-for-app"];
187 };
188 "/authorizations/clients/{client_id}/{fingerprint}": {
189 /**
190 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
191 *
192 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
193 *
194 * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
195 *
196 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
197 */
198 put: operations["oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint"];
199 };
200 "/authorizations/{authorization_id}": {
201 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
202 get: operations["oauth-authorizations/get-authorization"];
203 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
204 delete: operations["oauth-authorizations/delete-authorization"];
205 /**
206 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
207 *
208 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
209 *
210 * You can only send one of these scope keys at a time.
211 */
212 patch: operations["oauth-authorizations/update-authorization"];
213 };
214 "/codes_of_conduct": {
215 get: operations["codes-of-conduct/get-all-codes-of-conduct"];
216 };
217 "/codes_of_conduct/{key}": {
218 get: operations["codes-of-conduct/get-conduct-code"];
219 };
220 "/emojis": {
221 /** Lists all the emojis available to use on GitHub. */
222 get: operations["emojis/get"];
223 };
224 "/enterprises/{enterprise}/actions/permissions": {
225 /**
226 * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
227 *
228 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
229 */
230 get: operations["enterprise-admin/get-github-actions-permissions-enterprise"];
231 /**
232 * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
233 *
234 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
235 */
236 put: operations["enterprise-admin/set-github-actions-permissions-enterprise"];
237 };
238 "/enterprises/{enterprise}/actions/permissions/organizations": {
239 /**
240 * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
241 *
242 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
243 */
244 get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"];
245 /**
246 * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
247 *
248 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
249 */
250 put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"];
251 };
252 "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": {
253 /**
254 * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
255 *
256 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
257 */
258 put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"];
259 /**
260 * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
261 *
262 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
263 */
264 delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"];
265 };
266 "/enterprises/{enterprise}/actions/permissions/selected-actions": {
267 /**
268 * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
269 *
270 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
271 */
272 get: operations["enterprise-admin/get-allowed-actions-enterprise"];
273 /**
274 * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
275 *
276 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
277 */
278 put: operations["enterprise-admin/set-allowed-actions-enterprise"];
279 };
280 "/enterprises/{enterprise}/actions/runner-groups": {
281 /**
282 * Lists all self-hosted runner groups for an enterprise.
283 *
284 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
285 */
286 get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"];
287 /**
288 * Creates a new self-hosted runner group for an enterprise.
289 *
290 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
291 */
292 post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"];
293 };
294 "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": {
295 /**
296 * Gets a specific self-hosted runner group for an enterprise.
297 *
298 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
299 */
300 get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"];
301 /**
302 * Deletes a self-hosted runner group for an enterprise.
303 *
304 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
305 */
306 delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"];
307 /**
308 * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.
309 *
310 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
311 */
312 patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"];
313 };
314 "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": {
315 /**
316 * Lists the organizations with access to a self-hosted runner group.
317 *
318 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
319 */
320 get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"];
321 /**
322 * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.
323 *
324 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
325 */
326 put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"];
327 };
328 "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": {
329 /**
330 * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
331 *
332 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
333 */
334 put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"];
335 /**
336 * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
337 *
338 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
339 */
340 delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"];
341 };
342 "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": {
343 /**
344 * Lists the self-hosted runners that are in a specific enterprise group.
345 *
346 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
347 */
348 get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"];
349 /**
350 * Replaces the list of self-hosted runners that are part of an enterprise runner group.
351 *
352 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
353 */
354 put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"];
355 };
356 "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": {
357 /**
358 * Adds a self-hosted runner to a runner group configured in an enterprise.
359 *
360 * You must authenticate using an access token with the `admin:enterprise`
361 * scope to use this endpoint.
362 */
363 put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"];
364 /**
365 * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.
366 *
367 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
368 */
369 delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"];
370 };
371 "/enterprises/{enterprise}/actions/runners": {
372 /**
373 * Lists all self-hosted runners configured for an enterprise.
374 *
375 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
376 */
377 get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"];
378 };
379 "/enterprises/{enterprise}/actions/runners/downloads": {
380 /**
381 * Lists binaries for the runner application that you can download and run.
382 *
383 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
384 */
385 get: operations["enterprise-admin/list-runner-applications-for-enterprise"];
386 };
387 "/enterprises/{enterprise}/actions/runners/registration-token": {
388 /**
389 * Returns a token that you can pass to the `config` script. The token expires after one hour.
390 *
391 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
392 *
393 * #### Example using registration token
394 *
395 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
396 *
397 * ```
398 * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
399 * ```
400 */
401 post: operations["enterprise-admin/create-registration-token-for-enterprise"];
402 };
403 "/enterprises/{enterprise}/actions/runners/remove-token": {
404 /**
405 * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.
406 *
407 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
408 *
409 * #### Example using remove token
410 *
411 * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this
412 * endpoint.
413 *
414 * ```
415 * ./config.sh remove --token TOKEN
416 * ```
417 */
418 post: operations["enterprise-admin/create-remove-token-for-enterprise"];
419 };
420 "/enterprises/{enterprise}/actions/runners/{runner_id}": {
421 /**
422 * Gets a specific self-hosted runner configured in an enterprise.
423 *
424 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
425 */
426 get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"];
427 /**
428 * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
429 *
430 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
431 */
432 delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"];
433 };
434 "/enterprises/{enterprise}/audit-log": {
435 /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */
436 get: operations["enterprise-admin/get-audit-log"];
437 };
438 "/enterprises/{enterprise}/settings/billing/actions": {
439 /**
440 * Gets the summary of the free and paid GitHub Actions minutes used.
441 *
442 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
443 *
444 * The authenticated user must be an enterprise admin.
445 */
446 get: operations["billing/get-github-actions-billing-ghe"];
447 };
448 "/enterprises/{enterprise}/settings/billing/packages": {
449 /**
450 * Gets the free and paid storage used for GitHub Packages in gigabytes.
451 *
452 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
453 *
454 * The authenticated user must be an enterprise admin.
455 */
456 get: operations["billing/get-github-packages-billing-ghe"];
457 };
458 "/enterprises/{enterprise}/settings/billing/shared-storage": {
459 /**
460 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
461 *
462 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
463 *
464 * The authenticated user must be an enterprise admin.
465 */
466 get: operations["billing/get-shared-storage-billing-ghe"];
467 };
468 "/events": {
469 /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */
470 get: operations["activity/list-public-events"];
471 };
472 "/feeds": {
473 /**
474 * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:
475 *
476 * * **Timeline**: The GitHub global public timeline
477 * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia)
478 * * **Current user public**: The public timeline for the authenticated user
479 * * **Current user**: The private timeline for the authenticated user
480 * * **Current user actor**: The private timeline for activity created by the authenticated user
481 * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
482 * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
483 *
484 * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
485 */
486 get: operations["activity/get-feeds"];
487 };
488 "/gists": {
489 /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */
490 get: operations["gists/list"];
491 /**
492 * Allows you to add a new gist with one or more files.
493 *
494 * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
495 */
496 post: operations["gists/create"];
497 };
498 "/gists/public": {
499 /**
500 * List public gists sorted by most recently updated to least recently updated.
501 *
502 * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
503 */
504 get: operations["gists/list-public"];
505 };
506 "/gists/starred": {
507 /** List the authenticated user's starred gists: */
508 get: operations["gists/list-starred"];
509 };
510 "/gists/{gist_id}": {
511 get: operations["gists/get"];
512 delete: operations["gists/delete"];
513 /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */
514 patch: operations["gists/update"];
515 };
516 "/gists/{gist_id}/comments": {
517 get: operations["gists/list-comments"];
518 post: operations["gists/create-comment"];
519 };
520 "/gists/{gist_id}/comments/{comment_id}": {
521 get: operations["gists/get-comment"];
522 delete: operations["gists/delete-comment"];
523 patch: operations["gists/update-comment"];
524 };
525 "/gists/{gist_id}/commits": {
526 get: operations["gists/list-commits"];
527 };
528 "/gists/{gist_id}/forks": {
529 get: operations["gists/list-forks"];
530 /** **Note**: This was previously `/gists/:gist_id/fork`. */
531 post: operations["gists/fork"];
532 };
533 "/gists/{gist_id}/star": {
534 get: operations["gists/check-is-starred"];
535 /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */
536 put: operations["gists/star"];
537 delete: operations["gists/unstar"];
538 };
539 "/gists/{gist_id}/{sha}": {
540 get: operations["gists/get-revision"];
541 };
542 "/gitignore/templates": {
543 /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */
544 get: operations["gitignore/get-all-templates"];
545 };
546 "/gitignore/templates/{name}": {
547 /**
548 * The API also allows fetching the source of a single template.
549 * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents.
550 */
551 get: operations["gitignore/get-template"];
552 };
553 "/installation/repositories": {
554 /**
555 * List repositories that an app installation can access.
556 *
557 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
558 */
559 get: operations["apps/list-repos-accessible-to-installation"];
560 };
561 "/installation/token": {
562 /**
563 * Revokes the installation token you're using to authenticate as an installation and access this endpoint.
564 *
565 * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint.
566 *
567 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
568 */
569 delete: operations["apps/revoke-installation-access-token"];
570 };
571 "/issues": {
572 /**
573 * List issues assigned to the authenticated user across all visible repositories including owned repositories, member
574 * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not
575 * necessarily assigned to you.
576 *
577 *
578 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
579 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
580 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
581 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
582 */
583 get: operations["issues/list"];
584 };
585 "/licenses": {
586 get: operations["licenses/get-all-commonly-used"];
587 };
588 "/licenses/{license}": {
589 get: operations["licenses/get"];
590 };
591 "/markdown": {
592 post: operations["markdown/render"];
593 };
594 "/markdown/raw": {
595 /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */
596 post: operations["markdown/render-raw"];
597 };
598 "/marketplace_listing/accounts/{account_id}": {
599 /**
600 * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
601 *
602 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
603 */
604 get: operations["apps/get-subscription-plan-for-account"];
605 };
606 "/marketplace_listing/plans": {
607 /**
608 * Lists all plans that are part of your GitHub Marketplace listing.
609 *
610 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
611 */
612 get: operations["apps/list-plans"];
613 };
614 "/marketplace_listing/plans/{plan_id}/accounts": {
615 /**
616 * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
617 *
618 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
619 */
620 get: operations["apps/list-accounts-for-plan"];
621 };
622 "/marketplace_listing/stubbed/accounts/{account_id}": {
623 /**
624 * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
625 *
626 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
627 */
628 get: operations["apps/get-subscription-plan-for-account-stubbed"];
629 };
630 "/marketplace_listing/stubbed/plans": {
631 /**
632 * Lists all plans that are part of your GitHub Marketplace listing.
633 *
634 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
635 */
636 get: operations["apps/list-plans-stubbed"];
637 };
638 "/marketplace_listing/stubbed/plans/{plan_id}/accounts": {
639 /**
640 * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
641 *
642 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
643 */
644 get: operations["apps/list-accounts-for-plan-stubbed"];
645 };
646 "/meta": {
647 /**
648 * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)."
649 *
650 * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.
651 */
652 get: operations["meta/get"];
653 };
654 "/networks/{owner}/{repo}/events": {
655 get: operations["activity/list-public-events-for-repo-network"];
656 };
657 "/notifications": {
658 /** List all notifications for the current user, sorted by most recently updated. */
659 get: operations["activity/list-notifications-for-authenticated-user"];
660 /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */
661 put: operations["activity/mark-notifications-as-read"];
662 };
663 "/notifications/threads/{thread_id}": {
664 get: operations["activity/get-thread"];
665 patch: operations["activity/mark-thread-as-read"];
666 };
667 "/notifications/threads/{thread_id}/subscription": {
668 /**
669 * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription).
670 *
671 * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
672 */
673 get: operations["activity/get-thread-subscription-for-authenticated-user"];
674 /**
675 * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.
676 *
677 * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
678 *
679 * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint.
680 */
681 put: operations["activity/set-thread-subscription"];
682 /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */
683 delete: operations["activity/delete-thread-subscription"];
684 };
685 "/octocat": {
686 /** Get the octocat as ASCII art */
687 get: operations["meta/get-octocat"];
688 };
689 "/organizations": {
690 /**
691 * Lists all organizations, in the order that they were created on GitHub.
692 *
693 * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations.
694 */
695 get: operations["orgs/list"];
696 };
697 "/orgs/{org}": {
698 /**
699 * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
700 *
701 * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below."
702 */
703 get: operations["orgs/get"];
704 /**
705 * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).
706 *
707 * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.
708 */
709 patch: operations["orgs/update"];
710 };
711 "/orgs/{org}/actions/permissions": {
712 /**
713 * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
714 *
715 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
716 */
717 get: operations["actions/get-github-actions-permissions-organization"];
718 /**
719 * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
720 *
721 * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.
722 *
723 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
724 */
725 put: operations["actions/set-github-actions-permissions-organization"];
726 };
727 "/orgs/{org}/actions/permissions/repositories": {
728 /**
729 * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
730 *
731 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
732 */
733 get: operations["actions/list-selected-repositories-enabled-github-actions-organization"];
734 /**
735 * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
736 *
737 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
738 */
739 put: operations["actions/set-selected-repositories-enabled-github-actions-organization"];
740 };
741 "/orgs/{org}/actions/permissions/repositories/{repository_id}": {
742 /**
743 * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
744 *
745 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
746 */
747 put: operations["actions/enable-selected-repository-github-actions-organization"];
748 /**
749 * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
750 *
751 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
752 */
753 delete: operations["actions/disable-selected-repository-github-actions-organization"];
754 };
755 "/orgs/{org}/actions/permissions/selected-actions": {
756 /**
757 * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).""
758 *
759 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
760 */
761 get: operations["actions/get-allowed-actions-organization"];
762 /**
763 * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
764 *
765 * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.
766 *
767 * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.
768 *
769 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
770 */
771 put: operations["actions/set-allowed-actions-organization"];
772 };
773 "/orgs/{org}/actions/runner-groups": {
774 /**
775 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
776 *
777 * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.
778 *
779 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
780 */
781 get: operations["actions/list-self-hosted-runner-groups-for-org"];
782 /**
783 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
784 *
785 * Creates a new self-hosted runner group for an organization.
786 *
787 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
788 */
789 post: operations["actions/create-self-hosted-runner-group-for-org"];
790 };
791 "/orgs/{org}/actions/runner-groups/{runner_group_id}": {
792 /**
793 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
794 *
795 * Gets a specific self-hosted runner group for an organization.
796 *
797 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
798 */
799 get: operations["actions/get-self-hosted-runner-group-for-org"];
800 /**
801 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
802 *
803 * Deletes a self-hosted runner group for an organization.
804 *
805 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
806 */
807 delete: operations["actions/delete-self-hosted-runner-group-from-org"];
808 /**
809 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
810 *
811 * Updates the `name` and `visibility` of a self-hosted runner group in an organization.
812 *
813 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
814 */
815 patch: operations["actions/update-self-hosted-runner-group-for-org"];
816 };
817 "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": {
818 /**
819 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
820 *
821 * Lists the repositories with access to a self-hosted runner group configured in an organization.
822 *
823 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
824 */
825 get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"];
826 /**
827 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
828 *
829 * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.
830 *
831 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
832 */
833 put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"];
834 };
835 "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": {
836 /**
837 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
838 *
839 *
840 * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
841 *
842 * You must authenticate using an access token with the `admin:org`
843 * scope to use this endpoint.
844 */
845 put: operations["actions/add-repo-access-to-self-hosted-runner-group-in-org"];
846 /**
847 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
848 *
849 *
850 * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
851 *
852 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
853 */
854 delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"];
855 };
856 "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": {
857 /**
858 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
859 *
860 * Lists self-hosted runners that are in a specific organization group.
861 *
862 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
863 */
864 get: operations["actions/list-self-hosted-runners-in-group-for-org"];
865 /**
866 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
867 *
868 * Replaces the list of self-hosted runners that are part of an organization runner group.
869 *
870 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
871 */
872 put: operations["actions/set-self-hosted-runners-in-group-for-org"];
873 };
874 "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": {
875 /**
876 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
877 *
878 *
879 * Adds a self-hosted runner to a runner group configured in an organization.
880 *
881 * You must authenticate using an access token with the `admin:org`
882 * scope to use this endpoint.
883 */
884 put: operations["actions/add-self-hosted-runner-to-group-for-org"];
885 /**
886 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
887 *
888 *
889 * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
890 *
891 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
892 */
893 delete: operations["actions/remove-self-hosted-runner-from-group-for-org"];
894 };
895 "/orgs/{org}/actions/runners": {
896 /**
897 * Lists all self-hosted runners configured in an organization.
898 *
899 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
900 */
901 get: operations["actions/list-self-hosted-runners-for-org"];
902 };
903 "/orgs/{org}/actions/runners/downloads": {
904 /**
905 * Lists binaries for the runner application that you can download and run.
906 *
907 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
908 */
909 get: operations["actions/list-runner-applications-for-org"];
910 };
911 "/orgs/{org}/actions/runners/registration-token": {
912 /**
913 * Returns a token that you can pass to the `config` script. The token expires after one hour.
914 *
915 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
916 *
917 * #### Example using registration token
918 *
919 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
920 *
921 * ```
922 * ./config.sh --url https://github.com/octo-org --token TOKEN
923 * ```
924 */
925 post: operations["actions/create-registration-token-for-org"];
926 };
927 "/orgs/{org}/actions/runners/remove-token": {
928 /**
929 * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.
930 *
931 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
932 *
933 * #### Example using remove token
934 *
935 * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this
936 * endpoint.
937 *
938 * ```
939 * ./config.sh remove --token TOKEN
940 * ```
941 */
942 post: operations["actions/create-remove-token-for-org"];
943 };
944 "/orgs/{org}/actions/runners/{runner_id}": {
945 /**
946 * Gets a specific self-hosted runner configured in an organization.
947 *
948 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
949 */
950 get: operations["actions/get-self-hosted-runner-for-org"];
951 /**
952 * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
953 *
954 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
955 */
956 delete: operations["actions/delete-self-hosted-runner-from-org"];
957 };
958 "/orgs/{org}/actions/secrets": {
959 /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
960 get: operations["actions/list-org-secrets"];
961 };
962 "/orgs/{org}/actions/secrets/public-key": {
963 /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
964 get: operations["actions/get-org-public-key"];
965 };
966 "/orgs/{org}/actions/secrets/{secret_name}": {
967 /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
968 get: operations["actions/get-org-secret"];
969 /**
970 * Creates or updates an organization secret with an encrypted value. Encrypt your secret using
971 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
972 * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to
973 * use this endpoint.
974 *
975 * #### Example encrypting a secret using Node.js
976 *
977 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
978 *
979 * ```
980 * const sodium = require('tweetsodium');
981 *
982 * const key = "base64-encoded-public-key";
983 * const value = "plain-text-secret";
984 *
985 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
986 * const messageBytes = Buffer.from(value);
987 * const keyBytes = Buffer.from(key, 'base64');
988 *
989 * // Encrypt using LibSodium.
990 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
991 *
992 * // Base64 the encrypted secret
993 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
994 *
995 * console.log(encrypted);
996 * ```
997 *
998 *
999 * #### Example encrypting a secret using Python
1000 *
1001 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
1002 *
1003 * ```
1004 * from base64 import b64encode
1005 * from nacl import encoding, public
1006 *
1007 * def encrypt(public_key: str, secret_value: str) -> str:
1008 * """Encrypt a Unicode string using the public key."""
1009 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
1010 * sealed_box = public.SealedBox(public_key)
1011 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
1012 * return b64encode(encrypted).decode("utf-8")
1013 * ```
1014 *
1015 * #### Example encrypting a secret using C#
1016 *
1017 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
1018 *
1019 * ```
1020 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
1021 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
1022 *
1023 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
1024 *
1025 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
1026 * ```
1027 *
1028 * #### Example encrypting a secret using Ruby
1029 *
1030 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
1031 *
1032 * ```ruby
1033 * require "rbnacl"
1034 * require "base64"
1035 *
1036 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
1037 * public_key = RbNaCl::PublicKey.new(key)
1038 *
1039 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
1040 * encrypted_secret = box.encrypt("my_secret")
1041 *
1042 * # Print the base64 encoded secret
1043 * puts Base64.strict_encode64(encrypted_secret)
1044 * ```
1045 */
1046 put: operations["actions/create-or-update-org-secret"];
1047 /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
1048 delete: operations["actions/delete-org-secret"];
1049 };
1050 "/orgs/{org}/actions/secrets/{secret_name}/repositories": {
1051 /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
1052 get: operations["actions/list-selected-repos-for-org-secret"];
1053 /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
1054 put: operations["actions/set-selected-repos-for-org-secret"];
1055 };
1056 "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": {
1057 /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
1058 put: operations["actions/add-selected-repo-to-org-secret"];
1059 /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
1060 delete: operations["actions/remove-selected-repo-from-org-secret"];
1061 };
1062 "/orgs/{org}/audit-log": {
1063 /**
1064 * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
1065 *
1066 * To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.
1067 */
1068 get: operations["orgs/get-audit-log"];
1069 };
1070 "/orgs/{org}/blocks": {
1071 /** List the users blocked by an organization. */
1072 get: operations["orgs/list-blocked-users"];
1073 };
1074 "/orgs/{org}/blocks/{username}": {
1075 get: operations["orgs/check-blocked-user"];
1076 put: operations["orgs/block-user"];
1077 delete: operations["orgs/unblock-user"];
1078 };
1079 "/orgs/{org}/credential-authorizations": {
1080 /**
1081 * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).
1082 *
1083 * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on).
1084 */
1085 get: operations["orgs/list-saml-sso-authorizations"];
1086 };
1087 "/orgs/{org}/credential-authorizations/{credential_id}": {
1088 /**
1089 * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).
1090 *
1091 * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.
1092 */
1093 delete: operations["orgs/remove-saml-sso-authorization"];
1094 };
1095 "/orgs/{org}/events": {
1096 get: operations["activity/list-public-org-events"];
1097 };
1098 "/orgs/{org}/failed_invitations": {
1099 /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */
1100 get: operations["orgs/list-failed-invitations"];
1101 };
1102 "/orgs/{org}/hooks": {
1103 get: operations["orgs/list-webhooks"];
1104 /** Here's how you can create a hook that posts payloads in JSON format: */
1105 post: operations["orgs/create-webhook"];
1106 };
1107 "/orgs/{org}/hooks/{hook_id}": {
1108 /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */
1109 get: operations["orgs/get-webhook"];
1110 delete: operations["orgs/delete-webhook"];
1111 /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. 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 an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */
1112 patch: operations["orgs/update-webhook"];
1113 };
1114 "/orgs/{org}/hooks/{hook_id}/config": {
1115 /**
1116 * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)."
1117 *
1118 * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission.
1119 */
1120 get: operations["orgs/get-webhook-config-for-org"];
1121 /**
1122 * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)."
1123 *
1124 * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission.
1125 */
1126 patch: operations["orgs/update-webhook-config-for-org"];
1127 };
1128 "/orgs/{org}/hooks/{hook_id}/pings": {
1129 /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */
1130 post: operations["orgs/ping-webhook"];
1131 };
1132 "/orgs/{org}/installation": {
1133 /**
1134 * Enables an authenticated GitHub App to find the organization's installation information.
1135 *
1136 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
1137 */
1138 get: operations["apps/get-org-installation"];
1139 };
1140 "/orgs/{org}/installations": {
1141 /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */
1142 get: operations["orgs/list-app-installations"];
1143 };
1144 "/orgs/{org}/interaction-limits": {
1145 /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */
1146 get: operations["interactions/get-restrictions-for-org"];
1147 /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */
1148 put: operations["interactions/set-restrictions-for-org"];
1149 /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */
1150 delete: operations["interactions/remove-restrictions-for-org"];
1151 };
1152 "/orgs/{org}/invitations": {
1153 /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */
1154 get: operations["orgs/list-pending-invitations"];
1155 /**
1156 * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
1157 *
1158 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
1159 */
1160 post: operations["orgs/create-invitation"];
1161 };
1162 "/orgs/{org}/invitations/{invitation_id}": {
1163 /**
1164 * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.
1165 *
1166 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications).
1167 */
1168 delete: operations["orgs/cancel-invitation"];
1169 };
1170 "/orgs/{org}/invitations/{invitation_id}/teams": {
1171 /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */
1172 get: operations["orgs/list-invitation-teams"];
1173 };
1174 "/orgs/{org}/issues": {
1175 /**
1176 * List issues in an organization assigned to the authenticated user.
1177 *
1178 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
1179 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
1180 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
1181 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
1182 */
1183 get: operations["issues/list-for-org"];
1184 };
1185 "/orgs/{org}/members": {
1186 /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */
1187 get: operations["orgs/list-members"];
1188 };
1189 "/orgs/{org}/members/{username}": {
1190 /** Check if a user is, publicly or privately, a member of the organization. */
1191 get: operations["orgs/check-membership-for-user"];
1192 /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */
1193 delete: operations["orgs/remove-member"];
1194 };
1195 "/orgs/{org}/memberships/{username}": {
1196 /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */
1197 get: operations["orgs/get-membership-for-user"];
1198 /**
1199 * Only authenticated organization owners can add a member to the organization or update the member's role.
1200 *
1201 * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.
1202 *
1203 * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.
1204 *
1205 * **Rate limits**
1206 *
1207 * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
1208 */
1209 put: operations["orgs/set-membership-for-user"];
1210 /**
1211 * In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
1212 *
1213 * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
1214 */
1215 delete: operations["orgs/remove-membership-for-user"];
1216 };
1217 "/orgs/{org}/migrations": {
1218 /** Lists the most recent migrations. */
1219 get: operations["migrations/list-for-org"];
1220 /** Initiates the generation of a migration archive. */
1221 post: operations["migrations/start-for-org"];
1222 };
1223 "/orgs/{org}/migrations/{migration_id}": {
1224 /**
1225 * Fetches the status of a migration.
1226 *
1227 * The `state` of a migration can be one of the following values:
1228 *
1229 * * `pending`, which means the migration hasn't started yet.
1230 * * `exporting`, which means the migration is in progress.
1231 * * `exported`, which means the migration finished successfully.
1232 * * `failed`, which means the migration failed.
1233 */
1234 get: operations["migrations/get-status-for-org"];
1235 };
1236 "/orgs/{org}/migrations/{migration_id}/archive": {
1237 /** Fetches the URL to a migration archive. */
1238 get: operations["migrations/download-archive-for-org"];
1239 /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */
1240 delete: operations["migrations/delete-archive-for-org"];
1241 };
1242 "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": {
1243 /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */
1244 delete: operations["migrations/unlock-repo-for-org"];
1245 };
1246 "/orgs/{org}/migrations/{migration_id}/repositories": {
1247 /** List all the repositories for this organization migration. */
1248 get: operations["migrations/list-repos-for-org"];
1249 };
1250 "/orgs/{org}/outside_collaborators": {
1251 /** List all users who are outside collaborators of an organization. */
1252 get: operations["orgs/list-outside-collaborators"];
1253 };
1254 "/orgs/{org}/outside_collaborators/{username}": {
1255 /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */
1256 put: operations["orgs/convert-member-to-outside-collaborator"];
1257 /** Removing a user from this list will remove them from all the organization's repositories. */
1258 delete: operations["orgs/remove-outside-collaborator"];
1259 };
1260 "/orgs/{org}/packages/{package_type}/{package_name}": {
1261 /**
1262 * Gets a specific package in an organization.
1263 *
1264 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
1265 * If `package_type` is not `container`, your token must also include the `repo` scope.
1266 */
1267 get: operations["packages/get-package-for-organization"];
1268 /**
1269 * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
1270 *
1271 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:
1272 * - If `package_type` is not `container`, your token must also include the `repo` scope.
1273 * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
1274 */
1275 delete: operations["packages/delete-package-for-org"];
1276 };
1277 "/orgs/{org}/packages/{package_type}/{package_name}/restore": {
1278 /**
1279 * Restores an entire package in an organization.
1280 *
1281 * You can restore a deleted package under the following conditions:
1282 * - The package was deleted within the last 30 days.
1283 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
1284 *
1285 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:
1286 * - If `package_type` is not `container`, your token must also include the `repo` scope.
1287 * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
1288 */
1289 post: operations["packages/restore-package-for-org"];
1290 };
1291 "/orgs/{org}/packages/{package_type}/{package_name}/versions": {
1292 /**
1293 * Returns all package versions for a package owned by an organization.
1294 *
1295 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
1296 * If `package_type` is not `container`, your token must also include the `repo` scope.
1297 */
1298 get: operations["packages/get-all-package-versions-for-package-owned-by-org"];
1299 };
1300 "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": {
1301 /**
1302 * Gets a specific package version in an organization.
1303 *
1304 * You must authenticate using an access token with the `packages:read` scope.
1305 * If `package_type` is not `container`, your token must also include the `repo` scope.
1306 */
1307 get: operations["packages/get-package-version-for-organization"];
1308 /**
1309 * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
1310 *
1311 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:
1312 * - If `package_type` is not `container`, your token must also include the `repo` scope.
1313 * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
1314 */
1315 delete: operations["packages/delete-package-version-for-org"];
1316 };
1317 "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": {
1318 /**
1319 * Restores a specific package version in an organization.
1320 *
1321 * You can restore a deleted package under the following conditions:
1322 * - The package was deleted within the last 30 days.
1323 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
1324 *
1325 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:
1326 * - If `package_type` is not `container`, your token must also include the `repo` scope.
1327 * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
1328 */
1329 post: operations["packages/restore-package-version-for-org"];
1330 };
1331 "/orgs/{org}/projects": {
1332 /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
1333 get: operations["projects/list-for-org"];
1334 /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
1335 post: operations["projects/create-for-org"];
1336 };
1337 "/orgs/{org}/public_members": {
1338 /** Members of an organization can choose to have their membership publicized or not. */
1339 get: operations["orgs/list-public-members"];
1340 };
1341 "/orgs/{org}/public_members/{username}": {
1342 get: operations["orgs/check-public-membership-for-user"];
1343 /**
1344 * The user can publicize their own membership. (A user cannot publicize the membership for another user.)
1345 *
1346 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
1347 */
1348 put: operations["orgs/set-public-membership-for-authenticated-user"];
1349 delete: operations["orgs/remove-public-membership-for-authenticated-user"];
1350 };
1351 "/orgs/{org}/repos": {
1352 /** Lists repositories for the specified organization. */
1353 get: operations["repos/list-for-org"];
1354 /**
1355 * Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
1356 *
1357 * **OAuth scope requirements**
1358 *
1359 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
1360 *
1361 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
1362 * * `repo` scope to create a private repository
1363 */
1364 post: operations["repos/create-in-org"];
1365 };
1366 "/orgs/{org}/settings/billing/actions": {
1367 /**
1368 * Gets the summary of the free and paid GitHub Actions minutes used.
1369 *
1370 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
1371 *
1372 * Access tokens must have the `repo` or `admin:org` scope.
1373 */
1374 get: operations["billing/get-github-actions-billing-org"];
1375 };
1376 "/orgs/{org}/settings/billing/packages": {
1377 /**
1378 * Gets the free and paid storage used for GitHub Packages in gigabytes.
1379 *
1380 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
1381 *
1382 * Access tokens must have the `repo` or `admin:org` scope.
1383 */
1384 get: operations["billing/get-github-packages-billing-org"];
1385 };
1386 "/orgs/{org}/settings/billing/shared-storage": {
1387 /**
1388 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
1389 *
1390 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
1391 *
1392 * Access tokens must have the `repo` or `admin:org` scope.
1393 */
1394 get: operations["billing/get-shared-storage-billing-org"];
1395 };
1396 "/orgs/{org}/team-sync/groups": {
1397 /**
1398 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
1399 *
1400 * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."
1401 *
1402 * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this:
1403 */
1404 get: operations["teams/list-idp-groups-for-org"];
1405 };
1406 "/orgs/{org}/teams": {
1407 /** Lists all teams in an organization that are visible to the authenticated user. */
1408 get: operations["teams/list"];
1409 /**
1410 * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)."
1411 *
1412 * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)".
1413 */
1414 post: operations["teams/create"];
1415 };
1416 "/orgs/{org}/teams/{team_slug}": {
1417 /**
1418 * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.
1419 *
1420 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.
1421 */
1422 get: operations["teams/get-by-name"];
1423 /**
1424 * To delete a team, the authenticated user must be an organization owner or team maintainer.
1425 *
1426 * If you are an organization owner, deleting a parent team will delete all of its child teams as well.
1427 *
1428 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.
1429 */
1430 delete: operations["teams/delete-in-org"];
1431 /**
1432 * To edit a team, the authenticated user must either be an organization owner or a team maintainer.
1433 *
1434 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.
1435 */
1436 patch: operations["teams/update-in-org"];
1437 };
1438 "/orgs/{org}/teams/{team_slug}/discussions": {
1439 /**
1440 * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1441 *
1442 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.
1443 */
1444 get: operations["teams/list-discussions-in-org"];
1445 /**
1446 * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1447 *
1448 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
1449 *
1450 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.
1451 */
1452 post: operations["teams/create-discussion-in-org"];
1453 };
1454 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": {
1455 /**
1456 * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1457 *
1458 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
1459 */
1460 get: operations["teams/get-discussion-in-org"];
1461 /**
1462 * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1463 *
1464 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
1465 */
1466 delete: operations["teams/delete-discussion-in-org"];
1467 /**
1468 * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1469 *
1470 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
1471 */
1472 patch: operations["teams/update-discussion-in-org"];
1473 };
1474 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": {
1475 /**
1476 * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1477 *
1478 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
1479 */
1480 get: operations["teams/list-discussion-comments-in-org"];
1481 /**
1482 * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1483 *
1484 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
1485 *
1486 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
1487 */
1488 post: operations["teams/create-discussion-comment-in-org"];
1489 };
1490 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": {
1491 /**
1492 * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1493 *
1494 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
1495 */
1496 get: operations["teams/get-discussion-comment-in-org"];
1497 /**
1498 * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1499 *
1500 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
1501 */
1502 delete: operations["teams/delete-discussion-comment-in-org"];
1503 /**
1504 * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1505 *
1506 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
1507 */
1508 patch: operations["teams/update-discussion-comment-in-org"];
1509 };
1510 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": {
1511 /**
1512 * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1513 *
1514 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
1515 */
1516 get: operations["reactions/list-for-team-discussion-comment-in-org"];
1517 /**
1518 * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
1519 *
1520 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
1521 */
1522 post: operations["reactions/create-for-team-discussion-comment-in-org"];
1523 };
1524 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": {
1525 /**
1526 * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.
1527 *
1528 * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1529 */
1530 delete: operations["reactions/delete-for-team-discussion-comment"];
1531 };
1532 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": {
1533 /**
1534 * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1535 *
1536 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
1537 */
1538 get: operations["reactions/list-for-team-discussion-in-org"];
1539 /**
1540 * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
1541 *
1542 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
1543 */
1544 post: operations["reactions/create-for-team-discussion-in-org"];
1545 };
1546 "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": {
1547 /**
1548 * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.
1549 *
1550 * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
1551 */
1552 delete: operations["reactions/delete-for-team-discussion"];
1553 };
1554 "/orgs/{org}/teams/{team_slug}/invitations": {
1555 /**
1556 * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
1557 *
1558 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.
1559 */
1560 get: operations["teams/list-pending-invitations-in-org"];
1561 };
1562 "/orgs/{org}/teams/{team_slug}/members": {
1563 /**
1564 * Team members will include the members of child teams.
1565 *
1566 * To list members in a team, the team must be visible to the authenticated user.
1567 */
1568 get: operations["teams/list-members-in-org"];
1569 };
1570 "/orgs/{org}/teams/{team_slug}/memberships/{username}": {
1571 /**
1572 * Team members will include the members of child teams.
1573 *
1574 * To get a user's membership with a team, the team must be visible to the authenticated user.
1575 *
1576 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.
1577 *
1578 * **Note:**
1579 * The response contains the `state` of the membership and the member's `role`.
1580 *
1581 * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
1582 */
1583 get: operations["teams/get-membership-for-user-in-org"];
1584 /**
1585 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
1586 *
1587 * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
1588 *
1589 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
1590 *
1591 * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.
1592 *
1593 * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
1594 *
1595 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.
1596 */
1597 put: operations["teams/add-or-update-membership-for-user-in-org"];
1598 /**
1599 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
1600 *
1601 * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
1602 *
1603 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
1604 *
1605 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.
1606 */
1607 delete: operations["teams/remove-membership-for-user-in-org"];
1608 };
1609 "/orgs/{org}/teams/{team_slug}/projects": {
1610 /**
1611 * Lists the organization projects for a team.
1612 *
1613 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.
1614 */
1615 get: operations["teams/list-projects-in-org"];
1616 };
1617 "/orgs/{org}/teams/{team_slug}/projects/{project_id}": {
1618 /**
1619 * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
1620 *
1621 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
1622 */
1623 get: operations["teams/check-permissions-for-project-in-org"];
1624 /**
1625 * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
1626 *
1627 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
1628 */
1629 put: operations["teams/add-or-update-project-permissions-in-org"];
1630 /**
1631 * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.
1632 *
1633 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
1634 */
1635 delete: operations["teams/remove-project-in-org"];
1636 };
1637 "/orgs/{org}/teams/{team_slug}/repos": {
1638 /**
1639 * Lists a team's repositories visible to the authenticated user.
1640 *
1641 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.
1642 */
1643 get: operations["teams/list-repos-in-org"];
1644 };
1645 "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": {
1646 /**
1647 * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.
1648 *
1649 * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.
1650 *
1651 * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.
1652 *
1653 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
1654 */
1655 get: operations["teams/check-permissions-for-repo-in-org"];
1656 /**
1657 * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
1658 *
1659 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
1660 *
1661 * For more information about the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".
1662 */
1663 put: operations["teams/add-or-update-repo-permissions-in-org"];
1664 /**
1665 * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
1666 *
1667 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
1668 */
1669 delete: operations["teams/remove-repo-in-org"];
1670 };
1671 "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": {
1672 /**
1673 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
1674 *
1675 * List IdP groups connected to a team on GitHub.
1676 *
1677 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
1678 */
1679 get: operations["teams/list-idp-groups-in-org"];
1680 /**
1681 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
1682 *
1683 * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
1684 *
1685 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
1686 */
1687 patch: operations["teams/create-or-update-idp-group-connections-in-org"];
1688 };
1689 "/orgs/{org}/teams/{team_slug}/teams": {
1690 /**
1691 * Lists the child teams of the team specified by `{team_slug}`.
1692 *
1693 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.
1694 */
1695 get: operations["teams/list-child-in-org"];
1696 };
1697 "/projects/columns/cards/{card_id}": {
1698 get: operations["projects/get-card"];
1699 delete: operations["projects/delete-card"];
1700 patch: operations["projects/update-card"];
1701 };
1702 "/projects/columns/cards/{card_id}/moves": {
1703 post: operations["projects/move-card"];
1704 };
1705 "/projects/columns/{column_id}": {
1706 get: operations["projects/get-column"];
1707 delete: operations["projects/delete-column"];
1708 patch: operations["projects/update-column"];
1709 };
1710 "/projects/columns/{column_id}/cards": {
1711 get: operations["projects/list-cards"];
1712 post: operations["projects/create-card"];
1713 };
1714 "/projects/columns/{column_id}/moves": {
1715 post: operations["projects/move-column"];
1716 };
1717 "/projects/{project_id}": {
1718 /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
1719 get: operations["projects/get"];
1720 /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */
1721 delete: operations["projects/delete"];
1722 /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
1723 patch: operations["projects/update"];
1724 };
1725 "/projects/{project_id}/collaborators": {
1726 /** Lists the collaborators for an organization project. For a project, 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. You must be an organization owner or a project `admin` to list collaborators. */
1727 get: operations["projects/list-collaborators"];
1728 };
1729 "/projects/{project_id}/collaborators/{username}": {
1730 /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */
1731 put: operations["projects/add-collaborator"];
1732 /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */
1733 delete: operations["projects/remove-collaborator"];
1734 };
1735 "/projects/{project_id}/collaborators/{username}/permission": {
1736 /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */
1737 get: operations["projects/get-permission-for-user"];
1738 };
1739 "/projects/{project_id}/columns": {
1740 get: operations["projects/list-columns"];
1741 post: operations["projects/create-column"];
1742 };
1743 "/rate_limit": {
1744 /**
1745 * **Note:** Accessing this endpoint does not count against your REST API rate limit.
1746 *
1747 * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.
1748 */
1749 get: operations["rate-limit/get"];
1750 };
1751 "/reactions/{reaction_id}": {
1752 /**
1753 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/).
1754 *
1755 * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments).
1756 */
1757 delete: operations["reactions/delete-legacy"];
1758 };
1759 "/repos/{owner}/{repo}": {
1760 /**
1761 * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.
1762 *
1763 * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
1764 */
1765 get: operations["repos/get"];
1766 /**
1767 * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.
1768 *
1769 * If an organization owner has configured the organization to prevent members from deleting organization-owned
1770 * repositories, you will get a `403 Forbidden` response.
1771 */
1772 delete: operations["repos/delete"];
1773 /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */
1774 patch: operations["repos/update"];
1775 };
1776 "/repos/{owner}/{repo}/actions/artifacts": {
1777 /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1778 get: operations["actions/list-artifacts-for-repo"];
1779 };
1780 "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": {
1781 /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1782 get: operations["actions/get-artifact"];
1783 /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
1784 delete: operations["actions/delete-artifact"];
1785 };
1786 "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": {
1787 /**
1788 * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in
1789 * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to
1790 * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
1791 * GitHub Apps must have the `actions:read` permission to use this endpoint.
1792 */
1793 get: operations["actions/download-artifact"];
1794 };
1795 "/repos/{owner}/{repo}/actions/jobs/{job_id}": {
1796 /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1797 get: operations["actions/get-job-for-workflow-run"];
1798 };
1799 "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": {
1800 /**
1801 * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look
1802 * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can
1803 * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must
1804 * have the `actions:read` permission to use this endpoint.
1805 */
1806 get: operations["actions/download-job-logs-for-workflow-run"];
1807 };
1808 "/repos/{owner}/{repo}/actions/permissions": {
1809 /**
1810 * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.
1811 *
1812 * You must authenticate using an access token with the `repo` scope to use this
1813 * endpoint. GitHub Apps must have the `administration` repository permission to use this API.
1814 */
1815 get: operations["actions/get-github-actions-permissions-repository"];
1816 /**
1817 * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.
1818 *
1819 * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.
1820 *
1821 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
1822 */
1823 put: operations["actions/set-github-actions-permissions-repository"];
1824 };
1825 "/repos/{owner}/{repo}/actions/permissions/selected-actions": {
1826 /**
1827 * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
1828 *
1829 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
1830 */
1831 get: operations["actions/get-allowed-actions-repository"];
1832 /**
1833 * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
1834 *
1835 * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.
1836 *
1837 * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.
1838 *
1839 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
1840 */
1841 put: operations["actions/set-allowed-actions-repository"];
1842 };
1843 "/repos/{owner}/{repo}/actions/runners": {
1844 /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */
1845 get: operations["actions/list-self-hosted-runners-for-repo"];
1846 };
1847 "/repos/{owner}/{repo}/actions/runners/downloads": {
1848 /**
1849 * Lists binaries for the runner application that you can download and run.
1850 *
1851 * You must authenticate using an access token with the `repo` scope to use this endpoint.
1852 */
1853 get: operations["actions/list-runner-applications-for-repo"];
1854 };
1855 "/repos/{owner}/{repo}/actions/runners/registration-token": {
1856 /**
1857 * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate
1858 * using an access token with the `repo` scope to use this endpoint.
1859 *
1860 * #### Example using registration token
1861 *
1862 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
1863 *
1864 * ```
1865 * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
1866 * ```
1867 */
1868 post: operations["actions/create-registration-token-for-repo"];
1869 };
1870 "/repos/{owner}/{repo}/actions/runners/remove-token": {
1871 /**
1872 * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
1873 * You must authenticate using an access token with the `repo` scope to use this endpoint.
1874 *
1875 * #### Example using remove token
1876 *
1877 * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
1878 *
1879 * ```
1880 * ./config.sh remove --token TOKEN
1881 * ```
1882 */
1883 post: operations["actions/create-remove-token-for-repo"];
1884 };
1885 "/repos/{owner}/{repo}/actions/runners/{runner_id}": {
1886 /**
1887 * Gets a specific self-hosted runner configured in a repository.
1888 *
1889 * You must authenticate using an access token with the `repo` scope to use this
1890 * endpoint.
1891 */
1892 get: operations["actions/get-self-hosted-runner-for-repo"];
1893 /**
1894 * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
1895 *
1896 * You must authenticate using an access token with the `repo`
1897 * scope to use this endpoint.
1898 */
1899 delete: operations["actions/delete-self-hosted-runner-from-repo"];
1900 };
1901 "/repos/{owner}/{repo}/actions/runs": {
1902 /**
1903 * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
1904 *
1905 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
1906 */
1907 get: operations["actions/list-workflow-runs-for-repo"];
1908 };
1909 "/repos/{owner}/{repo}/actions/runs/{run_id}": {
1910 /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1911 get: operations["actions/get-workflow-run"];
1912 /**
1913 * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is
1914 * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use
1915 * this endpoint.
1916 */
1917 delete: operations["actions/delete-workflow-run"];
1918 };
1919 "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": {
1920 /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1921 get: operations["actions/get-reviews-for-run"];
1922 };
1923 "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": {
1924 /**
1925 * **Note:** This endpoint is currently in beta and is subject to change.
1926 *
1927 * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."
1928 *
1929 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
1930 */
1931 post: operations["actions/approve-workflow-run"];
1932 };
1933 "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": {
1934 /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
1935 get: operations["actions/list-workflow-run-artifacts"];
1936 };
1937 "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": {
1938 /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
1939 post: operations["actions/cancel-workflow-run"];
1940 };
1941 "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": {
1942 /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */
1943 get: operations["actions/list-jobs-for-workflow-run"];
1944 };
1945 "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": {
1946 /**
1947 * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for
1948 * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use
1949 * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have
1950 * the `actions:read` permission to use this endpoint.
1951 */
1952 get: operations["actions/download-workflow-run-logs"];
1953 /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
1954 delete: operations["actions/delete-workflow-run-logs"];
1955 };
1956 "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": {
1957 /**
1958 * Get all deployment environments for a workflow run that are waiting for protection rules to pass.
1959 *
1960 * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
1961 */
1962 get: operations["actions/get-pending-deployments-for-run"];
1963 /**
1964 * Approve or reject pending deployments that are waiting on approval by a required reviewer.
1965 *
1966 * Anyone with read access to the repository contents and deployments can use this endpoint.
1967 */
1968 post: operations["actions/review-pending-deployments-for-run"];
1969 };
1970 "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": {
1971 /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
1972 post: operations["actions/re-run-workflow"];
1973 };
1974 "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": {
1975 /**
1976 * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
1977 *
1978 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
1979 */
1980 get: operations["actions/get-workflow-run-usage"];
1981 };
1982 "/repos/{owner}/{repo}/actions/secrets": {
1983 /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
1984 get: operations["actions/list-repo-secrets"];
1985 };
1986 "/repos/{owner}/{repo}/actions/secrets/public-key": {
1987 /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
1988 get: operations["actions/get-repo-public-key"];
1989 };
1990 "/repos/{owner}/{repo}/actions/secrets/{secret_name}": {
1991 /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
1992 get: operations["actions/get-repo-secret"];
1993 /**
1994 * Creates or updates a repository secret with an encrypted value. Encrypt your secret using
1995 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
1996 * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
1997 * this endpoint.
1998 *
1999 * #### Example encrypting a secret using Node.js
2000 *
2001 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
2002 *
2003 * ```
2004 * const sodium = require('tweetsodium');
2005 *
2006 * const key = "base64-encoded-public-key";
2007 * const value = "plain-text-secret";
2008 *
2009 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
2010 * const messageBytes = Buffer.from(value);
2011 * const keyBytes = Buffer.from(key, 'base64');
2012 *
2013 * // Encrypt using LibSodium.
2014 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
2015 *
2016 * // Base64 the encrypted secret
2017 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
2018 *
2019 * console.log(encrypted);
2020 * ```
2021 *
2022 *
2023 * #### Example encrypting a secret using Python
2024 *
2025 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
2026 *
2027 * ```
2028 * from base64 import b64encode
2029 * from nacl import encoding, public
2030 *
2031 * def encrypt(public_key: str, secret_value: str) -> str:
2032 * """Encrypt a Unicode string using the public key."""
2033 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
2034 * sealed_box = public.SealedBox(public_key)
2035 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
2036 * return b64encode(encrypted).decode("utf-8")
2037 * ```
2038 *
2039 * #### Example encrypting a secret using C#
2040 *
2041 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
2042 *
2043 * ```
2044 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
2045 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
2046 *
2047 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
2048 *
2049 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
2050 * ```
2051 *
2052 * #### Example encrypting a secret using Ruby
2053 *
2054 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
2055 *
2056 * ```ruby
2057 * require "rbnacl"
2058 * require "base64"
2059 *
2060 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
2061 * public_key = RbNaCl::PublicKey.new(key)
2062 *
2063 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
2064 * encrypted_secret = box.encrypt("my_secret")
2065 *
2066 * # Print the base64 encoded secret
2067 * puts Base64.strict_encode64(encrypted_secret)
2068 * ```
2069 */
2070 put: operations["actions/create-or-update-repo-secret"];
2071 /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
2072 delete: operations["actions/delete-repo-secret"];
2073 };
2074 "/repos/{owner}/{repo}/actions/workflows": {
2075 /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
2076 get: operations["actions/list-repo-workflows"];
2077 };
2078 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": {
2079 /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
2080 get: operations["actions/get-workflow"];
2081 };
2082 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": {
2083 /**
2084 * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
2085 *
2086 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
2087 */
2088 put: operations["actions/disable-workflow"];
2089 };
2090 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": {
2091 /**
2092 * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
2093 *
2094 * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."
2095 *
2096 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)."
2097 */
2098 post: operations["actions/create-workflow-dispatch"];
2099 };
2100 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": {
2101 /**
2102 * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
2103 *
2104 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
2105 */
2106 put: operations["actions/enable-workflow"];
2107 };
2108 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": {
2109 /**
2110 * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
2111 *
2112 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
2113 */
2114 get: operations["actions/list-workflow-runs"];
2115 };
2116 "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": {
2117 /**
2118 * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
2119 *
2120 * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
2121 */
2122 get: operations["actions/get-workflow-usage"];
2123 };
2124 "/repos/{owner}/{repo}/assignees": {
2125 /** Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */
2126 get: operations["issues/list-assignees"];
2127 };
2128 "/repos/{owner}/{repo}/assignees/{assignee}": {
2129 /**
2130 * Checks if a user has permission to be assigned to an issue in this repository.
2131 *
2132 * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.
2133 *
2134 * Otherwise a `404` status code is returned.
2135 */
2136 get: operations["issues/check-user-can-be-assigned"];
2137 };
2138 "/repos/{owner}/{repo}/automated-security-fixes": {
2139 /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)". */
2140 put: operations["repos/enable-automated-security-fixes"];
2141 /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)". */
2142 delete: operations["repos/disable-automated-security-fixes"];
2143 };
2144 "/repos/{owner}/{repo}/branches": {
2145 get: operations["repos/list-branches"];
2146 };
2147 "/repos/{owner}/{repo}/branches/{branch}": {
2148 get: operations["repos/get-branch"];
2149 };
2150 "/repos/{owner}/{repo}/branches/{branch}/protection": {
2151 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2152 get: operations["repos/get-branch-protection"];
2153 /**
2154 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2155 *
2156 * Protecting a branch requires admin or owner permissions to the repository.
2157 *
2158 * **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
2159 *
2160 * **Note**: The list of users, apps, and teams in total is limited to 100 items.
2161 */
2162 put: operations["repos/update-branch-protection"];
2163 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2164 delete: operations["repos/delete-branch-protection"];
2165 };
2166 "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": {
2167 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2168 get: operations["repos/get-admin-branch-protection"];
2169 /**
2170 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2171 *
2172 * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
2173 */
2174 post: operations["repos/set-admin-branch-protection"];
2175 /**
2176 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2177 *
2178 * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
2179 */
2180 delete: operations["repos/delete-admin-branch-protection"];
2181 };
2182 "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": {
2183 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2184 get: operations["repos/get-pull-request-review-protection"];
2185 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2186 delete: operations["repos/delete-pull-request-review-protection"];
2187 /**
2188 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2189 *
2190 * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
2191 *
2192 * **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
2193 */
2194 patch: operations["repos/update-pull-request-review-protection"];
2195 };
2196 "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": {
2197 /**
2198 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2199 *
2200 * 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](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help.
2201 *
2202 * **Note**: You must enable branch protection to require signed commits.
2203 */
2204 get: operations["repos/get-commit-signature-protection"];
2205 /**
2206 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2207 *
2208 * 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.
2209 */
2210 post: operations["repos/create-commit-signature-protection"];
2211 /**
2212 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2213 *
2214 * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
2215 */
2216 delete: operations["repos/delete-commit-signature-protection"];
2217 };
2218 "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": {
2219 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2220 get: operations["repos/get-status-checks-protection"];
2221 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2222 delete: operations["repos/remove-status-check-protection"];
2223 /**
2224 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2225 *
2226 * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
2227 */
2228 patch: operations["repos/update-status-check-protection"];
2229 };
2230 "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": {
2231 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2232 get: operations["repos/get-all-status-check-contexts"];
2233 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2234 put: operations["repos/set-status-check-contexts"];
2235 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2236 post: operations["repos/add-status-check-contexts"];
2237 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
2238 delete: operations["repos/remove-status-check-contexts"];
2239 };
2240 "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": {
2241 /**
2242 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2243 *
2244 * Lists who has access to this protected branch.
2245 *
2246 * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.
2247 */
2248 get: operations["repos/get-access-restrictions"];
2249 /**
2250 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2251 *
2252 * Disables the ability to restrict who can push to this branch.
2253 */
2254 delete: operations["repos/delete-access-restrictions"];
2255 };
2256 "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": {
2257 /**
2258 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2259 *
2260 * 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.
2261 */
2262 get: operations["repos/get-apps-with-access-to-protected-branch"];
2263 /**
2264 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2265 *
2266 * 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.
2267 *
2268 * | Type | Description |
2269 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
2270 * | `array` | The 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. |
2271 */
2272 put: operations["repos/set-app-access-restrictions"];
2273 /**
2274 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2275 *
2276 * 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.
2277 *
2278 * | Type | Description |
2279 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
2280 * | `array` | The 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. |
2281 */
2282 post: operations["repos/add-app-access-restrictions"];
2283 /**
2284 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2285 *
2286 * 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.
2287 *
2288 * | Type | Description |
2289 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
2290 * | `array` | The 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. |
2291 */
2292 delete: operations["repos/remove-app-access-restrictions"];
2293 };
2294 "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": {
2295 /**
2296 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2297 *
2298 * Lists the teams who have push access to this branch. The list includes child teams.
2299 */
2300 get: operations["repos/get-teams-with-access-to-protected-branch"];
2301 /**
2302 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2303 *
2304 * 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.
2305 *
2306 * | Type | Description |
2307 * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
2308 * | `array` | The 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. |
2309 */
2310 put: operations["repos/set-team-access-restrictions"];
2311 /**
2312 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2313 *
2314 * Grants the specified teams push access for this branch. You can also give push access to child teams.
2315 *
2316 * | Type | Description |
2317 * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
2318 * | `array` | The 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. |
2319 */
2320 post: operations["repos/add-team-access-restrictions"];
2321 /**
2322 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2323 *
2324 * Removes the ability of a team to push to this branch. You can also remove push access for child teams.
2325 *
2326 * | Type | Description |
2327 * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
2328 * | `array` | Teams 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. |
2329 */
2330 delete: operations["repos/remove-team-access-restrictions"];
2331 };
2332 "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": {
2333 /**
2334 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2335 *
2336 * Lists the people who have push access to this branch.
2337 */
2338 get: operations["repos/get-users-with-access-to-protected-branch"];
2339 /**
2340 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2341 *
2342 * 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.
2343 *
2344 * | Type | Description |
2345 * | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
2346 * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
2347 */
2348 put: operations["repos/set-user-access-restrictions"];
2349 /**
2350 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2351 *
2352 * Grants the specified people push access for this branch.
2353 *
2354 * | Type | Description |
2355 * | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
2356 * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
2357 */
2358 post: operations["repos/add-user-access-restrictions"];
2359 /**
2360 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2361 *
2362 * Removes the ability of a user to push to this branch.
2363 *
2364 * | Type | Description |
2365 * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
2366 * | `array` | Usernames 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. |
2367 */
2368 delete: operations["repos/remove-user-access-restrictions"];
2369 };
2370 "/repos/{owner}/{repo}/branches/{branch}/rename": {
2371 /**
2372 * Renames a branch in a repository.
2373 *
2374 * **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](https://docs.github.com/github/administering-a-repository/renaming-a-branch)".
2375 *
2376 * The permissions required to use this endpoint depends on whether you are renaming the default branch.
2377 *
2378 * To rename a non-default branch:
2379 *
2380 * * Users must have push access.
2381 * * GitHub Apps must have the `contents:write` repository permission.
2382 *
2383 * To rename the default branch:
2384 *
2385 * * Users must have admin or owner permissions.
2386 * * GitHub Apps must have the `administration:write` repository permission.
2387 */
2388 post: operations["repos/rename-branch"];
2389 };
2390 "/repos/{owner}/{repo}/check-runs": {
2391 /**
2392 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
2393 *
2394 * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs.
2395 *
2396 * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
2397 */
2398 post: operations["checks/create"];
2399 };
2400 "/repos/{owner}/{repo}/check-runs/{check_run_id}": {
2401 /**
2402 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
2403 *
2404 * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
2405 */
2406 get: operations["checks/get"];
2407 /**
2408 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
2409 *
2410 * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.
2411 */
2412 patch: operations["checks/update"];
2413 };
2414 "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": {
2415 /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */
2416 get: operations["checks/list-annotations"];
2417 };
2418 "/repos/{owner}/{repo}/check-suites": {
2419 /**
2420 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
2421 *
2422 * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites.
2423 */
2424 post: operations["checks/create-suite"];
2425 };
2426 "/repos/{owner}/{repo}/check-suites/preferences": {
2427 /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */
2428 patch: operations["checks/set-suites-preferences"];
2429 };
2430 "/repos/{owner}/{repo}/check-suites/{check_suite_id}": {
2431 /**
2432 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
2433 *
2434 * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
2435 */
2436 get: operations["checks/get-suite"];
2437 };
2438 "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": {
2439 /**
2440 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
2441 *
2442 * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
2443 */
2444 get: operations["checks/list-for-suite"];
2445 };
2446 "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": {
2447 /**
2448 * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.
2449 *
2450 * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.
2451 */
2452 post: operations["checks/rerequest-suite"];
2453 };
2454 "/repos/{owner}/{repo}/code-scanning/alerts": {
2455 /**
2456 * Lists all open code scanning alerts for the default branch (usually `main`
2457 * or `master`). You must use an access token with the `security_events` scope to use
2458 * this endpoint. GitHub Apps must have the `security_events` read permission to use
2459 * this endpoint.
2460 *
2461 * The response includes a `most_recent_instance` object.
2462 * This provides details of the most recent instance of this alert
2463 * for the default branch or for the specified Git reference
2464 * (if you used `ref` in the request).
2465 */
2466 get: operations["code-scanning/list-alerts-for-repo"];
2467 };
2468 "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": {
2469 /**
2470 * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.
2471 *
2472 * **Deprecation notice**:
2473 * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`.
2474 */
2475 get: operations["code-scanning/get-alert"];
2476 /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. */
2477 patch: operations["code-scanning/update-alert"];
2478 };
2479 "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": {
2480 /** Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */
2481 get: operations["code-scanning/list-alert-instances"];
2482 };
2483 "/repos/{owner}/{repo}/code-scanning/analyses": {
2484 /**
2485 * Lists the details of all code scanning analyses for a repository,
2486 * starting with the most recent.
2487 * The response is paginated and you can use the `page` and `per_page` parameters
2488 * to list the analyses you're interested in.
2489 * By default 30 analyses are listed per page.
2490 *
2491 * The `rules_count` field in the response give the number of rules
2492 * that were run in the analysis.
2493 * For very old analyses this data is not available,
2494 * and `0` is returned in this field.
2495 *
2496 * You must use an access token with the `security_events` scope to use this endpoint.
2497 * GitHub Apps must have the `security_events` read permission to use this endpoint.
2498 *
2499 * **Deprecation notice**:
2500 * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
2501 */
2502 get: operations["code-scanning/list-recent-analyses"];
2503 };
2504 "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": {
2505 /**
2506 * Gets a specified code scanning analysis for a repository.
2507 * You must use an access token with the `security_events` scope to use this endpoint.
2508 * GitHub Apps must have the `security_events` read permission to use this endpoint.
2509 *
2510 * The default JSON response contains fields that describe the analysis.
2511 * This includes the Git reference and commit SHA to which the analysis relates,
2512 * the datetime of the analysis, the name of the code scanning tool,
2513 * and the number of alerts.
2514 *
2515 * The `rules_count` field in the default response give the number of rules
2516 * that were run in the analysis.
2517 * For very old analyses this data is not available,
2518 * and `0` is returned in this field.
2519 *
2520 * If you use the Accept header `application/sarif+json`,
2521 * the response contains the analysis data that was uploaded.
2522 * This is formatted as
2523 * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).
2524 *
2525 * **Deprecation notice**:
2526 * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
2527 */
2528 get: operations["code-scanning/get-analysis"];
2529 /**
2530 * Deletes a specified code scanning analysis from a repository. For
2531 * private repositories, you must use an access token with the `repo` scope. For public repositories,
2532 * you must use an access token with `public_repo` and `repo:security_events` scopes.
2533 * GitHub Apps must have the `security_events` write permission to use this endpoint.
2534 *
2535 * You can delete one analysis at a time.
2536 * To delete a series of analyses, start with the most recent analysis and work backwards.
2537 * Conceptually, the process is similar to the undo function in a text editor.
2538 *
2539 * When you list the analyses for a repository,
2540 * one or more will be identified as deletable in the response:
2541 *
2542 * ```
2543 * "deletable": true
2544 * ```
2545 *
2546 * An analysis is deletable when it's the most recent in a set of analyses.
2547 * Typically, a repository will have multiple sets of analyses
2548 * for each enabled code scanning tool,
2549 * where a set is determined by a unique combination of analysis values:
2550 *
2551 * * `ref`
2552 * * `tool`
2553 * * `analysis_key`
2554 * * `environment`
2555 *
2556 * If you attempt to delete an analysis that is not the most recent in a set,
2557 * you'll get a 400 response with the message:
2558 *
2559 * ```
2560 * Analysis specified is not deletable.
2561 * ```
2562 *
2563 * The response from a successful `DELETE` operation provides you with
2564 * two alternative URLs for deleting the next analysis in the set
2565 * (see the example default response below).
2566 * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
2567 * in the set. This is a useful option if you want to preserve at least one analysis
2568 * for the specified tool in your repository.
2569 * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
2570 * When you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url`
2571 * in the 200 response is `null`.
2572 *
2573 * As an example of the deletion process,
2574 * let's imagine that you added a workflow that configured a particular code scanning tool
2575 * to analyze the code in a repository. This tool has added 15 analyses:
2576 * 10 on the default branch, and another 5 on a topic branch.
2577 * You therefore have two separate sets of analyses for this tool.
2578 * You've now decided that you want to remove all of the analyses for the tool.
2579 * To do this you must make 15 separate deletion requests.
2580 * To start, you must find the deletable analysis for one of the sets,
2581 * step through deleting the analyses in that set,
2582 * and then repeat the process for the second set.
2583 * The procedure therefore consists of a nested loop:
2584 *
2585 * **Outer loop**:
2586 * * List the analyses for the repository, filtered by tool.
2587 * * Parse this list to find a deletable analysis. If found:
2588 *
2589 * **Inner loop**:
2590 * * Delete the identified analysis.
2591 * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
2592 *
2593 * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
2594 */
2595 delete: operations["code-scanning/delete-analysis"];
2596 };
2597 "/repos/{owner}/{repo}/code-scanning/sarifs": {
2598 /**
2599 * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.
2600 *
2601 * There are two places where you can upload code scanning results.
2602 * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
2603 * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
2604 *
2605 * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:
2606 *
2607 * ```
2608 * gzip -c analysis-data.sarif | base64 -w0
2609 * ```
2610 *
2611 * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.
2612 *
2613 * The `202 Accepted`, response includes an `id` value.
2614 * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.
2615 * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)."
2616 */
2617 post: operations["code-scanning/upload-sarif"];
2618 };
2619 "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": {
2620 /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */
2621 get: operations["code-scanning/get-sarif"];
2622 };
2623 "/repos/{owner}/{repo}/collaborators": {
2624 /**
2625 * 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.
2626 *
2627 * Team members will include the members of child teams.
2628 */
2629 get: operations["repos/list-collaborators"];
2630 };
2631 "/repos/{owner}/{repo}/collaborators/{username}": {
2632 /**
2633 * 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.
2634 *
2635 * Team members will include the members of child teams.
2636 */
2637 get: operations["repos/check-collaborator"];
2638 /**
2639 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
2640 *
2641 * For more information the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".
2642 *
2643 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
2644 *
2645 * 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](https://docs.github.com/rest/reference/repos#invitations).
2646 *
2647 * **Rate limits**
2648 *
2649 * To prevent abuse, 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.
2650 */
2651 put: operations["repos/add-collaborator"];
2652 delete: operations["repos/remove-collaborator"];
2653 };
2654 "/repos/{owner}/{repo}/collaborators/{username}/permission": {
2655 /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */
2656 get: operations["repos/get-collaborator-permission-level"];
2657 };
2658 "/repos/{owner}/{repo}/comments": {
2659 /**
2660 * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/).
2661 *
2662 * Comments are ordered by ascending ID.
2663 */
2664 get: operations["repos/list-commit-comments-for-repo"];
2665 };
2666 "/repos/{owner}/{repo}/comments/{comment_id}": {
2667 get: operations["repos/get-commit-comment"];
2668 delete: operations["repos/delete-commit-comment"];
2669 patch: operations["repos/update-commit-comment"];
2670 };
2671 "/repos/{owner}/{repo}/comments/{comment_id}/reactions": {
2672 /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */
2673 get: operations["reactions/list-for-commit-comment"];
2674 /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */
2675 post: operations["reactions/create-for-commit-comment"];
2676 };
2677 "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": {
2678 /**
2679 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.
2680 *
2681 * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments).
2682 */
2683 delete: operations["reactions/delete-for-commit-comment"];
2684 };
2685 "/repos/{owner}/{repo}/commits": {
2686 /**
2687 * **Signature verification object**
2688 *
2689 * 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:
2690 *
2691 * | Name | Type | Description |
2692 * | ---- | ---- | ----------- |
2693 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
2694 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
2695 * | `signature` | `string` | The signature that was extracted from the commit. |
2696 * | `payload` | `string` | The value that was signed. |
2697 *
2698 * These are the possible values for `reason` in the `verification` object:
2699 *
2700 * | Value | Description |
2701 * | ----- | ----------- |
2702 * | `expired_key` | The key that made the signature is expired. |
2703 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
2704 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
2705 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
2706 * | `unsigned` | The object does not include a signature. |
2707 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
2708 * | `no_user` | No user was associated with the `committer` email address in the commit. |
2709 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
2710 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
2711 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
2712 * | `malformed_signature` | There was an error parsing the signature. |
2713 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
2714 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
2715 */
2716 get: operations["repos/list-commits"];
2717 };
2718 "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": {
2719 /**
2720 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
2721 *
2722 * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
2723 */
2724 get: operations["repos/list-branches-for-head-commit"];
2725 };
2726 "/repos/{owner}/{repo}/commits/{commit_sha}/comments": {
2727 /** Use the `:commit_sha` to specify the commit that will have its comments listed. */
2728 get: operations["repos/list-comments-for-commit"];
2729 /**
2730 * Create a comment for a commit using its `:commit_sha`.
2731 *
2732 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
2733 */
2734 post: operations["repos/create-commit-comment"];
2735 };
2736 "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": {
2737 /** 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](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */
2738 get: operations["repos/list-pull-requests-associated-with-commit"];
2739 };
2740 "/repos/{owner}/{repo}/commits/{ref}": {
2741 /**
2742 * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.
2743 *
2744 * **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.
2745 *
2746 * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property.
2747 *
2748 * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) 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.
2749 *
2750 * **Signature verification object**
2751 *
2752 * 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:
2753 *
2754 * | Name | Type | Description |
2755 * | ---- | ---- | ----------- |
2756 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
2757 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
2758 * | `signature` | `string` | The signature that was extracted from the commit. |
2759 * | `payload` | `string` | The value that was signed. |
2760 *
2761 * These are the possible values for `reason` in the `verification` object:
2762 *
2763 * | Value | Description |
2764 * | ----- | ----------- |
2765 * | `expired_key` | The key that made the signature is expired. |
2766 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
2767 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
2768 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
2769 * | `unsigned` | The object does not include a signature. |
2770 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
2771 * | `no_user` | No user was associated with the `committer` email address in the commit. |
2772 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
2773 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
2774 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
2775 * | `malformed_signature` | There was an error parsing the signature. |
2776 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
2777 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
2778 */
2779 get: operations["repos/get-commit"];
2780 };
2781 "/repos/{owner}/{repo}/commits/{ref}/check-runs": {
2782 /**
2783 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
2784 *
2785 * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
2786 */
2787 get: operations["checks/list-for-ref"];
2788 };
2789 "/repos/{owner}/{repo}/commits/{ref}/check-suites": {
2790 /**
2791 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
2792 *
2793 * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
2794 */
2795 get: operations["checks/list-suites-for-ref"];
2796 };
2797 "/repos/{owner}/{repo}/commits/{ref}/status": {
2798 /**
2799 * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
2800 *
2801 * The most recent status for each context is returned, up to 100. This field [paginates](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination) if there are over 100 contexts.
2802 *
2803 * Additionally, a combined `state` is returned. The `state` is one of:
2804 *
2805 * * **failure** if any of the contexts report as `error` or `failure`
2806 * * **pending** if there are no statuses or a context is `pending`
2807 * * **success** if the latest status for all contexts is `success`
2808 */
2809 get: operations["repos/get-combined-status-for-ref"];
2810 };
2811 "/repos/{owner}/{repo}/commits/{ref}/statuses": {
2812 /**
2813 * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
2814 *
2815 * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.
2816 */
2817 get: operations["repos/list-commit-statuses-for-ref"];
2818 };
2819 "/repos/{owner}/{repo}/community/code_of_conduct": {
2820 /**
2821 * Returns the contents of the repository's code of conduct file, if one is detected.
2822 *
2823 * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.
2824 */
2825 get: operations["codes-of-conduct/get-for-repo"];
2826 };
2827 "/repos/{owner}/{repo}/community/profile": {
2828 /**
2829 * This endpoint will return all community profile metrics, including an
2830 * overall health score, repository description, the presence of documentation, detected
2831 * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
2832 * README, and CONTRIBUTING files.
2833 *
2834 * The `health_percentage` score is defined as a percentage of how many of
2835 * these four documents are present: README, CONTRIBUTING, LICENSE, and
2836 * CODE_OF_CONDUCT. For example, if all four documents are present, then
2837 * the `health_percentage` is `100`. If only one is present, then the
2838 * `health_percentage` is `25`.
2839 *
2840 * `content_reports_enabled` is only returned for organization-owned repositories.
2841 */
2842 get: operations["repos/get-community-profile-metrics"];
2843 };
2844 "/repos/{owner}/{repo}/compare/{basehead}": {
2845 /**
2846 * 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`.
2847 *
2848 * 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](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
2849 *
2850 * 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.
2851 *
2852 * **Working with large comparisons**
2853 *
2854 * 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](/rest/guides/traversing-with-pagination)."
2855 *
2856 * 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.
2857 *
2858 * **Signature verification object**
2859 *
2860 * 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:
2861 *
2862 * | Name | Type | Description |
2863 * | ---- | ---- | ----------- |
2864 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
2865 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
2866 * | `signature` | `string` | The signature that was extracted from the commit. |
2867 * | `payload` | `string` | The value that was signed. |
2868 *
2869 * These are the possible values for `reason` in the `verification` object:
2870 *
2871 * | Value | Description |
2872 * | ----- | ----------- |
2873 * | `expired_key` | The key that made the signature is expired. |
2874 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
2875 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
2876 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
2877 * | `unsigned` | The object does not include a signature. |
2878 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
2879 * | `no_user` | No user was associated with the `committer` email address in the commit. |
2880 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
2881 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
2882 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
2883 * | `malformed_signature` | There was an error parsing the signature. |
2884 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
2885 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
2886 */
2887 get: operations["repos/compare-commits-with-basehead"];
2888 };
2889 "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
2890 /**
2891 * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.
2892 *
2893 * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments.
2894 *
2895 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
2896 */
2897 post: operations["apps/create-content-attachment-for-repo"];
2898 };
2899 "/repos/{owner}/{repo}/contents/{path}": {
2900 /**
2901 * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit
2902 * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories.
2903 *
2904 * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for
2905 * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media
2906 * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent
2907 * object format.
2908 *
2909 * **Note**:
2910 * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).
2911 * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees
2912 * API](https://docs.github.com/rest/reference/git#get-a-tree).
2913 * * This API supports files up to 1 megabyte in size.
2914 *
2915 * #### If the content is a directory
2916 * The response will be an array of objects, one object for each item in the directory.
2917 * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value
2918 * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).
2919 * In the next major version of the API, the type will be returned as "submodule".
2920 *
2921 * #### If the content is a symlink
2922 * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the
2923 * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object
2924 * describing the symlink itself.
2925 *
2926 * #### If the content is a submodule
2927 * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific
2928 * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out
2929 * the submodule at that specific commit.
2930 *
2931 * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the
2932 * github.com URLs (`html_url` and `_links["html"]`) will have null values.
2933 */
2934 get: operations["repos/get-content"];
2935 /** Creates a new file or replaces an existing file in a repository. */
2936 put: operations["repos/create-or-update-file-contents"];
2937 /**
2938 * Deletes a file in a repository.
2939 *
2940 * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.
2941 *
2942 * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.
2943 *
2944 * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.
2945 */
2946 delete: operations["repos/delete-file"];
2947 };
2948 "/repos/{owner}/{repo}/contributors": {
2949 /**
2950 * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
2951 *
2952 * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
2953 */
2954 get: operations["repos/list-contributors"];
2955 };
2956 "/repos/{owner}/{repo}/deployments": {
2957 /** Simple filtering of deployments is available via query parameters: */
2958 get: operations["repos/list-deployments"];
2959 /**
2960 * Deployments offer a few configurable parameters with certain defaults.
2961 *
2962 * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
2963 * before we merge a pull request.
2964 *
2965 * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
2966 * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
2967 * makes it easier to track which environments have requested deployments. The default environment is `production`.
2968 *
2969 * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
2970 * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
2971 * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
2972 * return a failure response.
2973 *
2974 * By default, [commit statuses](https://docs.github.com/rest/reference/repos#statuses) for every submitted context must be in a `success`
2975 * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
2976 * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
2977 * not require any contexts or create any commit statuses, the deployment will always succeed.
2978 *
2979 * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
2980 * field that will be passed on when a deployment event is dispatched.
2981 *
2982 * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
2983 * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
2984 * application with debugging enabled.
2985 *
2986 * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref.
2987 *
2988 * #### Merged branch response
2989 * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
2990 * a deployment. This auto-merge happens when:
2991 * * Auto-merge option is enabled in the repository
2992 * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example
2993 * * There are no merge conflicts
2994 *
2995 * If there are no new commits in the base branch, a new request to create a deployment should give a successful
2996 * response.
2997 *
2998 * #### Merge conflict response
2999 * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
3000 * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.
3001 *
3002 * #### Failed commit status checks
3003 * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
3004 * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.
3005 */
3006 post: operations["repos/create-deployment"];
3007 };
3008 "/repos/{owner}/{repo}/deployments/{deployment_id}": {
3009 get: operations["repos/get-deployment"];
3010 /**
3011 * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment.
3012 *
3013 * To set a deployment as inactive, you must:
3014 *
3015 * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
3016 * * Mark the active deployment as inactive by adding any non-successful deployment status.
3017 *
3018 * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)."
3019 */
3020 delete: operations["repos/delete-deployment"];
3021 };
3022 "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": {
3023 /** Users with pull access can view deployment statuses for a deployment: */
3024 get: operations["repos/list-deployment-statuses"];
3025 /**
3026 * Users with `push` access can create deployment statuses for a given deployment.
3027 *
3028 * 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.
3029 */
3030 post: operations["repos/create-deployment-status"];
3031 };
3032 "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": {
3033 /** Users with pull access can view a deployment status for a deployment: */
3034 get: operations["repos/get-deployment-status"];
3035 };
3036 "/repos/{owner}/{repo}/dispatches": {
3037 /**
3038 * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)."
3039 *
3040 * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.
3041 *
3042 * This endpoint requires write access to the repository by providing either:
3043 *
3044 * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation.
3045 * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions.
3046 *
3047 * This input example shows how you can use the `client_payload` as a test to debug your workflow.
3048 */
3049 post: operations["repos/create-dispatch-event"];
3050 };
3051 "/repos/{owner}/{repo}/environments": {
3052 /**
3053 * Get all environments for a repository.
3054 *
3055 * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
3056 */
3057 get: operations["repos/get-all-environments"];
3058 };
3059 "/repos/{owner}/{repo}/environments/{environment_name}": {
3060 /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
3061 get: operations["repos/get-environment"];
3062 /**
3063 * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
3064 *
3065 * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
3066 *
3067 * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
3068 *
3069 * You must authenticate using an access token with the repo scope to use this endpoint.
3070 */
3071 put: operations["repos/create-or-update-environment"];
3072 /** You must authenticate using an access token with the repo scope to use this endpoint. */
3073 delete: operations["repos/delete-an-environment"];
3074 };
3075 "/repos/{owner}/{repo}/events": {
3076 get: operations["activity/list-repo-events"];
3077 };
3078 "/repos/{owner}/{repo}/forks": {
3079 get: operations["repos/list-forks"];
3080 /**
3081 * Create a fork for the authenticated user.
3082 *
3083 * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com).
3084 */
3085 post: operations["repos/create-fork"];
3086 };
3087 "/repos/{owner}/{repo}/git/blobs": {
3088 post: operations["git/create-blob"];
3089 };
3090 "/repos/{owner}/{repo}/git/blobs/{file_sha}": {
3091 /**
3092 * The `content` in the response will always be Base64 encoded.
3093 *
3094 * _Note_: This API supports blobs up to 100 megabytes in size.
3095 */
3096 get: operations["git/get-blob"];
3097 };
3098 "/repos/{owner}/{repo}/git/commits": {
3099 /**
3100 * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
3101 *
3102 * **Signature verification object**
3103 *
3104 * 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:
3105 *
3106 * | Name | Type | Description |
3107 * | ---- | ---- | ----------- |
3108 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
3109 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
3110 * | `signature` | `string` | The signature that was extracted from the commit. |
3111 * | `payload` | `string` | The value that was signed. |
3112 *
3113 * These are the possible values for `reason` in the `verification` object:
3114 *
3115 * | Value | Description |
3116 * | ----- | ----------- |
3117 * | `expired_key` | The key that made the signature is expired. |
3118 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
3119 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
3120 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
3121 * | `unsigned` | The object does not include a signature. |
3122 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
3123 * | `no_user` | No user was associated with the `committer` email address in the commit. |
3124 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
3125 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
3126 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
3127 * | `malformed_signature` | There was an error parsing the signature. |
3128 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
3129 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
3130 */
3131 post: operations["git/create-commit"];
3132 };
3133 "/repos/{owner}/{repo}/git/commits/{commit_sha}": {
3134 /**
3135 * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
3136 *
3137 * **Signature verification object**
3138 *
3139 * 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:
3140 *
3141 * | Name | Type | Description |
3142 * | ---- | ---- | ----------- |
3143 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
3144 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
3145 * | `signature` | `string` | The signature that was extracted from the commit. |
3146 * | `payload` | `string` | The value that was signed. |
3147 *
3148 * These are the possible values for `reason` in the `verification` object:
3149 *
3150 * | Value | Description |
3151 * | ----- | ----------- |
3152 * | `expired_key` | The key that made the signature is expired. |
3153 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
3154 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
3155 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
3156 * | `unsigned` | The object does not include a signature. |
3157 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
3158 * | `no_user` | No user was associated with the `committer` email address in the commit. |
3159 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
3160 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
3161 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
3162 * | `malformed_signature` | There was an error parsing the signature. |
3163 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
3164 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
3165 */
3166 get: operations["git/get-commit"];
3167 };
3168 "/repos/{owner}/{repo}/git/matching-refs/{ref}": {
3169 /**
3170 * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.
3171 *
3172 * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.
3173 *
3174 * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
3175 *
3176 * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.
3177 */
3178 get: operations["git/list-matching-refs"];
3179 };
3180 "/repos/{owner}/{repo}/git/ref/{ref}": {
3181 /**
3182 * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.
3183 *
3184 * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
3185 */
3186 get: operations["git/get-ref"];
3187 };
3188 "/repos/{owner}/{repo}/git/refs": {
3189 /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */
3190 post: operations["git/create-ref"];
3191 };
3192 "/repos/{owner}/{repo}/git/refs/{ref}": {
3193 delete: operations["git/delete-ref"];
3194 patch: operations["git/update-ref"];
3195 };
3196 "/repos/{owner}/{repo}/git/tags": {
3197 /**
3198 * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary.
3199 *
3200 * **Signature verification object**
3201 *
3202 * 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:
3203 *
3204 * | Name | Type | Description |
3205 * | ---- | ---- | ----------- |
3206 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
3207 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
3208 * | `signature` | `string` | The signature that was extracted from the commit. |
3209 * | `payload` | `string` | The value that was signed. |
3210 *
3211 * These are the possible values for `reason` in the `verification` object:
3212 *
3213 * | Value | Description |
3214 * | ----- | ----------- |
3215 * | `expired_key` | The key that made the signature is expired. |
3216 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
3217 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
3218 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
3219 * | `unsigned` | The object does not include a signature. |
3220 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
3221 * | `no_user` | No user was associated with the `committer` email address in the commit. |
3222 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
3223 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
3224 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
3225 * | `malformed_signature` | There was an error parsing the signature. |
3226 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
3227 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
3228 */
3229 post: operations["git/create-tag"];
3230 };
3231 "/repos/{owner}/{repo}/git/tags/{tag_sha}": {
3232 /**
3233 * **Signature verification object**
3234 *
3235 * 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:
3236 *
3237 * | Name | Type | Description |
3238 * | ---- | ---- | ----------- |
3239 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
3240 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
3241 * | `signature` | `string` | The signature that was extracted from the commit. |
3242 * | `payload` | `string` | The value that was signed. |
3243 *
3244 * These are the possible values for `reason` in the `verification` object:
3245 *
3246 * | Value | Description |
3247 * | ----- | ----------- |
3248 * | `expired_key` | The key that made the signature is expired. |
3249 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
3250 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
3251 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
3252 * | `unsigned` | The object does not include a signature. |
3253 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
3254 * | `no_user` | No user was associated with the `committer` email address in the commit. |
3255 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
3256 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
3257 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
3258 * | `malformed_signature` | There was an error parsing the signature. |
3259 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
3260 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
3261 */
3262 get: operations["git/get-tag"];
3263 };
3264 "/repos/{owner}/{repo}/git/trees": {
3265 /**
3266 * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
3267 *
3268 * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)."
3269 */
3270 post: operations["git/create-tree"];
3271 };
3272 "/repos/{owner}/{repo}/git/trees/{tree_sha}": {
3273 /**
3274 * Returns a single tree using the SHA1 value for that tree.
3275 *
3276 * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
3277 */
3278 get: operations["git/get-tree"];
3279 };
3280 "/repos/{owner}/{repo}/hooks": {
3281 get: operations["repos/list-webhooks"];
3282 /**
3283 * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can
3284 * share the same `config` as long as those webhooks do not have any `events` that overlap.
3285 */
3286 post: operations["repos/create-webhook"];
3287 };
3288 "/repos/{owner}/{repo}/hooks/{hook_id}": {
3289 /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */
3290 get: operations["repos/get-webhook"];
3291 delete: operations["repos/delete-webhook"];
3292 /** 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](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */
3293 patch: operations["repos/update-webhook"];
3294 };
3295 "/repos/{owner}/{repo}/hooks/{hook_id}/config": {
3296 /**
3297 * 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](/rest/reference/orgs#get-a-repository-webhook)."
3298 *
3299 * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission.
3300 */
3301 get: operations["repos/get-webhook-config-for-repo"];
3302 /**
3303 * 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](/rest/reference/orgs#update-a-repository-webhook)."
3304 *
3305 * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.
3306 */
3307 patch: operations["repos/update-webhook-config-for-repo"];
3308 };
3309 "/repos/{owner}/{repo}/hooks/{hook_id}/pings": {
3310 /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */
3311 post: operations["repos/ping-webhook"];
3312 };
3313 "/repos/{owner}/{repo}/hooks/{hook_id}/tests": {
3314 /**
3315 * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.
3316 *
3317 * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test`
3318 */
3319 post: operations["repos/test-push-webhook"];
3320 };
3321 "/repos/{owner}/{repo}/import": {
3322 /**
3323 * View the progress of an import.
3324 *
3325 * **Import status**
3326 *
3327 * This section includes details about the possible values of the `status` field of the Import Progress response.
3328 *
3329 * An import that does not have errors will progress through these steps:
3330 *
3331 * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.
3332 * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).
3333 * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.
3334 * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".
3335 * * `complete` - the import is complete, and the repository is ready on GitHub.
3336 *
3337 * If there are problems, you will see one of these in the `status` field:
3338 *
3339 * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
3340 * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information.
3341 * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
3342 * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL.
3343 * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
3344 *
3345 * **The project_choices field**
3346 *
3347 * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.
3348 *
3349 * **Git LFS related fields**
3350 *
3351 * This section includes details about Git LFS related fields that may be present in the Import Progress response.
3352 *
3353 * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.
3354 * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.
3355 * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.
3356 * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request.
3357 */
3358 get: operations["migrations/get-import-status"];
3359 /** Start a source import to a GitHub repository using GitHub Importer. */
3360 put: operations["migrations/start-import"];
3361 /** Stop an import for a repository. */
3362 delete: operations["migrations/cancel-import"];
3363 /**
3364 * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API
3365 * request. If no parameters are provided, the import will be restarted.
3366 */
3367 patch: operations["migrations/update-import"];
3368 };
3369 "/repos/{owner}/{repo}/import/authors": {
3370 /**
3371 * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot <hubot@12341234-abab-fefe-8787-fedcba987654>`.
3372 *
3373 * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information.
3374 */
3375 get: operations["migrations/get-commit-authors"];
3376 };
3377 "/repos/{owner}/{repo}/import/authors/{author_id}": {
3378 /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */
3379 patch: operations["migrations/map-commit-author"];
3380 };
3381 "/repos/{owner}/{repo}/import/large_files": {
3382 /** List files larger than 100MB found during the import */
3383 get: operations["migrations/get-large-files"];
3384 };
3385 "/repos/{owner}/{repo}/import/lfs": {
3386 /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). */
3387 patch: operations["migrations/set-lfs-preference"];
3388 };
3389 "/repos/{owner}/{repo}/installation": {
3390 /**
3391 * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
3392 *
3393 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
3394 */
3395 get: operations["apps/get-repo-installation"];
3396 };
3397 "/repos/{owner}/{repo}/interaction-limits": {
3398 /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */
3399 get: operations["interactions/get-restrictions-for-repo"];
3400 /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */
3401 put: operations["interactions/set-restrictions-for-repo"];
3402 /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */
3403 delete: operations["interactions/remove-restrictions-for-repo"];
3404 };
3405 "/repos/{owner}/{repo}/invitations": {
3406 /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */
3407 get: operations["repos/list-invitations"];
3408 };
3409 "/repos/{owner}/{repo}/invitations/{invitation_id}": {
3410 delete: operations["repos/delete-invitation"];
3411 patch: operations["repos/update-invitation"];
3412 };
3413 "/repos/{owner}/{repo}/issues": {
3414 /**
3415 * List issues in a repository.
3416 *
3417 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
3418 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
3419 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
3420 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
3421 */
3422 get: operations["issues/list-for-repo"];
3423 /**
3424 * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.
3425 *
3426 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details.
3427 */
3428 post: operations["issues/create"];
3429 };
3430 "/repos/{owner}/{repo}/issues/comments": {
3431 /** By default, Issue Comments are ordered by ascending ID. */
3432 get: operations["issues/list-comments-for-repo"];
3433 };
3434 "/repos/{owner}/{repo}/issues/comments/{comment_id}": {
3435 get: operations["issues/get-comment"];
3436 delete: operations["issues/delete-comment"];
3437 patch: operations["issues/update-comment"];
3438 };
3439 "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": {
3440 /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */
3441 get: operations["reactions/list-for-issue-comment"];
3442 /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */
3443 post: operations["reactions/create-for-issue-comment"];
3444 };
3445 "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": {
3446 /**
3447 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.
3448 *
3449 * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments).
3450 */
3451 delete: operations["reactions/delete-for-issue-comment"];
3452 };
3453 "/repos/{owner}/{repo}/issues/events": {
3454 get: operations["issues/list-events-for-repo"];
3455 };
3456 "/repos/{owner}/{repo}/issues/events/{event_id}": {
3457 get: operations["issues/get-event"];
3458 };
3459 "/repos/{owner}/{repo}/issues/{issue_number}": {
3460 /**
3461 * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was
3462 * [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If
3463 * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
3464 * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read
3465 * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe
3466 * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.
3467 *
3468 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
3469 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
3470 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
3471 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
3472 */
3473 get: operations["issues/get"];
3474 /** Issue owners and users with push access can edit an issue. */
3475 patch: operations["issues/update"];
3476 };
3477 "/repos/{owner}/{repo}/issues/{issue_number}/assignees": {
3478 /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */
3479 post: operations["issues/add-assignees"];
3480 /** Removes one or more assignees from an issue. */
3481 delete: operations["issues/remove-assignees"];
3482 };
3483 "/repos/{owner}/{repo}/issues/{issue_number}/comments": {
3484 /** Issue Comments are ordered by ascending ID. */
3485 get: operations["issues/list-comments"];
3486 /** This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
3487 post: operations["issues/create-comment"];
3488 };
3489 "/repos/{owner}/{repo}/issues/{issue_number}/events": {
3490 get: operations["issues/list-events"];
3491 };
3492 "/repos/{owner}/{repo}/issues/{issue_number}/labels": {
3493 get: operations["issues/list-labels-on-issue"];
3494 /** Removes any previous labels and sets the new labels for an issue. */
3495 put: operations["issues/set-labels"];
3496 post: operations["issues/add-labels"];
3497 delete: operations["issues/remove-all-labels"];
3498 };
3499 "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": {
3500 /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */
3501 delete: operations["issues/remove-label"];
3502 };
3503 "/repos/{owner}/{repo}/issues/{issue_number}/lock": {
3504 /**
3505 * Users with push access can lock an issue or pull request's conversation.
3506 *
3507 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
3508 */
3509 put: operations["issues/lock"];
3510 /** Users with push access can unlock an issue's conversation. */
3511 delete: operations["issues/unlock"];
3512 };
3513 "/repos/{owner}/{repo}/issues/{issue_number}/reactions": {
3514 /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */
3515 get: operations["reactions/list-for-issue"];
3516 /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */
3517 post: operations["reactions/create-for-issue"];
3518 };
3519 "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": {
3520 /**
3521 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.
3522 *
3523 * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/).
3524 */
3525 delete: operations["reactions/delete-for-issue"];
3526 };
3527 "/repos/{owner}/{repo}/issues/{issue_number}/timeline": {
3528 get: operations["issues/list-events-for-timeline"];
3529 };
3530 "/repos/{owner}/{repo}/keys": {
3531 get: operations["repos/list-deploy-keys"];
3532 /** You can create a read-only deploy key. */
3533 post: operations["repos/create-deploy-key"];
3534 };
3535 "/repos/{owner}/{repo}/keys/{key_id}": {
3536 get: operations["repos/get-deploy-key"];
3537 /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */
3538 delete: operations["repos/delete-deploy-key"];
3539 };
3540 "/repos/{owner}/{repo}/labels": {
3541 get: operations["issues/list-labels-for-repo"];
3542 post: operations["issues/create-label"];
3543 };
3544 "/repos/{owner}/{repo}/labels/{name}": {
3545 get: operations["issues/get-label"];
3546 delete: operations["issues/delete-label"];
3547 patch: operations["issues/update-label"];
3548 };
3549 "/repos/{owner}/{repo}/languages": {
3550 /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */
3551 get: operations["repos/list-languages"];
3552 };
3553 "/repos/{owner}/{repo}/license": {
3554 /**
3555 * This method returns the contents of the repository's license file, if one is detected.
3556 *
3557 * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.
3558 */
3559 get: operations["licenses/get-for-repo"];
3560 };
3561 "/repos/{owner}/{repo}/merges": {
3562 post: operations["repos/merge"];
3563 };
3564 "/repos/{owner}/{repo}/milestones": {
3565 get: operations["issues/list-milestones"];
3566 post: operations["issues/create-milestone"];
3567 };
3568 "/repos/{owner}/{repo}/milestones/{milestone_number}": {
3569 get: operations["issues/get-milestone"];
3570 delete: operations["issues/delete-milestone"];
3571 patch: operations["issues/update-milestone"];
3572 };
3573 "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": {
3574 get: operations["issues/list-labels-for-milestone"];
3575 };
3576 "/repos/{owner}/{repo}/notifications": {
3577 /** List all notifications for the current user. */
3578 get: operations["activity/list-repo-notifications-for-authenticated-user"];
3579 /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */
3580 put: operations["activity/mark-repo-notifications-as-read"];
3581 };
3582 "/repos/{owner}/{repo}/pages": {
3583 get: operations["repos/get-pages"];
3584 /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */
3585 put: operations["repos/update-information-about-pages-site"];
3586 /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */
3587 post: operations["repos/create-pages-site"];
3588 delete: operations["repos/delete-pages-site"];
3589 };
3590 "/repos/{owner}/{repo}/pages/builds": {
3591 get: operations["repos/list-pages-builds"];
3592 /**
3593 * 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.
3594 *
3595 * 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.
3596 */
3597 post: operations["repos/request-pages-build"];
3598 };
3599 "/repos/{owner}/{repo}/pages/builds/latest": {
3600 get: operations["repos/get-latest-pages-build"];
3601 };
3602 "/repos/{owner}/{repo}/pages/builds/{build_id}": {
3603 get: operations["repos/get-pages-build"];
3604 };
3605 "/repos/{owner}/{repo}/pages/health": {
3606 /**
3607 * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.
3608 *
3609 * 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.
3610 *
3611 * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.
3612 */
3613 get: operations["repos/get-pages-health-check"];
3614 };
3615 "/repos/{owner}/{repo}/projects": {
3616 /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
3617 get: operations["projects/list-for-repo"];
3618 /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
3619 post: operations["projects/create-for-repo"];
3620 };
3621 "/repos/{owner}/{repo}/pulls": {
3622 /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
3623 get: operations["pulls/list"];
3624 /**
3625 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
3626 *
3627 * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
3628 *
3629 * You can create a new pull request.
3630 *
3631 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
3632 */
3633 post: operations["pulls/create"];
3634 };
3635 "/repos/{owner}/{repo}/pulls/comments": {
3636 /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */
3637 get: operations["pulls/list-review-comments-for-repo"];
3638 };
3639 "/repos/{owner}/{repo}/pulls/comments/{comment_id}": {
3640 /** Provides details for a review comment. */
3641 get: operations["pulls/get-review-comment"];
3642 /** Deletes a review comment. */
3643 delete: operations["pulls/delete-review-comment"];
3644 /** Enables you to edit a review comment. */
3645 patch: operations["pulls/update-review-comment"];
3646 };
3647 "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": {
3648 /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */
3649 get: operations["reactions/list-for-pull-request-review-comment"];
3650 /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */
3651 post: operations["reactions/create-for-pull-request-review-comment"];
3652 };
3653 "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": {
3654 /**
3655 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`
3656 *
3657 * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).
3658 */
3659 delete: operations["reactions/delete-for-pull-request-comment"];
3660 };
3661 "/repos/{owner}/{repo}/pulls/{pull_number}": {
3662 /**
3663 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
3664 *
3665 * Lists details of a pull request by providing its number.
3666 *
3667 * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
3668 *
3669 * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.
3670 *
3671 * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:
3672 *
3673 * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.
3674 * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.
3675 * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.
3676 *
3677 * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
3678 */
3679 get: operations["pulls/get"];
3680 /**
3681 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
3682 *
3683 * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
3684 */
3685 patch: operations["pulls/update"];
3686 };
3687 "/repos/{owner}/{repo}/pulls/{pull_number}/comments": {
3688 /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */
3689 get: operations["pulls/list-review-comments"];
3690 /**
3691 * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff.
3692 *
3693 * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices).
3694 *
3695 * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
3696 *
3697 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
3698 */
3699 post: operations["pulls/create-review-comment"];
3700 };
3701 "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": {
3702 /**
3703 * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.
3704 *
3705 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
3706 */
3707 post: operations["pulls/create-reply-for-review-comment"];
3708 };
3709 "/repos/{owner}/{repo}/pulls/{pull_number}/commits": {
3710 /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */
3711 get: operations["pulls/list-commits"];
3712 };
3713 "/repos/{owner}/{repo}/pulls/{pull_number}/files": {
3714 /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */
3715 get: operations["pulls/list-files"];
3716 };
3717 "/repos/{owner}/{repo}/pulls/{pull_number}/merge": {
3718 get: operations["pulls/check-if-merged"];
3719 /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
3720 put: operations["pulls/merge"];
3721 };
3722 "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": {
3723 get: operations["pulls/list-requested-reviewers"];
3724 /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
3725 post: operations["pulls/request-reviewers"];
3726 delete: operations["pulls/remove-requested-reviewers"];
3727 };
3728 "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": {
3729 /** The list of reviews returns in chronological order. */
3730 get: operations["pulls/list-reviews"];
3731 /**
3732 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
3733 *
3734 * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.
3735 *
3736 * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint.
3737 *
3738 * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
3739 */
3740 post: operations["pulls/create-review"];
3741 };
3742 "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": {
3743 get: operations["pulls/get-review"];
3744 /** Update the review summary comment with new text. */
3745 put: operations["pulls/update-review"];
3746 delete: operations["pulls/delete-pending-review"];
3747 };
3748 "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": {
3749 /** List comments for a specific pull request review. */
3750 get: operations["pulls/list-comments-for-review"];
3751 };
3752 "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": {
3753 /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */
3754 put: operations["pulls/dismiss-review"];
3755 };
3756 "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": {
3757 post: operations["pulls/submit-review"];
3758 };
3759 "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": {
3760 /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */
3761 put: operations["pulls/update-branch"];
3762 };
3763 "/repos/{owner}/{repo}/readme": {
3764 /**
3765 * Gets the preferred README for a repository.
3766 *
3767 * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
3768 */
3769 get: operations["repos/get-readme"];
3770 };
3771 "/repos/{owner}/{repo}/readme/{dir}": {
3772 /**
3773 * Gets the README from a repository directory.
3774 *
3775 * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
3776 */
3777 get: operations["repos/get-readme-in-directory"];
3778 };
3779 "/repos/{owner}/{repo}/releases": {
3780 /**
3781 * 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](https://docs.github.com/rest/reference/repos#list-repository-tags).
3782 *
3783 * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
3784 */
3785 get: operations["repos/list-releases"];
3786 /**
3787 * Users with push access to the repository can create a release.
3788 *
3789 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
3790 */
3791 post: operations["repos/create-release"];
3792 };
3793 "/repos/{owner}/{repo}/releases/assets/{asset_id}": {
3794 /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). 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. */
3795 get: operations["repos/get-release-asset"];
3796 delete: operations["repos/delete-release-asset"];
3797 /** Users with push access to the repository can edit a release asset. */
3798 patch: operations["repos/update-release-asset"];
3799 };
3800 "/repos/{owner}/{repo}/releases/latest": {
3801 /**
3802 * View the latest published full release for the repository.
3803 *
3804 * 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.
3805 */
3806 get: operations["repos/get-latest-release"];
3807 };
3808 "/repos/{owner}/{repo}/releases/tags/{tag}": {
3809 /** Get a published release with the specified tag. */
3810 get: operations["repos/get-release-by-tag"];
3811 };
3812 "/repos/{owner}/{repo}/releases/{release_id}": {
3813 /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */
3814 get: operations["repos/get-release"];
3815 /** Users with push access to the repository can delete a release. */
3816 delete: operations["repos/delete-release"];
3817 /** Users with push access to the repository can edit a release. */
3818 patch: operations["repos/update-release"];
3819 };
3820 "/repos/{owner}/{repo}/releases/{release_id}/assets": {
3821 get: operations["repos/list-release-assets"];
3822 /**
3823 * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in
3824 * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset.
3825 *
3826 * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.
3827 *
3828 * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example:
3829 *
3830 * `application/zip`
3831 *
3832 * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,
3833 * you'll still need to pass your authentication to be able to upload an asset.
3834 *
3835 * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.
3836 *
3837 * **Notes:**
3838 * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)"
3839 * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact).
3840 * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.
3841 */
3842 post: operations["repos/upload-release-asset"];
3843 };
3844 "/repos/{owner}/{repo}/releases/{release_id}/reactions": {
3845 /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */
3846 post: operations["reactions/create-for-release"];
3847 };
3848 "/repos/{owner}/{repo}/secret-scanning/alerts": {
3849 /**
3850 * Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
3851 *
3852 * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
3853 */
3854 get: operations["secret-scanning/list-alerts-for-repo"];
3855 };
3856 "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": {
3857 /**
3858 * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
3859 *
3860 * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
3861 */
3862 get: operations["secret-scanning/get-alert"];
3863 /**
3864 * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
3865 *
3866 * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.
3867 */
3868 patch: operations["secret-scanning/update-alert"];
3869 };
3870 "/repos/{owner}/{repo}/stargazers": {
3871 /**
3872 * Lists the people that have starred the repository.
3873 *
3874 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
3875 */
3876 get: operations["activity/list-stargazers-for-repo"];
3877 };
3878 "/repos/{owner}/{repo}/stats/code_frequency": {
3879 /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */
3880 get: operations["repos/get-code-frequency-stats"];
3881 };
3882 "/repos/{owner}/{repo}/stats/commit_activity": {
3883 /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */
3884 get: operations["repos/get-commit-activity-stats"];
3885 };
3886 "/repos/{owner}/{repo}/stats/contributors": {
3887 /**
3888 * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:
3889 *
3890 * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
3891 * * `a` - Number of additions
3892 * * `d` - Number of deletions
3893 * * `c` - Number of commits
3894 */
3895 get: operations["repos/get-contributors-stats"];
3896 };
3897 "/repos/{owner}/{repo}/stats/participation": {
3898 /**
3899 * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.
3900 *
3901 * The array order is oldest week (index 0) to most recent week.
3902 */
3903 get: operations["repos/get-participation-stats"];
3904 };
3905 "/repos/{owner}/{repo}/stats/punch_card": {
3906 /**
3907 * Each array contains the day number, hour number, and number of commits:
3908 *
3909 * * `0-6`: Sunday - Saturday
3910 * * `0-23`: Hour of day
3911 * * Number of commits
3912 *
3913 * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
3914 */
3915 get: operations["repos/get-punch-card-stats"];
3916 };
3917 "/repos/{owner}/{repo}/statuses/{sha}": {
3918 /**
3919 * Users with push access in a repository can create commit statuses for a given SHA.
3920 *
3921 * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.
3922 */
3923 post: operations["repos/create-commit-status"];
3924 };
3925 "/repos/{owner}/{repo}/subscribers": {
3926 /** Lists the people watching the specified repository. */
3927 get: operations["activity/list-watchers-for-repo"];
3928 };
3929 "/repos/{owner}/{repo}/subscription": {
3930 get: operations["activity/get-repo-subscription"];
3931 /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */
3932 put: operations["activity/set-repo-subscription"];
3933 /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */
3934 delete: operations["activity/delete-repo-subscription"];
3935 };
3936 "/repos/{owner}/{repo}/tags": {
3937 get: operations["repos/list-tags"];
3938 };
3939 "/repos/{owner}/{repo}/tarball/{ref}": {
3940 /**
3941 * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually
3942 * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
3943 * the `Location` header to make a second `GET` request.
3944 * **Note**: For private repositories, these links are temporary and expire after five minutes.
3945 */
3946 get: operations["repos/download-tarball-archive"];
3947 };
3948 "/repos/{owner}/{repo}/teams": {
3949 get: operations["repos/list-teams"];
3950 };
3951 "/repos/{owner}/{repo}/topics": {
3952 get: operations["repos/get-all-topics"];
3953 put: operations["repos/replace-all-topics"];
3954 };
3955 "/repos/{owner}/{repo}/traffic/clones": {
3956 /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */
3957 get: operations["repos/get-clones"];
3958 };
3959 "/repos/{owner}/{repo}/traffic/popular/paths": {
3960 /** Get the top 10 popular contents over the last 14 days. */
3961 get: operations["repos/get-top-paths"];
3962 };
3963 "/repos/{owner}/{repo}/traffic/popular/referrers": {
3964 /** Get the top 10 referrers over the last 14 days. */
3965 get: operations["repos/get-top-referrers"];
3966 };
3967 "/repos/{owner}/{repo}/traffic/views": {
3968 /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */
3969 get: operations["repos/get-views"];
3970 };
3971 "/repos/{owner}/{repo}/transfer": {
3972 /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). */
3973 post: operations["repos/transfer"];
3974 };
3975 "/repos/{owner}/{repo}/vulnerability-alerts": {
3976 /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
3977 get: operations["repos/check-vulnerability-alerts"];
3978 /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
3979 put: operations["repos/enable-vulnerability-alerts"];
3980 /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
3981 delete: operations["repos/disable-vulnerability-alerts"];
3982 };
3983 "/repos/{owner}/{repo}/zipball/{ref}": {
3984 /**
3985 * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
3986 * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
3987 * the `Location` header to make a second `GET` request.
3988 * **Note**: For private repositories, these links are temporary and expire after five minutes.
3989 */
3990 get: operations["repos/download-zipball-archive"];
3991 };
3992 "/repos/{template_owner}/{template_repo}/generate": {
3993 /**
3994 * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.
3995 *
3996 * **OAuth scope requirements**
3997 *
3998 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
3999 *
4000 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
4001 * * `repo` scope to create a private repository
4002 */
4003 post: operations["repos/create-using-template"];
4004 };
4005 "/repositories": {
4006 /**
4007 * Lists all public repositories in the order that they were created.
4008 *
4009 * Note:
4010 * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
4011 * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.
4012 */
4013 get: operations["repos/list-public"];
4014 };
4015 "/repositories/{repository_id}/environments/{environment_name}/secrets": {
4016 /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
4017 get: operations["actions/list-environment-secrets"];
4018 };
4019 "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": {
4020 /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
4021 get: operations["actions/get-environment-public-key"];
4022 };
4023 "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": {
4024 /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
4025 get: operations["actions/get-environment-secret"];
4026 /**
4027 * Creates or updates an environment secret with an encrypted value. Encrypt your secret using
4028 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
4029 * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
4030 * this endpoint.
4031 *
4032 * #### Example encrypting a secret using Node.js
4033 *
4034 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
4035 *
4036 * ```
4037 * const sodium = require('tweetsodium');
4038 *
4039 * const key = "base64-encoded-public-key";
4040 * const value = "plain-text-secret";
4041 *
4042 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
4043 * const messageBytes = Buffer.from(value);
4044 * const keyBytes = Buffer.from(key, 'base64');
4045 *
4046 * // Encrypt using LibSodium.
4047 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
4048 *
4049 * // Base64 the encrypted secret
4050 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
4051 *
4052 * console.log(encrypted);
4053 * ```
4054 *
4055 *
4056 * #### Example encrypting a secret using Python
4057 *
4058 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
4059 *
4060 * ```
4061 * from base64 import b64encode
4062 * from nacl import encoding, public
4063 *
4064 * def encrypt(public_key: str, secret_value: str) -> str:
4065 * """Encrypt a Unicode string using the public key."""
4066 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
4067 * sealed_box = public.SealedBox(public_key)
4068 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
4069 * return b64encode(encrypted).decode("utf-8")
4070 * ```
4071 *
4072 * #### Example encrypting a secret using C#
4073 *
4074 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
4075 *
4076 * ```
4077 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
4078 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
4079 *
4080 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
4081 *
4082 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
4083 * ```
4084 *
4085 * #### Example encrypting a secret using Ruby
4086 *
4087 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
4088 *
4089 * ```ruby
4090 * require "rbnacl"
4091 * require "base64"
4092 *
4093 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
4094 * public_key = RbNaCl::PublicKey.new(key)
4095 *
4096 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
4097 * encrypted_secret = box.encrypt("my_secret")
4098 *
4099 * # Print the base64 encoded secret
4100 * puts Base64.strict_encode64(encrypted_secret)
4101 * ```
4102 */
4103 put: operations["actions/create-or-update-environment-secret"];
4104 /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
4105 delete: operations["actions/delete-environment-secret"];
4106 };
4107 "/scim/v2/enterprises/{enterprise}/Groups": {
4108 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
4109 get: operations["enterprise-admin/list-provisioned-groups-enterprise"];
4110 /**
4111 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4112 *
4113 * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.
4114 */
4115 post: operations["enterprise-admin/provision-and-invite-enterprise-group"];
4116 };
4117 "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": {
4118 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
4119 get: operations["enterprise-admin/get-provisioning-information-for-enterprise-group"];
4120 /**
4121 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4122 *
4123 * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead.
4124 */
4125 put: operations["enterprise-admin/set-information-for-provisioned-enterprise-group"];
4126 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
4127 delete: operations["enterprise-admin/delete-scim-group-from-enterprise"];
4128 /**
4129 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4130 *
4131 * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
4132 */
4133 patch: operations["enterprise-admin/update-attribute-for-enterprise-group"];
4134 };
4135 "/scim/v2/enterprises/{enterprise}/Users": {
4136 /**
4137 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4138 *
4139 * Retrieves a paginated list of all provisioned enterprise members, including pending invitations.
4140 *
4141 * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
4142 * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.
4143 * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
4144 * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
4145 *
4146 * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
4147 *
4148 * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise.
4149 *
4150 * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
4151 *
4152 * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
4153 * - If the user signs in, their GitHub account is linked to this entry.
4154 * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place.
4155 */
4156 get: operations["enterprise-admin/list-provisioned-identities-enterprise"];
4157 /**
4158 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4159 *
4160 * Provision enterprise membership for a user, and send organization invitation emails to the email address.
4161 *
4162 * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent.
4163 */
4164 post: operations["enterprise-admin/provision-and-invite-enterprise-user"];
4165 };
4166 "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": {
4167 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
4168 get: operations["enterprise-admin/get-provisioning-information-for-enterprise-user"];
4169 /**
4170 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4171 *
4172 * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead.
4173 *
4174 * You must at least provide the required values for the user: `userName`, `name`, and `emails`.
4175 *
4176 * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`.
4177 */
4178 put: operations["enterprise-admin/set-information-for-provisioned-enterprise-user"];
4179 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
4180 delete: operations["enterprise-admin/delete-user-from-enterprise"];
4181 /**
4182 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
4183 *
4184 * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
4185 *
4186 * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
4187 *
4188 * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`.
4189 *
4190 * ```
4191 * {
4192 * "Operations":[{
4193 * "op":"replace",
4194 * "value":{
4195 * "active":false
4196 * }
4197 * }]
4198 * }
4199 * ```
4200 */
4201 patch: operations["enterprise-admin/update-attribute-for-enterprise-user"];
4202 };
4203 "/scim/v2/organizations/{org}/Users": {
4204 /**
4205 * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.
4206 *
4207 * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
4208 * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future.
4209 * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
4210 * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
4211 *
4212 * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
4213 *
4214 * 1. The user is granted access by the IdP and is not a member of the GitHub organization.
4215 *
4216 * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
4217 *
4218 * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
4219 * - If the user signs in, their GitHub account is linked to this entry.
4220 * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place.
4221 */
4222 get: operations["scim/list-provisioned-identities"];
4223 /** Provision organization membership for a user, and send an activation email to the email address. */
4224 post: operations["scim/provision-and-invite-user"];
4225 };
4226 "/scim/v2/organizations/{org}/Users/{scim_user_id}": {
4227 get: operations["scim/get-provisioning-information-for-user"];
4228 /**
4229 * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead.
4230 *
4231 * You must at least provide the required values for the user: `userName`, `name`, and `emails`.
4232 *
4233 * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`.
4234 */
4235 put: operations["scim/set-information-for-provisioned-user"];
4236 delete: operations["scim/delete-user-from-org"];
4237 /**
4238 * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
4239 *
4240 * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
4241 *
4242 * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.
4243 *
4244 * ```
4245 * {
4246 * "Operations":[{
4247 * "op":"replace",
4248 * "value":{
4249 * "active":false
4250 * }
4251 * }]
4252 * }
4253 * ```
4254 */
4255 patch: operations["scim/update-attribute-for-user"];
4256 };
4257 "/search/code": {
4258 /**
4259 * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4260 *
4261 * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4262 *
4263 * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:
4264 *
4265 * `q=addClass+in:file+language:js+repo:jquery/jquery`
4266 *
4267 * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.
4268 *
4269 * #### Considerations for code search
4270 *
4271 * Due to the complexity of searching code, there are a few restrictions on how searches are performed:
4272 *
4273 * * Only the _default branch_ is considered. In most cases, this will be the `master` branch.
4274 * * Only files smaller than 384 KB are searchable.
4275 * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing
4276 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.
4277 */
4278 get: operations["search/code"];
4279 };
4280 "/search/commits": {
4281 /**
4282 * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4283 *
4284 * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match
4285 * metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4286 *
4287 * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:
4288 *
4289 * `q=repo:octocat/Spoon-Knife+css`
4290 */
4291 get: operations["search/commits"];
4292 };
4293 "/search/issues": {
4294 /**
4295 * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4296 *
4297 * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
4298 * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4299 *
4300 * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
4301 *
4302 * `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
4303 *
4304 * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
4305 *
4306 * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
4307 */
4308 get: operations["search/issues-and-pull-requests"];
4309 };
4310 "/search/labels": {
4311 /**
4312 * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4313 *
4314 * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4315 *
4316 * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:
4317 *
4318 * `q=bug+defect+enhancement&repository_id=64778136`
4319 *
4320 * The labels that best match the query appear first in the search results.
4321 */
4322 get: operations["search/labels"];
4323 };
4324 "/search/repositories": {
4325 /**
4326 * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4327 *
4328 * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4329 *
4330 * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
4331 *
4332 * `q=tetris+language:assembly&sort=stars&order=desc`
4333 *
4334 * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
4335 *
4336 * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this:
4337 *
4338 * `q=topic:ruby+topic:rails`
4339 */
4340 get: operations["search/repos"];
4341 };
4342 "/search/topics": {
4343 /**
4344 * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers.
4345 *
4346 * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4347 *
4348 * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
4349 *
4350 * `q=ruby+is:featured`
4351 *
4352 * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
4353 */
4354 get: operations["search/topics"];
4355 };
4356 "/search/users": {
4357 /**
4358 * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
4359 *
4360 * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
4361 *
4362 * For example, if you're looking for a list of popular users, you might try this query:
4363 *
4364 * `q=tom+repos:%3E42+followers:%3E1000`
4365 *
4366 * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.
4367 */
4368 get: operations["search/users"];
4369 };
4370 "/teams/{team_id}": {
4371 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */
4372 get: operations["teams/get-legacy"];
4373 /**
4374 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint.
4375 *
4376 * To delete a team, the authenticated user must be an organization owner or team maintainer.
4377 *
4378 * If you are an organization owner, deleting a parent team will delete all of its child teams as well.
4379 */
4380 delete: operations["teams/delete-legacy"];
4381 /**
4382 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint.
4383 *
4384 * To edit a team, the authenticated user must either be an organization owner or a team maintainer.
4385 *
4386 * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.
4387 */
4388 patch: operations["teams/update-legacy"];
4389 };
4390 "/teams/{team_id}/discussions": {
4391 /**
4392 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint.
4393 *
4394 * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4395 */
4396 get: operations["teams/list-discussions-legacy"];
4397 /**
4398 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint.
4399 *
4400 * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4401 *
4402 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
4403 */
4404 post: operations["teams/create-discussion-legacy"];
4405 };
4406 "/teams/{team_id}/discussions/{discussion_number}": {
4407 /**
4408 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint.
4409 *
4410 * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4411 */
4412 get: operations["teams/get-discussion-legacy"];
4413 /**
4414 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint.
4415 *
4416 * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4417 */
4418 delete: operations["teams/delete-discussion-legacy"];
4419 /**
4420 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint.
4421 *
4422 * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4423 */
4424 patch: operations["teams/update-discussion-legacy"];
4425 };
4426 "/teams/{team_id}/discussions/{discussion_number}/comments": {
4427 /**
4428 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint.
4429 *
4430 * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4431 */
4432 get: operations["teams/list-discussion-comments-legacy"];
4433 /**
4434 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint.
4435 *
4436 * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4437 *
4438 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
4439 */
4440 post: operations["teams/create-discussion-comment-legacy"];
4441 };
4442 "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": {
4443 /**
4444 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint.
4445 *
4446 * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4447 */
4448 get: operations["teams/get-discussion-comment-legacy"];
4449 /**
4450 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint.
4451 *
4452 * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4453 */
4454 delete: operations["teams/delete-discussion-comment-legacy"];
4455 /**
4456 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint.
4457 *
4458 * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4459 */
4460 patch: operations["teams/update-discussion-comment-legacy"];
4461 };
4462 "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": {
4463 /**
4464 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint.
4465 *
4466 * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4467 */
4468 get: operations["reactions/list-for-team-discussion-comment-legacy"];
4469 /**
4470 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.
4471 *
4472 * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
4473 */
4474 post: operations["reactions/create-for-team-discussion-comment-legacy"];
4475 };
4476 "/teams/{team_id}/discussions/{discussion_number}/reactions": {
4477 /**
4478 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint.
4479 *
4480 * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
4481 */
4482 get: operations["reactions/list-for-team-discussion-legacy"];
4483 /**
4484 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint.
4485 *
4486 * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
4487 */
4488 post: operations["reactions/create-for-team-discussion-legacy"];
4489 };
4490 "/teams/{team_id}/invitations": {
4491 /**
4492 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint.
4493 *
4494 * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
4495 */
4496 get: operations["teams/list-pending-invitations-legacy"];
4497 };
4498 "/teams/{team_id}/members": {
4499 /**
4500 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint.
4501 *
4502 * Team members will include the members of child teams.
4503 */
4504 get: operations["teams/list-members-legacy"];
4505 };
4506 "/teams/{team_id}/members/{username}": {
4507 /**
4508 * The "Get team member" endpoint (described below) is deprecated.
4509 *
4510 * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.
4511 *
4512 * To list members in a team, the team must be visible to the authenticated user.
4513 */
4514 get: operations["teams/get-member-legacy"];
4515 /**
4516 * The "Add team member" endpoint (described below) is deprecated.
4517 *
4518 * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.
4519 *
4520 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4521 *
4522 * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
4523 *
4524 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
4525 *
4526 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
4527 */
4528 put: operations["teams/add-member-legacy"];
4529 /**
4530 * The "Remove team member" endpoint (described below) is deprecated.
4531 *
4532 * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.
4533 *
4534 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4535 *
4536 * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
4537 *
4538 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
4539 */
4540 delete: operations["teams/remove-member-legacy"];
4541 };
4542 "/teams/{team_id}/memberships/{username}": {
4543 /**
4544 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint.
4545 *
4546 * Team members will include the members of child teams.
4547 *
4548 * To get a user's membership with a team, the team must be visible to the authenticated user.
4549 *
4550 * **Note:**
4551 * The response contains the `state` of the membership and the member's `role`.
4552 *
4553 * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
4554 */
4555 get: operations["teams/get-membership-for-user-legacy"];
4556 /**
4557 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint.
4558 *
4559 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4560 *
4561 * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
4562 *
4563 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
4564 *
4565 * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
4566 *
4567 * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
4568 */
4569 put: operations["teams/add-or-update-membership-for-user-legacy"];
4570 /**
4571 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint.
4572 *
4573 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4574 *
4575 * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
4576 *
4577 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
4578 */
4579 delete: operations["teams/remove-membership-for-user-legacy"];
4580 };
4581 "/teams/{team_id}/projects": {
4582 /**
4583 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint.
4584 *
4585 * Lists the organization projects for a team.
4586 */
4587 get: operations["teams/list-projects-legacy"];
4588 };
4589 "/teams/{team_id}/projects/{project_id}": {
4590 /**
4591 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint.
4592 *
4593 * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
4594 */
4595 get: operations["teams/check-permissions-for-project-legacy"];
4596 /**
4597 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint.
4598 *
4599 * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
4600 */
4601 put: operations["teams/add-or-update-project-permissions-legacy"];
4602 /**
4603 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint.
4604 *
4605 * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it.
4606 */
4607 delete: operations["teams/remove-project-legacy"];
4608 };
4609 "/teams/{team_id}/repos": {
4610 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */
4611 get: operations["teams/list-repos-legacy"];
4612 };
4613 "/teams/{team_id}/repos/{owner}/{repo}": {
4614 /**
4615 * **Note**: Repositories inherited through a parent team will also be checked.
4616 *
4617 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint.
4618 *
4619 * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
4620 */
4621 get: operations["teams/check-permissions-for-repo-legacy"];
4622 /**
4623 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint.
4624 *
4625 * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.
4626 *
4627 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
4628 */
4629 put: operations["teams/add-or-update-repo-permissions-legacy"];
4630 /**
4631 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint.
4632 *
4633 * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
4634 */
4635 delete: operations["teams/remove-repo-legacy"];
4636 };
4637 "/teams/{team_id}/team-sync/group-mappings": {
4638 /**
4639 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint.
4640 *
4641 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4642 *
4643 * List IdP groups connected to a team on GitHub.
4644 */
4645 get: operations["teams/list-idp-groups-for-legacy"];
4646 /**
4647 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint.
4648 *
4649 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
4650 *
4651 * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
4652 */
4653 patch: operations["teams/create-or-update-idp-group-connections-legacy"];
4654 };
4655 "/teams/{team_id}/teams": {
4656 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */
4657 get: operations["teams/list-child-legacy"];
4658 };
4659 "/user": {
4660 /**
4661 * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information.
4662 *
4663 * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.
4664 */
4665 get: operations["users/get-authenticated"];
4666 /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */
4667 patch: operations["users/update-authenticated"];
4668 };
4669 "/user/blocks": {
4670 /** List the users you've blocked on your personal account. */
4671 get: operations["users/list-blocked-by-authenticated"];
4672 };
4673 "/user/blocks/{username}": {
4674 get: operations["users/check-blocked"];
4675 put: operations["users/block"];
4676 delete: operations["users/unblock"];
4677 };
4678 "/user/email/visibility": {
4679 /** Sets the visibility for your primary email addresses. */
4680 patch: operations["users/set-primary-email-visibility-for-authenticated"];
4681 };
4682 "/user/emails": {
4683 /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */
4684 get: operations["users/list-emails-for-authenticated"];
4685 /** This endpoint is accessible with the `user` scope. */
4686 post: operations["users/add-email-for-authenticated"];
4687 /** This endpoint is accessible with the `user` scope. */
4688 delete: operations["users/delete-email-for-authenticated"];
4689 };
4690 "/user/followers": {
4691 /** Lists the people following the authenticated user. */
4692 get: operations["users/list-followers-for-authenticated-user"];
4693 };
4694 "/user/following": {
4695 /** Lists the people who the authenticated user follows. */
4696 get: operations["users/list-followed-by-authenticated"];
4697 };
4698 "/user/following/{username}": {
4699 get: operations["users/check-person-is-followed-by-authenticated"];
4700 /**
4701 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
4702 *
4703 * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
4704 */
4705 put: operations["users/follow"];
4706 /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */
4707 delete: operations["users/unfollow"];
4708 };
4709 "/user/gpg_keys": {
4710 /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4711 get: operations["users/list-gpg-keys-for-authenticated"];
4712 /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4713 post: operations["users/create-gpg-key-for-authenticated"];
4714 };
4715 "/user/gpg_keys/{gpg_key_id}": {
4716 /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4717 get: operations["users/get-gpg-key-for-authenticated"];
4718 /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4719 delete: operations["users/delete-gpg-key-for-authenticated"];
4720 };
4721 "/user/installations": {
4722 /**
4723 * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
4724 *
4725 * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
4726 *
4727 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
4728 *
4729 * You can find the permissions for the installation under the `permissions` key.
4730 */
4731 get: operations["apps/list-installations-for-authenticated-user"];
4732 };
4733 "/user/installations/{installation_id}/repositories": {
4734 /**
4735 * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.
4736 *
4737 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
4738 *
4739 * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
4740 *
4741 * The access the user has to each repository is included in the hash under the `permissions` key.
4742 */
4743 get: operations["apps/list-installation-repos-for-authenticated-user"];
4744 };
4745 "/user/installations/{installation_id}/repositories/{repository_id}": {
4746 /**
4747 * Add a single repository to an installation. The authenticated user must have admin access to the repository.
4748 *
4749 * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
4750 */
4751 put: operations["apps/add-repo-to-installation"];
4752 /**
4753 * Remove a single repository from an installation. The authenticated user must have admin access to the repository.
4754 *
4755 * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
4756 */
4757 delete: operations["apps/remove-repo-from-installation"];
4758 };
4759 "/user/interaction-limits": {
4760 /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */
4761 get: operations["interactions/get-restrictions-for-authenticated-user"];
4762 /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */
4763 put: operations["interactions/set-restrictions-for-authenticated-user"];
4764 /** Removes any interaction restrictions from your public repositories. */
4765 delete: operations["interactions/remove-restrictions-for-authenticated-user"];
4766 };
4767 "/user/issues": {
4768 /**
4769 * List issues across owned and member repositories assigned to the authenticated user.
4770 *
4771 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
4772 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
4773 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
4774 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
4775 */
4776 get: operations["issues/list-for-authenticated-user"];
4777 };
4778 "/user/keys": {
4779 /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4780 get: operations["users/list-public-ssh-keys-for-authenticated"];
4781 /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4782 post: operations["users/create-public-ssh-key-for-authenticated"];
4783 };
4784 "/user/keys/{key_id}": {
4785 /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4786 get: operations["users/get-public-ssh-key-for-authenticated"];
4787 /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
4788 delete: operations["users/delete-public-ssh-key-for-authenticated"];
4789 };
4790 "/user/marketplace_purchases": {
4791 /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */
4792 get: operations["apps/list-subscriptions-for-authenticated-user"];
4793 };
4794 "/user/marketplace_purchases/stubbed": {
4795 /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */
4796 get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"];
4797 };
4798 "/user/memberships/orgs": {
4799 get: operations["orgs/list-memberships-for-authenticated-user"];
4800 };
4801 "/user/memberships/orgs/{org}": {
4802 get: operations["orgs/get-membership-for-authenticated-user"];
4803 patch: operations["orgs/update-membership-for-authenticated-user"];
4804 };
4805 "/user/migrations": {
4806 /** Lists all migrations a user has started. */
4807 get: operations["migrations/list-for-authenticated-user"];
4808 /** Initiates the generation of a user migration archive. */
4809 post: operations["migrations/start-for-authenticated-user"];
4810 };
4811 "/user/migrations/{migration_id}": {
4812 /**
4813 * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:
4814 *
4815 * * `pending` - the migration hasn't started yet.
4816 * * `exporting` - the migration is in progress.
4817 * * `exported` - the migration finished successfully.
4818 * * `failed` - the migration failed.
4819 *
4820 * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive).
4821 */
4822 get: operations["migrations/get-status-for-authenticated-user"];
4823 };
4824 "/user/migrations/{migration_id}/archive": {
4825 /**
4826 * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:
4827 *
4828 * * attachments
4829 * * bases
4830 * * commit\_comments
4831 * * issue\_comments
4832 * * issue\_events
4833 * * issues
4834 * * milestones
4835 * * organizations
4836 * * projects
4837 * * protected\_branches
4838 * * pull\_request\_reviews
4839 * * pull\_requests
4840 * * releases
4841 * * repositories
4842 * * review\_comments
4843 * * schema
4844 * * users
4845 *
4846 * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.
4847 */
4848 get: operations["migrations/get-archive-for-authenticated-user"];
4849 /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */
4850 delete: operations["migrations/delete-archive-for-authenticated-user"];
4851 };
4852 "/user/migrations/{migration_id}/repos/{repo_name}/lock": {
4853 /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */
4854 delete: operations["migrations/unlock-repo-for-authenticated-user"];
4855 };
4856 "/user/migrations/{migration_id}/repositories": {
4857 /** Lists all the repositories for this user migration. */
4858 get: operations["migrations/list-repos-for-user"];
4859 };
4860 "/user/orgs": {
4861 /**
4862 * List organizations for the authenticated user.
4863 *
4864 * **OAuth scope requirements**
4865 *
4866 * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response.
4867 */
4868 get: operations["orgs/list-for-authenticated-user"];
4869 };
4870 "/user/packages/{package_type}/{package_name}": {
4871 /**
4872 * Gets a specific package for a package owned by the authenticated user.
4873 *
4874 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
4875 * If `package_type` is not `container`, your token must also include the `repo` scope.
4876 */
4877 get: operations["packages/get-package-for-authenticated-user"];
4878 /**
4879 * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
4880 *
4881 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope.
4882 * If `package_type` is not `container`, your token must also include the `repo` scope.
4883 */
4884 delete: operations["packages/delete-package-for-authenticated-user"];
4885 };
4886 "/user/packages/{package_type}/{package_name}/restore": {
4887 /**
4888 * Restores a package owned by the authenticated user.
4889 *
4890 * You can restore a deleted package under the following conditions:
4891 * - The package was deleted within the last 30 days.
4892 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
4893 *
4894 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.
4895 */
4896 post: operations["packages/restore-package-for-authenticated-user"];
4897 };
4898 "/user/packages/{package_type}/{package_name}/versions": {
4899 /**
4900 * Returns all package versions for a package owned by the authenticated user.
4901 *
4902 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
4903 * If `package_type` is not `container`, your token must also include the `repo` scope.
4904 */
4905 get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"];
4906 };
4907 "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": {
4908 /**
4909 * Gets a specific package version for a package owned by the authenticated user.
4910 *
4911 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
4912 * If `package_type` is not `container`, your token must also include the `repo` scope.
4913 */
4914 get: operations["packages/get-package-version-for-authenticated-user"];
4915 /**
4916 * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
4917 *
4918 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope.
4919 * If `package_type` is not `container`, your token must also include the `repo` scope.
4920 */
4921 delete: operations["packages/delete-package-version-for-authenticated-user"];
4922 };
4923 "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": {
4924 /**
4925 * Restores a package version owned by the authenticated user.
4926 *
4927 * You can restore a deleted package version under the following conditions:
4928 * - The package was deleted within the last 30 days.
4929 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
4930 *
4931 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.
4932 */
4933 post: operations["packages/restore-package-version-for-authenticated-user"];
4934 };
4935 "/user/projects": {
4936 post: operations["projects/create-for-authenticated-user"];
4937 };
4938 "/user/public_emails": {
4939 /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */
4940 get: operations["users/list-public-emails-for-authenticated"];
4941 };
4942 "/user/repos": {
4943 /**
4944 * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
4945 *
4946 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
4947 */
4948 get: operations["repos/list-for-authenticated-user"];
4949 /**
4950 * Creates a new repository for the authenticated user.
4951 *
4952 * **OAuth scope requirements**
4953 *
4954 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
4955 *
4956 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
4957 * * `repo` scope to create a private repository.
4958 */
4959 post: operations["repos/create-for-authenticated-user"];
4960 };
4961 "/user/repository_invitations": {
4962 /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */
4963 get: operations["repos/list-invitations-for-authenticated-user"];
4964 };
4965 "/user/repository_invitations/{invitation_id}": {
4966 delete: operations["repos/decline-invitation"];
4967 patch: operations["repos/accept-invitation"];
4968 };
4969 "/user/starred": {
4970 /**
4971 * Lists repositories the authenticated user has starred.
4972 *
4973 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
4974 */
4975 get: operations["activity/list-repos-starred-by-authenticated-user"];
4976 };
4977 "/user/starred/{owner}/{repo}": {
4978 get: operations["activity/check-repo-is-starred-by-authenticated-user"];
4979 /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */
4980 put: operations["activity/star-repo-for-authenticated-user"];
4981 delete: operations["activity/unstar-repo-for-authenticated-user"];
4982 };
4983 "/user/subscriptions": {
4984 /** Lists repositories the authenticated user is watching. */
4985 get: operations["activity/list-watched-repos-for-authenticated-user"];
4986 };
4987 "/user/teams": {
4988 /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */
4989 get: operations["teams/list-for-authenticated-user"];
4990 };
4991 "/users": {
4992 /**
4993 * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
4994 *
4995 * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users.
4996 */
4997 get: operations["users/list"];
4998 };
4999 "/users/{username}": {
5000 /**
5001 * Provides publicly available information about someone with a GitHub account.
5002 *
5003 * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below"
5004 *
5005 * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication).
5006 *
5007 * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)".
5008 */
5009 get: operations["users/get-by-username"];
5010 };
5011 "/users/{username}/events": {
5012 /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */
5013 get: operations["activity/list-events-for-authenticated-user"];
5014 };
5015 "/users/{username}/events/orgs/{org}": {
5016 /** This is the user's organization dashboard. You must be authenticated as the user to view this. */
5017 get: operations["activity/list-org-events-for-authenticated-user"];
5018 };
5019 "/users/{username}/events/public": {
5020 get: operations["activity/list-public-events-for-user"];
5021 };
5022 "/users/{username}/followers": {
5023 /** Lists the people following the specified user. */
5024 get: operations["users/list-followers-for-user"];
5025 };
5026 "/users/{username}/following": {
5027 /** Lists the people who the specified user follows. */
5028 get: operations["users/list-following-for-user"];
5029 };
5030 "/users/{username}/following/{target_user}": {
5031 get: operations["users/check-following-for-user"];
5032 };
5033 "/users/{username}/gists": {
5034 /** Lists public gists for the specified user: */
5035 get: operations["gists/list-for-user"];
5036 };
5037 "/users/{username}/gpg_keys": {
5038 /** Lists the GPG keys for a user. This information is accessible by anyone. */
5039 get: operations["users/list-gpg-keys-for-user"];
5040 };
5041 "/users/{username}/hovercard": {
5042 /**
5043 * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
5044 *
5045 * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this:
5046 *
5047 * ```shell
5048 * curl -u username:token
5049 * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
5050 * ```
5051 */
5052 get: operations["users/get-context-for-user"];
5053 };
5054 "/users/{username}/installation": {
5055 /**
5056 * Enables an authenticated GitHub App to find the user’s installation information.
5057 *
5058 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
5059 */
5060 get: operations["apps/get-user-installation"];
5061 };
5062 "/users/{username}/keys": {
5063 /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */
5064 get: operations["users/list-public-keys-for-user"];
5065 };
5066 "/users/{username}/orgs": {
5067 /**
5068 * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.
5069 *
5070 * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead.
5071 */
5072 get: operations["orgs/list-for-user"];
5073 };
5074 "/users/{username}/packages/{package_type}/{package_name}": {
5075 /**
5076 * Gets a specific package metadata for a public package owned by a user.
5077 *
5078 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
5079 * If `package_type` is not `container`, your token must also include the `repo` scope.
5080 */
5081 get: operations["packages/get-package-for-user"];
5082 };
5083 "/users/{username}/packages/{package_type}/{package_name}/versions": {
5084 /**
5085 * Returns all package versions for a public package owned by a specified user.
5086 *
5087 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
5088 * If `package_type` is not `container`, your token must also include the `repo` scope.
5089 */
5090 get: operations["packages/get-all-package-versions-for-package-owned-by-user"];
5091 };
5092 "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": {
5093 /**
5094 * Gets a specific package version for a public package owned by a specified user.
5095 *
5096 * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope.
5097 * If `package_type` is not `container`, your token must also include the `repo` scope.
5098 */
5099 get: operations["packages/get-package-version-for-user"];
5100 };
5101 "/users/{username}/projects": {
5102 get: operations["projects/list-for-user"];
5103 };
5104 "/users/{username}/received_events": {
5105 /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */
5106 get: operations["activity/list-received-events-for-user"];
5107 };
5108 "/users/{username}/received_events/public": {
5109 get: operations["activity/list-received-public-events-for-user"];
5110 };
5111 "/users/{username}/repos": {
5112 /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */
5113 get: operations["repos/list-for-user"];
5114 };
5115 "/users/{username}/settings/billing/actions": {
5116 /**
5117 * Gets the summary of the free and paid GitHub Actions minutes used.
5118 *
5119 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
5120 *
5121 * Access tokens must have the `user` scope.
5122 */
5123 get: operations["billing/get-github-actions-billing-user"];
5124 };
5125 "/users/{username}/settings/billing/packages": {
5126 /**
5127 * Gets the free and paid storage used for GitHub Packages in gigabytes.
5128 *
5129 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
5130 *
5131 * Access tokens must have the `user` scope.
5132 */
5133 get: operations["billing/get-github-packages-billing-user"];
5134 };
5135 "/users/{username}/settings/billing/shared-storage": {
5136 /**
5137 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
5138 *
5139 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
5140 *
5141 * Access tokens must have the `user` scope.
5142 */
5143 get: operations["billing/get-shared-storage-billing-user"];
5144 };
5145 "/users/{username}/starred": {
5146 /**
5147 * Lists repositories a user has starred.
5148 *
5149 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
5150 */
5151 get: operations["activity/list-repos-starred-by-user"];
5152 };
5153 "/users/{username}/subscriptions": {
5154 /** Lists repositories a user is watching. */
5155 get: operations["activity/list-repos-watched-by-user"];
5156 };
5157 "/zen": {
5158 /** Get a random sentence from the Zen of GitHub */
5159 get: operations["meta/get-zen"];
5160 };
5161 "/repos/{owner}/{repo}/compare/{base}...{head}": {
5162 /**
5163 * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `<USERNAME>:branch`.
5164 *
5165 * 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](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
5166 *
5167 * 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.
5168 *
5169 * **Working with large comparisons**
5170 *
5171 * 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](/rest/guides/traversing-with-pagination)."
5172 *
5173 * 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.
5174 *
5175 * **Signature verification object**
5176 *
5177 * 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:
5178 *
5179 * | Name | Type | Description |
5180 * | ---- | ---- | ----------- |
5181 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
5182 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
5183 * | `signature` | `string` | The signature that was extracted from the commit. |
5184 * | `payload` | `string` | The value that was signed. |
5185 *
5186 * These are the possible values for `reason` in the `verification` object:
5187 *
5188 * | Value | Description |
5189 * | ----- | ----------- |
5190 * | `expired_key` | The key that made the signature is expired. |
5191 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
5192 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
5193 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
5194 * | `unsigned` | The object does not include a signature. |
5195 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
5196 * | `no_user` | No user was associated with the `committer` email address in the commit. |
5197 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
5198 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
5199 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
5200 * | `malformed_signature` | There was an error parsing the signature. |
5201 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
5202 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
5203 */
5204 get: operations["repos/compare-commits"];
5205 };
5206 "/content_references/{content_reference_id}/attachments": {
5207 /**
5208 * **Deprecated:** use `apps.createContentAttachmentForRepo()` (`POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments`) instead. Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.
5209 *
5210 * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments.
5211 *
5212 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
5213 */
5214 post: operations["apps/create-content-attachment"];
5215 };
5216}
5217
5218export interface components {
5219 schemas: {
5220 /** Simple User */
5221 "simple-user": {
5222 name?: string | null;
5223 email?: string | null;
5224 login: string;
5225 id: number;
5226 node_id: string;
5227 avatar_url: string;
5228 gravatar_id: string | null;
5229 url: string;
5230 html_url: string;
5231 followers_url: string;
5232 following_url: string;
5233 gists_url: string;
5234 starred_url: string;
5235 subscriptions_url: string;
5236 organizations_url: string;
5237 repos_url: string;
5238 events_url: string;
5239 received_events_url: string;
5240 type: string;
5241 site_admin: boolean;
5242 starred_at?: string;
5243 } | null;
5244 /** GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. */
5245 integration: {
5246 /** Unique identifier of the GitHub app */
5247 id: number;
5248 /** The slug name of the GitHub app */
5249 slug?: string;
5250 node_id: string;
5251 owner: components["schemas"]["simple-user"] | null;
5252 /** The name of the GitHub app */
5253 name: string;
5254 description: string | null;
5255 external_url: string;
5256 html_url: string;
5257 created_at: string;
5258 updated_at: string;
5259 /** The set of permissions for the GitHub app */
5260 permissions: {
5261 issues?: string;
5262 checks?: string;
5263 metadata?: string;
5264 contents?: string;
5265 deployments?: string;
5266 } & { [key: string]: string };
5267 /** The list of events for the GitHub app */
5268 events: string[];
5269 /** The number of installations associated with the GitHub app */
5270 installations_count?: number;
5271 client_id?: string;
5272 client_secret?: string;
5273 webhook_secret?: string | null;
5274 pem?: string;
5275 } | null;
5276 /** Basic Error */
5277 "basic-error": {
5278 message?: string;
5279 documentation_url?: string;
5280 url?: string;
5281 status?: string;
5282 };
5283 /** Validation Error Simple */
5284 "validation-error-simple": {
5285 message: string;
5286 documentation_url: string;
5287 errors?: string[];
5288 };
5289 /** The URL to which the payloads will be delivered. */
5290 "webhook-config-url": string;
5291 /** The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */
5292 "webhook-config-content-type": string;
5293 /** If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). */
5294 "webhook-config-secret": string;
5295 "webhook-config-insecure-ssl": string | number;
5296 /** Configuration object of the webhook */
5297 "webhook-config": {
5298 url?: components["schemas"]["webhook-config-url"];
5299 content_type?: components["schemas"]["webhook-config-content-type"];
5300 secret?: components["schemas"]["webhook-config-secret"];
5301 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
5302 };
5303 /** An enterprise account */
5304 enterprise: {
5305 /** A short description of the enterprise. */
5306 description?: string | null;
5307 html_url: string;
5308 /** The enterprise's website URL. */
5309 website_url?: string | null;
5310 /** Unique identifier of the enterprise */
5311 id: number;
5312 node_id: string;
5313 /** The name of the enterprise. */
5314 name: string;
5315 /** The slug url identifier for the enterprise. */
5316 slug: string;
5317 created_at: string | null;
5318 updated_at: string | null;
5319 avatar_url: string;
5320 };
5321 /** The permissions granted to the user-to-server access token. */
5322 "app-permissions": {
5323 /** The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. */
5324 actions?: "read" | "write";
5325 /** The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. */
5326 administration?: "read" | "write";
5327 /** The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. */
5328 checks?: "read" | "write";
5329 /** The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`. */
5330 content_references?: "read" | "write";
5331 /** The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. */
5332 contents?: "read" | "write";
5333 /** The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. */
5334 deployments?: "read" | "write";
5335 /** The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. */
5336 environments?: "read" | "write";
5337 /** The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. */
5338 issues?: "read" | "write";
5339 /** The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. */
5340 metadata?: "read" | "write";
5341 /** The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. */
5342 packages?: "read" | "write";
5343 /** The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. */
5344 pages?: "read" | "write";
5345 /** The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. */
5346 pull_requests?: "read" | "write";
5347 /** The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. */
5348 repository_hooks?: "read" | "write";
5349 /** The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */
5350 repository_projects?: "read" | "write" | "admin";
5351 /** The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. */
5352 secret_scanning_alerts?: "read" | "write";
5353 /** The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. */
5354 secrets?: "read" | "write";
5355 /** The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. */
5356 security_events?: "read" | "write";
5357 /** The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. */
5358 single_file?: "read" | "write";
5359 /** The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. */
5360 statuses?: "read" | "write";
5361 /** The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: `read`. */
5362 vulnerability_alerts?: "read";
5363 /** The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. */
5364 workflows?: "write";
5365 /** The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. */
5366 members?: "read" | "write";
5367 /** The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. */
5368 organization_administration?: "read" | "write";
5369 /** The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. */
5370 organization_hooks?: "read" | "write";
5371 /** The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. */
5372 organization_plan?: "read";
5373 /** The level of permission to grant the access token to manage organization projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */
5374 organization_projects?: "read" | "write" | "admin";
5375 /** The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. */
5376 organization_packages?: "read" | "write";
5377 /** The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. */
5378 organization_secrets?: "read" | "write";
5379 /** The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. */
5380 organization_self_hosted_runners?: "read" | "write";
5381 /** The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. */
5382 organization_user_blocking?: "read" | "write";
5383 /** The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. */
5384 team_discussions?: "read" | "write";
5385 };
5386 /** Installation */
5387 installation: {
5388 /** The ID of the installation. */
5389 id: number;
5390 account:
5391 | (Partial<components["schemas"]["simple-user"]> &
5392 Partial<components["schemas"]["enterprise"]>)
5393 | null;
5394 /** Describe whether all repositories have been selected or there's a selection involved */
5395 repository_selection: "all" | "selected";
5396 access_tokens_url: string;
5397 repositories_url: string;
5398 html_url: string;
5399 app_id: number;
5400 /** The ID of the user or organization this token is being scoped to. */
5401 target_id: number;
5402 target_type: string;
5403 permissions: components["schemas"]["app-permissions"];
5404 events: string[];
5405 created_at: string;
5406 updated_at: string;
5407 single_file_name: string | null;
5408 has_multiple_single_files?: boolean;
5409 single_file_paths?: string[];
5410 app_slug: string;
5411 suspended_by: components["schemas"]["simple-user"] | null;
5412 suspended_at: string | null;
5413 contact_email?: string | null;
5414 };
5415 /** License Simple */
5416 "license-simple": {
5417 key: string;
5418 name: string;
5419 url: string | null;
5420 spdx_id: string | null;
5421 node_id: string;
5422 html_url?: string;
5423 };
5424 /** A git repository */
5425 repository: {
5426 /** Unique identifier of the repository */
5427 id: number;
5428 node_id: string;
5429 /** The name of the repository. */
5430 name: string;
5431 full_name: string;
5432 license: components["schemas"]["license-simple"] | null;
5433 organization?: components["schemas"]["simple-user"] | null;
5434 forks: number;
5435 permissions?: {
5436 admin: boolean;
5437 pull: boolean;
5438 triage?: boolean;
5439 push: boolean;
5440 maintain?: boolean;
5441 };
5442 owner: components["schemas"]["simple-user"] | null;
5443 /** Whether the repository is private or public. */
5444 private: boolean;
5445 html_url: string;
5446 description: string | null;
5447 fork: boolean;
5448 url: string;
5449 archive_url: string;
5450 assignees_url: string;
5451 blobs_url: string;
5452 branches_url: string;
5453 collaborators_url: string;
5454 comments_url: string;
5455 commits_url: string;
5456 compare_url: string;
5457 contents_url: string;
5458 contributors_url: string;
5459 deployments_url: string;
5460 downloads_url: string;
5461 events_url: string;
5462 forks_url: string;
5463 git_commits_url: string;
5464 git_refs_url: string;
5465 git_tags_url: string;
5466 git_url: string;
5467 issue_comment_url: string;
5468 issue_events_url: string;
5469 issues_url: string;
5470 keys_url: string;
5471 labels_url: string;
5472 languages_url: string;
5473 merges_url: string;
5474 milestones_url: string;
5475 notifications_url: string;
5476 pulls_url: string;
5477 releases_url: string;
5478 ssh_url: string;
5479 stargazers_url: string;
5480 statuses_url: string;
5481 subscribers_url: string;
5482 subscription_url: string;
5483 tags_url: string;
5484 teams_url: string;
5485 trees_url: string;
5486 clone_url: string;
5487 mirror_url: string | null;
5488 hooks_url: string;
5489 svn_url: string;
5490 homepage: string | null;
5491 language: string | null;
5492 forks_count: number;
5493 stargazers_count: number;
5494 watchers_count: number;
5495 size: number;
5496 /** The default branch of the repository. */
5497 default_branch: string;
5498 open_issues_count: number;
5499 /** Whether this repository acts as a template that can be used to generate new repositories. */
5500 is_template?: boolean;
5501 topics?: string[];
5502 /** Whether issues are enabled. */
5503 has_issues: boolean;
5504 /** Whether projects are enabled. */
5505 has_projects: boolean;
5506 /** Whether the wiki is enabled. */
5507 has_wiki: boolean;
5508 has_pages: boolean;
5509 /** Whether downloads are enabled. */
5510 has_downloads: boolean;
5511 /** Whether the repository is archived. */
5512 archived: boolean;
5513 /** Returns whether or not this repository disabled. */
5514 disabled: boolean;
5515 /** The repository visibility: public, private, or internal. */
5516 visibility?: string;
5517 pushed_at: string | null;
5518 created_at: string | null;
5519 updated_at: string | null;
5520 /** Whether to allow rebase merges for pull requests. */
5521 allow_rebase_merge?: boolean;
5522 template_repository?: {
5523 id?: number;
5524 node_id?: string;
5525 name?: string;
5526 full_name?: string;
5527 owner?: {
5528 login?: string;
5529 id?: number;
5530 node_id?: string;
5531 avatar_url?: string;
5532 gravatar_id?: string;
5533 url?: string;
5534 html_url?: string;
5535 followers_url?: string;
5536 following_url?: string;
5537 gists_url?: string;
5538 starred_url?: string;
5539 subscriptions_url?: string;
5540 organizations_url?: string;
5541 repos_url?: string;
5542 events_url?: string;
5543 received_events_url?: string;
5544 type?: string;
5545 site_admin?: boolean;
5546 };
5547 private?: boolean;
5548 html_url?: string;
5549 description?: string;
5550 fork?: boolean;
5551 url?: string;
5552 archive_url?: string;
5553 assignees_url?: string;
5554 blobs_url?: string;
5555 branches_url?: string;
5556 collaborators_url?: string;
5557 comments_url?: string;
5558 commits_url?: string;
5559 compare_url?: string;
5560 contents_url?: string;
5561 contributors_url?: string;
5562 deployments_url?: string;
5563 downloads_url?: string;
5564 events_url?: string;
5565 forks_url?: string;
5566 git_commits_url?: string;
5567 git_refs_url?: string;
5568 git_tags_url?: string;
5569 git_url?: string;
5570 issue_comment_url?: string;
5571 issue_events_url?: string;
5572 issues_url?: string;
5573 keys_url?: string;
5574 labels_url?: string;
5575 languages_url?: string;
5576 merges_url?: string;
5577 milestones_url?: string;
5578 notifications_url?: string;
5579 pulls_url?: string;
5580 releases_url?: string;
5581 ssh_url?: string;
5582 stargazers_url?: string;
5583 statuses_url?: string;
5584 subscribers_url?: string;
5585 subscription_url?: string;
5586 tags_url?: string;
5587 teams_url?: string;
5588 trees_url?: string;
5589 clone_url?: string;
5590 mirror_url?: string;
5591 hooks_url?: string;
5592 svn_url?: string;
5593 homepage?: string;
5594 language?: string;
5595 forks_count?: number;
5596 stargazers_count?: number;
5597 watchers_count?: number;
5598 size?: number;
5599 default_branch?: string;
5600 open_issues_count?: number;
5601 is_template?: boolean;
5602 topics?: string[];
5603 has_issues?: boolean;
5604 has_projects?: boolean;
5605 has_wiki?: boolean;
5606 has_pages?: boolean;
5607 has_downloads?: boolean;
5608 archived?: boolean;
5609 disabled?: boolean;
5610 visibility?: string;
5611 pushed_at?: string;
5612 created_at?: string;
5613 updated_at?: string;
5614 permissions?: {
5615 admin?: boolean;
5616 push?: boolean;
5617 pull?: boolean;
5618 };
5619 allow_rebase_merge?: boolean;
5620 temp_clone_token?: string;
5621 allow_squash_merge?: boolean;
5622 delete_branch_on_merge?: boolean;
5623 allow_merge_commit?: boolean;
5624 subscribers_count?: number;
5625 network_count?: number;
5626 } | null;
5627 temp_clone_token?: string;
5628 /** Whether to allow squash merges for pull requests. */
5629 allow_squash_merge?: boolean;
5630 /** Whether to delete head branches when pull requests are merged */
5631 delete_branch_on_merge?: boolean;
5632 /** Whether to allow merge commits for pull requests. */
5633 allow_merge_commit?: boolean;
5634 subscribers_count?: number;
5635 network_count?: number;
5636 open_issues: number;
5637 watchers: number;
5638 master_branch?: string;
5639 starred_at?: string;
5640 };
5641 /** Authentication token for a GitHub App installed on a user or org. */
5642 "installation-token": {
5643 token: string;
5644 expires_at: string;
5645 permissions?: components["schemas"]["app-permissions"];
5646 repository_selection?: "all" | "selected";
5647 repositories?: components["schemas"]["repository"][];
5648 single_file?: string;
5649 has_multiple_single_files?: boolean;
5650 single_file_paths?: string[];
5651 };
5652 /** Validation Error */
5653 "validation-error": {
5654 message: string;
5655 documentation_url: string;
5656 errors?: {
5657 resource?: string;
5658 field?: string;
5659 message?: string;
5660 code: string;
5661 index?: number;
5662 value?: (string | null) | (number | null) | (string[] | null);
5663 }[];
5664 };
5665 /** The authorization associated with an OAuth Access. */
5666 "application-grant": {
5667 id: number;
5668 url: string;
5669 app: {
5670 client_id: string;
5671 name: string;
5672 url: string;
5673 };
5674 created_at: string;
5675 updated_at: string;
5676 scopes: string[];
5677 user?: components["schemas"]["simple-user"] | null;
5678 };
5679 "scoped-installation": {
5680 permissions: components["schemas"]["app-permissions"];
5681 /** Describe whether all repositories have been selected or there's a selection involved */
5682 repository_selection: "all" | "selected";
5683 single_file_name: string | null;
5684 has_multiple_single_files?: boolean;
5685 single_file_paths?: string[];
5686 repositories_url: string;
5687 account: components["schemas"]["simple-user"];
5688 };
5689 /** The authorization for an OAuth app, GitHub App, or a Personal Access Token. */
5690 authorization: {
5691 id: number;
5692 url: string;
5693 /** A list of scopes that this authorization is in. */
5694 scopes: string[] | null;
5695 token: string;
5696 token_last_eight: string | null;
5697 hashed_token: string | null;
5698 app: {
5699 client_id: string;
5700 name: string;
5701 url: string;
5702 };
5703 note: string | null;
5704 note_url: string | null;
5705 updated_at: string;
5706 created_at: string;
5707 fingerprint: string | null;
5708 user?: components["schemas"]["simple-user"] | null;
5709 installation?: components["schemas"]["scoped-installation"] | null;
5710 };
5711 /** Code Of Conduct */
5712 "code-of-conduct": {
5713 key: string;
5714 name: string;
5715 url: string;
5716 body?: string;
5717 html_url: string | null;
5718 };
5719 /** The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */
5720 "enabled-organizations": "all" | "none" | "selected";
5721 /** The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. */
5722 "allowed-actions": "all" | "local_only" | "selected";
5723 /** The API URL to use to get or set the actions that are allowed to run, when `allowed_actions` is set to `selected`. */
5724 "selected-actions-url": string;
5725 "actions-enterprise-permissions": {
5726 enabled_organizations: components["schemas"]["enabled-organizations"];
5727 /** The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */
5728 selected_organizations_url?: string;
5729 allowed_actions: components["schemas"]["allowed-actions"];
5730 selected_actions_url?: components["schemas"]["selected-actions-url"];
5731 };
5732 /** Organization Simple */
5733 "organization-simple": {
5734 login: string;
5735 id: number;
5736 node_id: string;
5737 url: string;
5738 repos_url: string;
5739 events_url: string;
5740 hooks_url: string;
5741 issues_url: string;
5742 members_url: string;
5743 public_members_url: string;
5744 avatar_url: string;
5745 description: string | null;
5746 };
5747 "selected-actions": {
5748 /** Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */
5749 github_owned_allowed?: boolean;
5750 /** Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */
5751 verified_allowed?: boolean;
5752 /** Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */
5753 patterns_allowed?: string[];
5754 };
5755 "runner-groups-enterprise": {
5756 id: number;
5757 name: string;
5758 visibility: string;
5759 default: boolean;
5760 selected_organizations_url?: string;
5761 runners_url: string;
5762 allows_public_repositories: boolean;
5763 };
5764 /** A self hosted runner */
5765 runner: {
5766 /** The id of the runner. */
5767 id: number;
5768 /** The name of the runner. */
5769 name: string;
5770 /** The Operating System of the runner. */
5771 os: string;
5772 /** The status of the runner. */
5773 status: string;
5774 busy: boolean;
5775 labels: {
5776 /** Unique identifier of the label. */
5777 id?: number;
5778 /** Name of the label. */
5779 name?: string;
5780 /** The type of label. Read-only labels are applied automatically when the runner is configured. */
5781 type?: "read-only" | "custom";
5782 }[];
5783 };
5784 /** Runner Application */
5785 "runner-application": {
5786 os: string;
5787 architecture: string;
5788 download_url: string;
5789 filename: string;
5790 /** A short lived bearer token used to download the runner, if needed. */
5791 temp_download_token?: string;
5792 sha256_checksum?: string;
5793 };
5794 /** Authentication Token */
5795 "authentication-token": {
5796 /** The token used for authentication */
5797 token: string;
5798 /** The time this token expires */
5799 expires_at: string;
5800 permissions?: { [key: string]: any };
5801 /** The repositories this token has access to */
5802 repositories?: components["schemas"]["repository"][];
5803 single_file?: string | null;
5804 /** Describe whether all repositories have been selected or there's a selection involved */
5805 repository_selection?: "all" | "selected";
5806 };
5807 "audit-log-event": {
5808 /** The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */
5809 "@timestamp"?: number;
5810 /** The name of the action that was performed, for example `user.login` or `repo.create`. */
5811 action?: string;
5812 active?: boolean;
5813 active_was?: boolean;
5814 /** The actor who performed the action. */
5815 actor?: string;
5816 /** The id of the actor who performed the action. */
5817 actor_id?: number;
5818 actor_location?: {
5819 country_name?: string;
5820 };
5821 data?: { [key: string]: any };
5822 org_id?: number;
5823 /** The username of the account being blocked. */
5824 blocked_user?: string;
5825 business?: string;
5826 config?: any[];
5827 config_was?: any[];
5828 content_type?: string;
5829 /** The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */
5830 created_at?: number;
5831 deploy_key_fingerprint?: string;
5832 /** A unique identifier for an audit event. */
5833 _document_id?: string;
5834 emoji?: string;
5835 events?: any[];
5836 events_were?: any[];
5837 explanation?: string;
5838 fingerprint?: string;
5839 hook_id?: number;
5840 limited_availability?: boolean;
5841 message?: string;
5842 name?: string;
5843 old_user?: string;
5844 openssh_public_key?: string;
5845 org?: string;
5846 previous_visibility?: string;
5847 read_only?: boolean;
5848 /** The name of the repository. */
5849 repo?: string;
5850 /** The name of the repository. */
5851 repository?: string;
5852 repository_public?: boolean;
5853 target_login?: string;
5854 team?: string;
5855 /** The type of protocol (for example, HTTP or SSH) used to transfer Git data. */
5856 transport_protocol?: number;
5857 /** A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */
5858 transport_protocol_name?: string;
5859 /** The user that was affected by the action performed (if available). */
5860 user?: string;
5861 /** The repository visibility, for example `public` or `private`. */
5862 visibility?: string;
5863 };
5864 "actions-billing-usage": {
5865 /** The sum of the free and paid GitHub Actions minutes used. */
5866 total_minutes_used: number;
5867 /** The total paid GitHub Actions minutes used. */
5868 total_paid_minutes_used: number;
5869 /** The amount of free GitHub Actions minutes available. */
5870 included_minutes: number;
5871 minutes_used_breakdown: {
5872 /** Total minutes used on Ubuntu runner machines. */
5873 UBUNTU?: number;
5874 /** Total minutes used on macOS runner machines. */
5875 MACOS?: number;
5876 /** Total minutes used on Windows runner machines. */
5877 WINDOWS?: number;
5878 };
5879 };
5880 "packages-billing-usage": {
5881 /** Sum of the free and paid storage space (GB) for GitHuub Packages. */
5882 total_gigabytes_bandwidth_used: number;
5883 /** Total paid storage space (GB) for GitHuub Packages. */
5884 total_paid_gigabytes_bandwidth_used: number;
5885 /** Free storage space (GB) for GitHub Packages. */
5886 included_gigabytes_bandwidth: number;
5887 };
5888 "combined-billing-usage": {
5889 /** Numbers of days left in billing cycle. */
5890 days_left_in_billing_cycle: number;
5891 /** Estimated storage space (GB) used in billing cycle. */
5892 estimated_paid_storage_for_month: number;
5893 /** Estimated sum of free and paid storage space (GB) used in billing cycle. */
5894 estimated_storage_for_month: number;
5895 };
5896 /** Actor */
5897 actor: {
5898 id: number;
5899 login: string;
5900 display_login?: string;
5901 gravatar_id: string | null;
5902 url: string;
5903 avatar_url: string;
5904 };
5905 /** Color-coded labels help you categorize and filter your issues (just like labels in Gmail). */
5906 label: {
5907 id: number;
5908 node_id: string;
5909 /** URL for the label */
5910 url: string;
5911 /** The name of the label. */
5912 name: string;
5913 description: string | null;
5914 /** 6-character hex code, without the leading #, identifying the color */
5915 color: string;
5916 default: boolean;
5917 };
5918 /** A collection of related issues and pull requests. */
5919 milestone: {
5920 url: string;
5921 html_url: string;
5922 labels_url: string;
5923 id: number;
5924 node_id: string;
5925 /** The number of the milestone. */
5926 number: number;
5927 /** The state of the milestone. */
5928 state: "open" | "closed";
5929 /** The title of the milestone. */
5930 title: string;
5931 description: string | null;
5932 creator: components["schemas"]["simple-user"] | null;
5933 open_issues: number;
5934 closed_issues: number;
5935 created_at: string;
5936 updated_at: string;
5937 closed_at: string | null;
5938 due_on: string | null;
5939 };
5940 /** How the author is associated with the repository. */
5941 author_association:
5942 | "COLLABORATOR"
5943 | "CONTRIBUTOR"
5944 | "FIRST_TIMER"
5945 | "FIRST_TIME_CONTRIBUTOR"
5946 | "MANNEQUIN"
5947 | "MEMBER"
5948 | "NONE"
5949 | "OWNER";
5950 /** Issue Simple */
5951 "issue-simple": {
5952 id: number;
5953 node_id: string;
5954 url: string;
5955 repository_url: string;
5956 labels_url: string;
5957 comments_url: string;
5958 events_url: string;
5959 html_url: string;
5960 number: number;
5961 state: string;
5962 title: string;
5963 body?: string;
5964 user: components["schemas"]["simple-user"] | null;
5965 labels: components["schemas"]["label"][];
5966 assignee: components["schemas"]["simple-user"] | null;
5967 assignees?: components["schemas"]["simple-user"][] | null;
5968 milestone: components["schemas"]["milestone"] | null;
5969 locked: boolean;
5970 active_lock_reason?: string | null;
5971 comments: number;
5972 pull_request?: {
5973 merged_at?: string | null;
5974 diff_url: string | null;
5975 html_url: string | null;
5976 patch_url: string | null;
5977 url: string | null;
5978 };
5979 closed_at: string | null;
5980 created_at: string;
5981 updated_at: string;
5982 author_association: components["schemas"]["author_association"];
5983 body_html?: string;
5984 body_text?: string;
5985 timeline_url?: string;
5986 repository?: components["schemas"]["repository"];
5987 performed_via_github_app?: components["schemas"]["integration"] | null;
5988 };
5989 "reaction-rollup": {
5990 url: string;
5991 total_count: number;
5992 "+1": number;
5993 "-1": number;
5994 laugh: number;
5995 confused: number;
5996 heart: number;
5997 hooray: number;
5998 eyes: number;
5999 rocket: number;
6000 };
6001 /** Comments provide a way for people to collaborate on an issue. */
6002 "issue-comment": {
6003 /** Unique identifier of the issue comment */
6004 id: number;
6005 node_id: string;
6006 /** URL for the issue comment */
6007 url: string;
6008 /** Contents of the issue comment */
6009 body?: string;
6010 body_text?: string;
6011 body_html?: string;
6012 html_url: string;
6013 user: components["schemas"]["simple-user"] | null;
6014 created_at: string;
6015 updated_at: string;
6016 issue_url: string;
6017 author_association: components["schemas"]["author_association"];
6018 performed_via_github_app?: components["schemas"]["integration"] | null;
6019 reactions?: components["schemas"]["reaction-rollup"];
6020 };
6021 /** Event */
6022 event: {
6023 id: string;
6024 type: string | null;
6025 actor: components["schemas"]["actor"];
6026 repo: {
6027 id: number;
6028 name: string;
6029 url: string;
6030 };
6031 org?: components["schemas"]["actor"];
6032 payload: {
6033 action?: string;
6034 issue?: components["schemas"]["issue-simple"];
6035 comment?: components["schemas"]["issue-comment"];
6036 pages?: {
6037 page_name?: string;
6038 title?: string;
6039 summary?: string | null;
6040 action?: string;
6041 sha?: string;
6042 html_url?: string;
6043 }[];
6044 };
6045 public: boolean;
6046 created_at: string | null;
6047 };
6048 /** Hypermedia Link with Type */
6049 "link-with-type": {
6050 href: string;
6051 type: string;
6052 };
6053 /** Feed */
6054 feed: {
6055 timeline_url: string;
6056 user_url: string;
6057 current_user_public_url?: string;
6058 current_user_url?: string;
6059 current_user_actor_url?: string;
6060 current_user_organization_url?: string;
6061 current_user_organization_urls?: string[];
6062 security_advisories_url?: string;
6063 _links: {
6064 timeline: components["schemas"]["link-with-type"];
6065 user: components["schemas"]["link-with-type"];
6066 security_advisories?: components["schemas"]["link-with-type"];
6067 current_user?: components["schemas"]["link-with-type"];
6068 current_user_public?: components["schemas"]["link-with-type"];
6069 current_user_actor?: components["schemas"]["link-with-type"];
6070 current_user_organization?: components["schemas"]["link-with-type"];
6071 current_user_organizations?: components["schemas"]["link-with-type"][];
6072 };
6073 };
6074 /** Base Gist */
6075 "base-gist": {
6076 url: string;
6077 forks_url: string;
6078 commits_url: string;
6079 id: string;
6080 node_id: string;
6081 git_pull_url: string;
6082 git_push_url: string;
6083 html_url: string;
6084 files: {
6085 [key: string]: {
6086 filename?: string;
6087 type?: string;
6088 language?: string;
6089 raw_url?: string;
6090 size?: number;
6091 };
6092 };
6093 public: boolean;
6094 created_at: string;
6095 updated_at: string;
6096 description: string | null;
6097 comments: number;
6098 user: components["schemas"]["simple-user"] | null;
6099 comments_url: string;
6100 owner?: components["schemas"]["simple-user"] | null;
6101 truncated?: boolean;
6102 forks?: { [key: string]: any }[];
6103 history?: { [key: string]: any }[];
6104 };
6105 /** Public User */
6106 "public-user": {
6107 login: string;
6108 id: number;
6109 node_id: string;
6110 avatar_url: string;
6111 gravatar_id: string | null;
6112 url: string;
6113 html_url: string;
6114 followers_url: string;
6115 following_url: string;
6116 gists_url: string;
6117 starred_url: string;
6118 subscriptions_url: string;
6119 organizations_url: string;
6120 repos_url: string;
6121 events_url: string;
6122 received_events_url: string;
6123 type: string;
6124 site_admin: boolean;
6125 name: string | null;
6126 company: string | null;
6127 blog: string | null;
6128 location: string | null;
6129 email: string | null;
6130 hireable: boolean | null;
6131 bio: string | null;
6132 twitter_username?: string | null;
6133 public_repos: number;
6134 public_gists: number;
6135 followers: number;
6136 following: number;
6137 created_at: string;
6138 updated_at: string;
6139 plan?: {
6140 collaborators: number;
6141 name: string;
6142 space: number;
6143 private_repos: number;
6144 };
6145 suspended_at?: string | null;
6146 private_gists?: number;
6147 total_private_repos?: number;
6148 owned_private_repos?: number;
6149 disk_usage?: number;
6150 collaborators?: number;
6151 };
6152 /** Gist History */
6153 "gist-history": {
6154 user?: components["schemas"]["simple-user"];
6155 version?: string;
6156 committed_at?: string;
6157 change_status?: {
6158 total?: number;
6159 additions?: number;
6160 deletions?: number;
6161 };
6162 url?: string;
6163 };
6164 /** Gist Simple */
6165 "gist-simple": {
6166 forks?:
6167 | {
6168 id?: string;
6169 url?: string;
6170 user?: components["schemas"]["public-user"];
6171 created_at?: string;
6172 updated_at?: string;
6173 }[]
6174 | null;
6175 history?: components["schemas"]["gist-history"][] | null;
6176 /** Gist */
6177 fork_of?: {
6178 url: string;
6179 forks_url: string;
6180 commits_url: string;
6181 id: string;
6182 node_id: string;
6183 git_pull_url: string;
6184 git_push_url: string;
6185 html_url: string;
6186 files: {
6187 [key: string]: {
6188 filename?: string;
6189 type?: string;
6190 language?: string;
6191 raw_url?: string;
6192 size?: number;
6193 };
6194 };
6195 public: boolean;
6196 created_at: string;
6197 updated_at: string;
6198 description: string | null;
6199 comments: number;
6200 user: components["schemas"]["simple-user"] | null;
6201 comments_url: string;
6202 owner?: components["schemas"]["simple-user"] | null;
6203 truncated?: boolean;
6204 forks?: { [key: string]: any }[];
6205 history?: { [key: string]: any }[];
6206 } | null;
6207 url?: string;
6208 forks_url?: string;
6209 commits_url?: string;
6210 id?: string;
6211 node_id?: string;
6212 git_pull_url?: string;
6213 git_push_url?: string;
6214 html_url?: string;
6215 files?: {
6216 [key: string]: {
6217 filename?: string;
6218 type?: string;
6219 language?: string;
6220 raw_url?: string;
6221 size?: number;
6222 truncated?: boolean;
6223 content?: string;
6224 } | null;
6225 };
6226 public?: boolean;
6227 created_at?: string;
6228 updated_at?: string;
6229 description?: string | null;
6230 comments?: number;
6231 user?: string | null;
6232 comments_url?: string;
6233 owner?: components["schemas"]["simple-user"];
6234 truncated?: boolean;
6235 };
6236 /** A comment made to a gist. */
6237 "gist-comment": {
6238 id: number;
6239 node_id: string;
6240 url: string;
6241 /** The comment text. */
6242 body: string;
6243 user: components["schemas"]["simple-user"] | null;
6244 created_at: string;
6245 updated_at: string;
6246 author_association: components["schemas"]["author_association"];
6247 };
6248 /** Gist Commit */
6249 "gist-commit": {
6250 url: string;
6251 version: string;
6252 user: components["schemas"]["simple-user"] | null;
6253 change_status: {
6254 total?: number;
6255 additions?: number;
6256 deletions?: number;
6257 };
6258 committed_at: string;
6259 };
6260 /** Gitignore Template */
6261 "gitignore-template": {
6262 name: string;
6263 source: string;
6264 };
6265 /** Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. */
6266 issue: {
6267 id: number;
6268 node_id: string;
6269 /** URL for the issue */
6270 url: string;
6271 repository_url: string;
6272 labels_url: string;
6273 comments_url: string;
6274 events_url: string;
6275 html_url: string;
6276 /** Number uniquely identifying the issue within its repository */
6277 number: number;
6278 /** State of the issue; either 'open' or 'closed' */
6279 state: string;
6280 /** Title of the issue */
6281 title: string;
6282 /** Contents of the issue */
6283 body?: string | null;
6284 user: components["schemas"]["simple-user"] | null;
6285 /** Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository */
6286 labels: (
6287 | string
6288 | {
6289 id?: number;
6290 node_id?: string;
6291 url?: string;
6292 name?: string;
6293 description?: string | null;
6294 color?: string | null;
6295 default?: boolean;
6296 }
6297 )[];
6298 assignee: components["schemas"]["simple-user"] | null;
6299 assignees?: components["schemas"]["simple-user"][] | null;
6300 milestone: components["schemas"]["milestone"] | null;
6301 locked: boolean;
6302 active_lock_reason?: string | null;
6303 comments: number;
6304 pull_request?: {
6305 merged_at?: string | null;
6306 diff_url: string | null;
6307 html_url: string | null;
6308 patch_url: string | null;
6309 url: string | null;
6310 };
6311 closed_at: string | null;
6312 created_at: string;
6313 updated_at: string;
6314 closed_by?: components["schemas"]["simple-user"] | null;
6315 body_html?: string;
6316 body_text?: string;
6317 timeline_url?: string;
6318 repository?: components["schemas"]["repository"];
6319 performed_via_github_app?: components["schemas"]["integration"] | null;
6320 author_association: components["schemas"]["author_association"];
6321 reactions?: components["schemas"]["reaction-rollup"];
6322 };
6323 /** License */
6324 license: {
6325 key: string;
6326 name: string;
6327 spdx_id: string | null;
6328 url: string | null;
6329 node_id: string;
6330 html_url: string;
6331 description: string;
6332 implementation: string;
6333 permissions: string[];
6334 conditions: string[];
6335 limitations: string[];
6336 body: string;
6337 featured: boolean;
6338 };
6339 /** Marketplace Listing Plan */
6340 "marketplace-listing-plan": {
6341 url: string;
6342 accounts_url: string;
6343 id: number;
6344 number: number;
6345 name: string;
6346 description: string;
6347 monthly_price_in_cents: number;
6348 yearly_price_in_cents: number;
6349 price_model: string;
6350 has_free_trial: boolean;
6351 unit_name: string | null;
6352 state: string;
6353 bullets: string[];
6354 };
6355 /** Marketplace Purchase */
6356 "marketplace-purchase": {
6357 url: string;
6358 type: string;
6359 id: number;
6360 login: string;
6361 organization_billing_email?: string;
6362 email?: string | null;
6363 marketplace_pending_change?: {
6364 is_installed?: boolean;
6365 effective_date?: string;
6366 unit_count?: number | null;
6367 id?: number;
6368 plan?: components["schemas"]["marketplace-listing-plan"];
6369 } | null;
6370 marketplace_purchase: {
6371 billing_cycle?: string;
6372 next_billing_date?: string | null;
6373 is_installed?: boolean;
6374 unit_count?: number | null;
6375 on_free_trial?: boolean;
6376 free_trial_ends_on?: string | null;
6377 updated_at?: string;
6378 plan?: components["schemas"]["marketplace-listing-plan"];
6379 };
6380 };
6381 /** Api Overview */
6382 "api-overview": {
6383 verifiable_password_authentication: boolean;
6384 ssh_key_fingerprints?: {
6385 SHA256_RSA?: string;
6386 SHA256_DSA?: string;
6387 };
6388 hooks?: string[];
6389 web?: string[];
6390 api?: string[];
6391 git?: string[];
6392 packages?: string[];
6393 pages?: string[];
6394 importer?: string[];
6395 actions?: string[];
6396 dependabot?: string[];
6397 };
6398 /** Minimal Repository */
6399 "minimal-repository": {
6400 id: number;
6401 node_id: string;
6402 name: string;
6403 full_name: string;
6404 owner: components["schemas"]["simple-user"] | null;
6405 private: boolean;
6406 html_url: string;
6407 description: string | null;
6408 fork: boolean;
6409 url: string;
6410 archive_url: string;
6411 assignees_url: string;
6412 blobs_url: string;
6413 branches_url: string;
6414 collaborators_url: string;
6415 comments_url: string;
6416 commits_url: string;
6417 compare_url: string;
6418 contents_url: string;
6419 contributors_url: string;
6420 deployments_url: string;
6421 downloads_url: string;
6422 events_url: string;
6423 forks_url: string;
6424 git_commits_url: string;
6425 git_refs_url: string;
6426 git_tags_url: string;
6427 git_url?: string;
6428 issue_comment_url: string;
6429 issue_events_url: string;
6430 issues_url: string;
6431 keys_url: string;
6432 labels_url: string;
6433 languages_url: string;
6434 merges_url: string;
6435 milestones_url: string;
6436 notifications_url: string;
6437 pulls_url: string;
6438 releases_url: string;
6439 ssh_url?: string;
6440 stargazers_url: string;
6441 statuses_url: string;
6442 subscribers_url: string;
6443 subscription_url: string;
6444 tags_url: string;
6445 teams_url: string;
6446 trees_url: string;
6447 clone_url?: string;
6448 mirror_url?: string | null;
6449 hooks_url: string;
6450 svn_url?: string;
6451 homepage?: string | null;
6452 language?: string | null;
6453 forks_count?: number;
6454 stargazers_count?: number;
6455 watchers_count?: number;
6456 size?: number;
6457 default_branch?: string;
6458 open_issues_count?: number;
6459 is_template?: boolean;
6460 topics?: string[];
6461 has_issues?: boolean;
6462 has_projects?: boolean;
6463 has_wiki?: boolean;
6464 has_pages?: boolean;
6465 has_downloads?: boolean;
6466 archived?: boolean;
6467 disabled?: boolean;
6468 visibility?: string;
6469 pushed_at?: string | null;
6470 created_at?: string | null;
6471 updated_at?: string | null;
6472 permissions?: {
6473 admin?: boolean;
6474 push?: boolean;
6475 pull?: boolean;
6476 maintain?: boolean;
6477 triage?: boolean;
6478 };
6479 template_repository?: components["schemas"]["repository"] | null;
6480 temp_clone_token?: string;
6481 delete_branch_on_merge?: boolean;
6482 subscribers_count?: number;
6483 network_count?: number;
6484 code_of_conduct?: components["schemas"]["code-of-conduct"];
6485 license?: {
6486 key?: string;
6487 name?: string;
6488 spdx_id?: string;
6489 url?: string;
6490 node_id?: string;
6491 } | null;
6492 forks?: number;
6493 open_issues?: number;
6494 watchers?: number;
6495 };
6496 /** Thread */
6497 thread: {
6498 id: string;
6499 repository: components["schemas"]["minimal-repository"];
6500 subject: {
6501 title: string;
6502 url: string;
6503 latest_comment_url: string;
6504 type: string;
6505 };
6506 reason: string;
6507 unread: boolean;
6508 updated_at: string;
6509 last_read_at: string | null;
6510 url: string;
6511 subscription_url: string;
6512 };
6513 /** Thread Subscription */
6514 "thread-subscription": {
6515 subscribed: boolean;
6516 ignored: boolean;
6517 reason: string | null;
6518 created_at: string | null;
6519 url: string;
6520 thread_url?: string;
6521 repository_url?: string;
6522 };
6523 /** Organization Full */
6524 "organization-full": {
6525 login: string;
6526 id: number;
6527 node_id: string;
6528 url: string;
6529 repos_url: string;
6530 events_url: string;
6531 hooks_url: string;
6532 issues_url: string;
6533 members_url: string;
6534 public_members_url: string;
6535 avatar_url: string;
6536 description: string | null;
6537 name?: string;
6538 company?: string;
6539 blog?: string;
6540 location?: string;
6541 email?: string;
6542 twitter_username?: string | null;
6543 is_verified?: boolean;
6544 has_organization_projects: boolean;
6545 has_repository_projects: boolean;
6546 public_repos: number;
6547 public_gists: number;
6548 followers: number;
6549 following: number;
6550 html_url: string;
6551 created_at: string;
6552 type: string;
6553 total_private_repos?: number;
6554 owned_private_repos?: number;
6555 private_gists?: number | null;
6556 disk_usage?: number | null;
6557 collaborators?: number | null;
6558 billing_email?: string | null;
6559 plan?: {
6560 name: string;
6561 space: number;
6562 private_repos: number;
6563 filled_seats?: number;
6564 seats?: number;
6565 };
6566 default_repository_permission?: string | null;
6567 members_can_create_repositories?: boolean | null;
6568 two_factor_requirement_enabled?: boolean | null;
6569 members_allowed_repository_creation_type?: string;
6570 members_can_create_public_repositories?: boolean;
6571 members_can_create_private_repositories?: boolean;
6572 members_can_create_internal_repositories?: boolean;
6573 members_can_create_pages?: boolean;
6574 members_can_create_public_pages?: boolean;
6575 members_can_create_private_pages?: boolean;
6576 updated_at: string;
6577 };
6578 /** The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */
6579 "enabled-repositories": "all" | "none" | "selected";
6580 "actions-organization-permissions": {
6581 enabled_repositories: components["schemas"]["enabled-repositories"];
6582 /** The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */
6583 selected_repositories_url?: string;
6584 allowed_actions?: components["schemas"]["allowed-actions"];
6585 selected_actions_url?: components["schemas"]["selected-actions-url"];
6586 };
6587 "runner-groups-org": {
6588 id: number;
6589 name: string;
6590 visibility: string;
6591 default: boolean;
6592 /** Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */
6593 selected_repositories_url?: string;
6594 runners_url: string;
6595 inherited: boolean;
6596 inherited_allows_public_repositories?: boolean;
6597 allows_public_repositories: boolean;
6598 };
6599 /** Secrets for GitHub Actions for an organization. */
6600 "organization-actions-secret": {
6601 /** The name of the secret. */
6602 name: string;
6603 created_at: string;
6604 updated_at: string;
6605 /** Visibility of a secret */
6606 visibility: "all" | "private" | "selected";
6607 selected_repositories_url?: string;
6608 };
6609 /** The public key used for setting Actions Secrets. */
6610 "actions-public-key": {
6611 /** The identifier for the key. */
6612 key_id: string;
6613 /** The Base64 encoded public key. */
6614 key: string;
6615 id?: number;
6616 url?: string;
6617 title?: string;
6618 created_at?: string;
6619 };
6620 /** An object without any properties. */
6621 "empty-object": { [key: string]: any };
6622 /** Credential Authorization */
6623 "credential-authorization": {
6624 /** User login that owns the underlying credential. */
6625 login: string;
6626 /** Unique identifier for the credential. */
6627 credential_id: number;
6628 /** Human-readable description of the credential type. */
6629 credential_type: string;
6630 /** Last eight characters of the credential. Only included in responses with credential_type of personal access token. */
6631 token_last_eight?: string;
6632 /** Date when the credential was authorized for use. */
6633 credential_authorized_at: string;
6634 /** List of oauth scopes the token has been granted. */
6635 scopes?: string[];
6636 /** Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. */
6637 fingerprint?: string;
6638 /** Date when the credential was last accessed. May be null if it was never accessed */
6639 credential_accessed_at?: string | null;
6640 authorized_credential_id?: number | null;
6641 /** The title given to the ssh key. This will only be present when the credential is an ssh key. */
6642 authorized_credential_title?: string | null;
6643 /** The note given to the token. This will only be present when the credential is a token. */
6644 authorized_credential_note?: string | null;
6645 };
6646 /** Organization Invitation */
6647 "organization-invitation": {
6648 id: number;
6649 login: string | null;
6650 email: string | null;
6651 role: string;
6652 created_at: string;
6653 failed_at?: string | null;
6654 failed_reason?: string | null;
6655 inviter: components["schemas"]["simple-user"];
6656 team_count: number;
6657 node_id: string;
6658 invitation_teams_url: string;
6659 };
6660 /** Org Hook */
6661 "org-hook": {
6662 id: number;
6663 url: string;
6664 ping_url: string;
6665 name: string;
6666 events: string[];
6667 active: boolean;
6668 config: {
6669 url?: string;
6670 insecure_ssl?: string;
6671 content_type?: string;
6672 secret?: string;
6673 };
6674 updated_at: string;
6675 created_at: string;
6676 type: string;
6677 };
6678 /** The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. */
6679 "interaction-group":
6680 | "existing_users"
6681 | "contributors_only"
6682 | "collaborators_only";
6683 /** Interaction limit settings. */
6684 "interaction-limit-response": {
6685 limit: components["schemas"]["interaction-group"];
6686 origin: string;
6687 expires_at: string;
6688 };
6689 /** The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. */
6690 "interaction-expiry":
6691 | "one_day"
6692 | "three_days"
6693 | "one_week"
6694 | "one_month"
6695 | "six_months";
6696 /** Limit interactions to a specific type of user for a specified duration */
6697 "interaction-limit": {
6698 limit: components["schemas"]["interaction-group"];
6699 expiry?: components["schemas"]["interaction-expiry"];
6700 };
6701 /** Groups of organization members that gives permissions on specified repositories. */
6702 "team-simple": {
6703 /** Unique identifier of the team */
6704 id: number;
6705 node_id: string;
6706 /** URL for the team */
6707 url: string;
6708 members_url: string;
6709 /** Name of the team */
6710 name: string;
6711 /** Description of the team */
6712 description: string | null;
6713 /** Permission that the team will have for its repositories */
6714 permission: string;
6715 /** The level of privacy this team should have */
6716 privacy?: string;
6717 html_url: string;
6718 repositories_url: string;
6719 slug: string;
6720 /** Distinguished Name (DN) that team maps to within LDAP environment */
6721 ldap_dn?: string;
6722 } | null;
6723 /** Groups of organization members that gives permissions on specified repositories. */
6724 team: {
6725 id: number;
6726 node_id: string;
6727 name: string;
6728 slug: string;
6729 description: string | null;
6730 privacy?: string;
6731 permission: string;
6732 permissions?: {
6733 pull: boolean;
6734 triage: boolean;
6735 push: boolean;
6736 maintain: boolean;
6737 admin: boolean;
6738 };
6739 url: string;
6740 html_url: string;
6741 members_url: string;
6742 repositories_url: string;
6743 parent: components["schemas"]["team-simple"] | null;
6744 };
6745 /** Org Membership */
6746 "org-membership": {
6747 url: string;
6748 /** The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. */
6749 state: "active" | "pending";
6750 /** The user's membership type in the organization. */
6751 role: "admin" | "member" | "billing_manager";
6752 organization_url: string;
6753 organization: components["schemas"]["organization-simple"];
6754 user: components["schemas"]["simple-user"] | null;
6755 permissions?: {
6756 can_create_repository: boolean;
6757 };
6758 };
6759 /** A migration. */
6760 migration: {
6761 id: number;
6762 owner: components["schemas"]["simple-user"] | null;
6763 guid: string;
6764 state: string;
6765 lock_repositories: boolean;
6766 exclude_attachments: boolean;
6767 repositories: components["schemas"]["repository"][];
6768 url: string;
6769 created_at: string;
6770 updated_at: string;
6771 node_id: string;
6772 archive_url?: string;
6773 exclude?: { [key: string]: any }[];
6774 };
6775 /** A software package */
6776 package: {
6777 /** Unique identifier of the package. */
6778 id: number;
6779 /** The name of the package. */
6780 name: string;
6781 package_type:
6782 | "npm"
6783 | "maven"
6784 | "rubygems"
6785 | "docker"
6786 | "nuget"
6787 | "container";
6788 url: string;
6789 html_url: string;
6790 /** The number of versions of the package. */
6791 version_count: number;
6792 visibility: "private" | "public";
6793 owner?: components["schemas"]["simple-user"] | null;
6794 repository?: components["schemas"]["minimal-repository"] | null;
6795 created_at: string;
6796 updated_at: string;
6797 };
6798 /** A version of a software package */
6799 "package-version": {
6800 /** Unique identifier of the package version. */
6801 id: number;
6802 /** The name of the package version. */
6803 name: string;
6804 url: string;
6805 package_html_url: string;
6806 html_url?: string;
6807 license?: string;
6808 description?: string;
6809 created_at: string;
6810 updated_at: string;
6811 deleted_at?: string;
6812 metadata?: {
6813 package_type:
6814 | "npm"
6815 | "maven"
6816 | "rubygems"
6817 | "docker"
6818 | "nuget"
6819 | "container";
6820 container?: {
6821 tags: any[];
6822 };
6823 docker?: {
6824 tag?: any[];
6825 };
6826 };
6827 };
6828 /** Projects are a way to organize columns and cards of work. */
6829 project: {
6830 owner_url: string;
6831 url: string;
6832 html_url: string;
6833 columns_url: string;
6834 id: number;
6835 node_id: string;
6836 /** Name of the project */
6837 name: string;
6838 /** Body of the project */
6839 body: string | null;
6840 number: number;
6841 /** State of the project; either 'open' or 'closed' */
6842 state: string;
6843 creator: components["schemas"]["simple-user"] | null;
6844 created_at: string;
6845 updated_at: string;
6846 /** The baseline permission that all organization members have on this project. Only present if owner is an organization. */
6847 organization_permission?: "read" | "write" | "admin" | "none";
6848 /** Whether or not this project can be seen by everyone. Only present if owner is an organization. */
6849 private?: boolean;
6850 };
6851 /** External Groups to be mapped to a team for membership */
6852 "group-mapping": {
6853 /** Array of groups to be mapped to this team */
6854 groups?: {
6855 /** The ID of the group */
6856 group_id: string;
6857 /** The name of the group */
6858 group_name: string;
6859 /** a description of the group */
6860 group_description: string;
6861 /** synchronization status for this group mapping */
6862 status?: string;
6863 /** the time of the last sync for this group-mapping */
6864 synced_at?: string | null;
6865 }[];
6866 };
6867 /** Groups of organization members that gives permissions on specified repositories. */
6868 "team-full": {
6869 /** Unique identifier of the team */
6870 id: number;
6871 node_id: string;
6872 /** URL for the team */
6873 url: string;
6874 html_url: string;
6875 /** Name of the team */
6876 name: string;
6877 slug: string;
6878 description: string | null;
6879 /** The level of privacy this team should have */
6880 privacy?: "closed" | "secret";
6881 /** Permission that the team will have for its repositories */
6882 permission: string;
6883 members_url: string;
6884 repositories_url: string;
6885 parent?: components["schemas"]["team-simple"] | null;
6886 members_count: number;
6887 repos_count: number;
6888 created_at: string;
6889 updated_at: string;
6890 organization: components["schemas"]["organization-full"];
6891 /** Distinguished Name (DN) that team maps to within LDAP environment */
6892 ldap_dn?: string;
6893 };
6894 /** A team discussion is a persistent record of a free-form conversation within a team. */
6895 "team-discussion": {
6896 author: components["schemas"]["simple-user"] | null;
6897 /** The main text of the discussion. */
6898 body: string;
6899 body_html: string;
6900 /** The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. */
6901 body_version: string;
6902 comments_count: number;
6903 comments_url: string;
6904 created_at: string;
6905 last_edited_at: string | null;
6906 html_url: string;
6907 node_id: string;
6908 /** The unique sequence number of a team discussion. */
6909 number: number;
6910 /** Whether or not this discussion should be pinned for easy retrieval. */
6911 pinned: boolean;
6912 /** Whether or not this discussion should be restricted to team members and organization administrators. */
6913 private: boolean;
6914 team_url: string;
6915 /** The title of the discussion. */
6916 title: string;
6917 updated_at: string;
6918 url: string;
6919 reactions?: components["schemas"]["reaction-rollup"];
6920 };
6921 /** A reply to a discussion within a team. */
6922 "team-discussion-comment": {
6923 author: components["schemas"]["simple-user"] | null;
6924 /** The main text of the comment. */
6925 body: string;
6926 body_html: string;
6927 /** The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. */
6928 body_version: string;
6929 created_at: string;
6930 last_edited_at: string | null;
6931 discussion_url: string;
6932 html_url: string;
6933 node_id: string;
6934 /** The unique sequence number of a team discussion comment. */
6935 number: number;
6936 updated_at: string;
6937 url: string;
6938 reactions?: components["schemas"]["reaction-rollup"];
6939 };
6940 /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */
6941 reaction: {
6942 id: number;
6943 node_id: string;
6944 user: components["schemas"]["simple-user"] | null;
6945 /** The reaction to use */
6946 content:
6947 | "+1"
6948 | "-1"
6949 | "laugh"
6950 | "confused"
6951 | "heart"
6952 | "hooray"
6953 | "rocket"
6954 | "eyes";
6955 created_at: string;
6956 };
6957 /** Team Membership */
6958 "team-membership": {
6959 url: string;
6960 /** The role of the user in the team. */
6961 role: "member" | "maintainer";
6962 /** The state of the user's membership in the team. */
6963 state: "active" | "pending";
6964 };
6965 /** A team's access to a project. */
6966 "team-project": {
6967 owner_url: string;
6968 url: string;
6969 html_url: string;
6970 columns_url: string;
6971 id: number;
6972 node_id: string;
6973 name: string;
6974 body: string | null;
6975 number: number;
6976 state: string;
6977 creator: components["schemas"]["simple-user"];
6978 created_at: string;
6979 updated_at: string;
6980 /** The organization permission for this project. Only present when owner is an organization. */
6981 organization_permission?: string;
6982 /** Whether the project is private or not. Only present when owner is an organization. */
6983 private?: boolean;
6984 permissions: {
6985 read: boolean;
6986 write: boolean;
6987 admin: boolean;
6988 };
6989 };
6990 /** A team's access to a repository. */
6991 "team-repository": {
6992 /** Unique identifier of the repository */
6993 id: number;
6994 node_id: string;
6995 /** The name of the repository. */
6996 name: string;
6997 full_name: string;
6998 license: components["schemas"]["license-simple"] | null;
6999 forks: number;
7000 permissions?: {
7001 admin: boolean;
7002 pull: boolean;
7003 triage?: boolean;
7004 push: boolean;
7005 maintain?: boolean;
7006 };
7007 owner: components["schemas"]["simple-user"] | null;
7008 /** Whether the repository is private or public. */
7009 private: boolean;
7010 html_url: string;
7011 description: string | null;
7012 fork: boolean;
7013 url: string;
7014 archive_url: string;
7015 assignees_url: string;
7016 blobs_url: string;
7017 branches_url: string;
7018 collaborators_url: string;
7019 comments_url: string;
7020 commits_url: string;
7021 compare_url: string;
7022 contents_url: string;
7023 contributors_url: string;
7024 deployments_url: string;
7025 downloads_url: string;
7026 events_url: string;
7027 forks_url: string;
7028 git_commits_url: string;
7029 git_refs_url: string;
7030 git_tags_url: string;
7031 git_url: string;
7032 issue_comment_url: string;
7033 issue_events_url: string;
7034 issues_url: string;
7035 keys_url: string;
7036 labels_url: string;
7037 languages_url: string;
7038 merges_url: string;
7039 milestones_url: string;
7040 notifications_url: string;
7041 pulls_url: string;
7042 releases_url: string;
7043 ssh_url: string;
7044 stargazers_url: string;
7045 statuses_url: string;
7046 subscribers_url: string;
7047 subscription_url: string;
7048 tags_url: string;
7049 teams_url: string;
7050 trees_url: string;
7051 clone_url: string;
7052 mirror_url: string | null;
7053 hooks_url: string;
7054 svn_url: string;
7055 homepage: string | null;
7056 language: string | null;
7057 forks_count: number;
7058 stargazers_count: number;
7059 watchers_count: number;
7060 size: number;
7061 /** The default branch of the repository. */
7062 default_branch: string;
7063 open_issues_count: number;
7064 /** Whether this repository acts as a template that can be used to generate new repositories. */
7065 is_template?: boolean;
7066 topics?: string[];
7067 /** Whether issues are enabled. */
7068 has_issues: boolean;
7069 /** Whether projects are enabled. */
7070 has_projects: boolean;
7071 /** Whether the wiki is enabled. */
7072 has_wiki: boolean;
7073 has_pages: boolean;
7074 /** Whether downloads are enabled. */
7075 has_downloads: boolean;
7076 /** Whether the repository is archived. */
7077 archived: boolean;
7078 /** Returns whether or not this repository disabled. */
7079 disabled: boolean;
7080 /** The repository visibility: public, private, or internal. */
7081 visibility?: string;
7082 pushed_at: string | null;
7083 created_at: string | null;
7084 updated_at: string | null;
7085 /** Whether to allow rebase merges for pull requests. */
7086 allow_rebase_merge?: boolean;
7087 template_repository?: components["schemas"]["repository"] | null;
7088 temp_clone_token?: string;
7089 /** Whether to allow squash merges for pull requests. */
7090 allow_squash_merge?: boolean;
7091 /** Whether to delete head branches when pull requests are merged */
7092 delete_branch_on_merge?: boolean;
7093 /** Whether to allow merge commits for pull requests. */
7094 allow_merge_commit?: boolean;
7095 subscribers_count?: number;
7096 network_count?: number;
7097 open_issues: number;
7098 watchers: number;
7099 master_branch?: string;
7100 };
7101 /** Project cards represent a scope of work. */
7102 "project-card": {
7103 url: string;
7104 /** The project card's ID */
7105 id: number;
7106 node_id: string;
7107 note: string | null;
7108 creator: components["schemas"]["simple-user"] | null;
7109 created_at: string;
7110 updated_at: string;
7111 /** Whether or not the card is archived */
7112 archived?: boolean;
7113 column_name?: string;
7114 project_id?: string;
7115 column_url: string;
7116 content_url?: string;
7117 project_url: string;
7118 };
7119 /** Project columns contain cards of work. */
7120 "project-column": {
7121 url: string;
7122 project_url: string;
7123 cards_url: string;
7124 /** The unique identifier of the project column */
7125 id: number;
7126 node_id: string;
7127 /** Name of the project column */
7128 name: string;
7129 created_at: string;
7130 updated_at: string;
7131 };
7132 /** Repository Collaborator Permission */
7133 "repository-collaborator-permission": {
7134 permission: string;
7135 user: components["schemas"]["simple-user"] | null;
7136 };
7137 "rate-limit": {
7138 limit: number;
7139 remaining: number;
7140 reset: number;
7141 used: number;
7142 };
7143 /** Rate Limit Overview */
7144 "rate-limit-overview": {
7145 resources: {
7146 core: components["schemas"]["rate-limit"];
7147 graphql?: components["schemas"]["rate-limit"];
7148 search: components["schemas"]["rate-limit"];
7149 source_import?: components["schemas"]["rate-limit"];
7150 integration_manifest?: components["schemas"]["rate-limit"];
7151 code_scanning_upload?: components["schemas"]["rate-limit"];
7152 };
7153 rate: components["schemas"]["rate-limit"];
7154 };
7155 /** Code of Conduct Simple */
7156 "code-of-conduct-simple": {
7157 url: string;
7158 key: string;
7159 name: string;
7160 html_url: string | null;
7161 };
7162 /** Full Repository */
7163 "full-repository": {
7164 id: number;
7165 node_id: string;
7166 name: string;
7167 full_name: string;
7168 owner: components["schemas"]["simple-user"];
7169 private: boolean;
7170 html_url: string;
7171 description: string | null;
7172 fork: boolean;
7173 url: string;
7174 archive_url: string;
7175 assignees_url: string;
7176 blobs_url: string;
7177 branches_url: string;
7178 collaborators_url: string;
7179 comments_url: string;
7180 commits_url: string;
7181 compare_url: string;
7182 contents_url: string;
7183 contributors_url: string;
7184 deployments_url: string;
7185 downloads_url: string;
7186 events_url: string;
7187 forks_url: string;
7188 git_commits_url: string;
7189 git_refs_url: string;
7190 git_tags_url: string;
7191 git_url: string;
7192 issue_comment_url: string;
7193 issue_events_url: string;
7194 issues_url: string;
7195 keys_url: string;
7196 labels_url: string;
7197 languages_url: string;
7198 merges_url: string;
7199 milestones_url: string;
7200 notifications_url: string;
7201 pulls_url: string;
7202 releases_url: string;
7203 ssh_url: string;
7204 stargazers_url: string;
7205 statuses_url: string;
7206 subscribers_url: string;
7207 subscription_url: string;
7208 tags_url: string;
7209 teams_url: string;
7210 trees_url: string;
7211 clone_url: string;
7212 mirror_url: string | null;
7213 hooks_url: string;
7214 svn_url: string;
7215 homepage: string | null;
7216 language: string | null;
7217 forks_count: number;
7218 stargazers_count: number;
7219 watchers_count: number;
7220 size: number;
7221 default_branch: string;
7222 open_issues_count: number;
7223 is_template?: boolean;
7224 topics?: string[];
7225 has_issues: boolean;
7226 has_projects: boolean;
7227 has_wiki: boolean;
7228 has_pages: boolean;
7229 has_downloads: boolean;
7230 archived: boolean;
7231 /** Returns whether or not this repository disabled. */
7232 disabled: boolean;
7233 /** The repository visibility: public, private, or internal. */
7234 visibility?: string;
7235 pushed_at: string;
7236 created_at: string;
7237 updated_at: string;
7238 permissions?: {
7239 admin: boolean;
7240 pull: boolean;
7241 push: boolean;
7242 };
7243 allow_rebase_merge?: boolean;
7244 template_repository?: components["schemas"]["repository"] | null;
7245 temp_clone_token?: string | null;
7246 allow_squash_merge?: boolean;
7247 delete_branch_on_merge?: boolean;
7248 allow_merge_commit?: boolean;
7249 subscribers_count: number;
7250 network_count: number;
7251 license: components["schemas"]["license-simple"] | null;
7252 organization?: components["schemas"]["simple-user"] | null;
7253 parent?: components["schemas"]["repository"];
7254 source?: components["schemas"]["repository"];
7255 forks: number;
7256 master_branch?: string;
7257 open_issues: number;
7258 watchers: number;
7259 /** Whether anonymous git access is allowed. */
7260 anonymous_access_enabled?: boolean;
7261 code_of_conduct?: components["schemas"]["code-of-conduct-simple"];
7262 security_and_analysis?: {
7263 advanced_security?: {
7264 status?: "enabled" | "disabled";
7265 };
7266 secret_scanning?: {
7267 status?: "enabled" | "disabled";
7268 };
7269 } | null;
7270 };
7271 /** An artifact */
7272 artifact: {
7273 id: number;
7274 node_id: string;
7275 /** The name of the artifact. */
7276 name: string;
7277 /** The size in bytes of the artifact. */
7278 size_in_bytes: number;
7279 url: string;
7280 archive_download_url: string;
7281 /** Whether or not the artifact has expired. */
7282 expired: boolean;
7283 created_at: string | null;
7284 expires_at: string | null;
7285 updated_at: string | null;
7286 };
7287 /** Information of a job execution in a workflow run */
7288 job: {
7289 /** The id of the job. */
7290 id: number;
7291 /** The id of the associated workflow run. */
7292 run_id: number;
7293 run_url: string;
7294 node_id: string;
7295 /** The SHA of the commit that is being run. */
7296 head_sha: string;
7297 url: string;
7298 html_url: string | null;
7299 /** The phase of the lifecycle that the job is currently in. */
7300 status: "queued" | "in_progress" | "completed";
7301 /** The outcome of the job. */
7302 conclusion: string | null;
7303 /** The time that the job started, in ISO 8601 format. */
7304 started_at: string;
7305 /** The time that the job finished, in ISO 8601 format. */
7306 completed_at: string | null;
7307 /** The name of the job. */
7308 name: string;
7309 /** Steps in this job. */
7310 steps?: {
7311 /** The phase of the lifecycle that the job is currently in. */
7312 status: "queued" | "in_progress" | "completed";
7313 /** The outcome of the job. */
7314 conclusion: string | null;
7315 /** The name of the job. */
7316 name: string;
7317 number: number;
7318 /** The time that the step started, in ISO 8601 format. */
7319 started_at?: string | null;
7320 /** The time that the job finished, in ISO 8601 format. */
7321 completed_at?: string | null;
7322 }[];
7323 check_run_url: string;
7324 };
7325 /** Whether GitHub Actions is enabled on the repository. */
7326 "actions-enabled": boolean;
7327 "actions-repository-permissions": {
7328 enabled: components["schemas"]["actions-enabled"];
7329 allowed_actions: components["schemas"]["allowed-actions"];
7330 selected_actions_url?: components["schemas"]["selected-actions-url"];
7331 };
7332 "pull-request-minimal": {
7333 id: number;
7334 number: number;
7335 url: string;
7336 head: {
7337 ref: string;
7338 sha: string;
7339 repo: {
7340 id: number;
7341 url: string;
7342 name: string;
7343 };
7344 };
7345 base: {
7346 ref: string;
7347 sha: string;
7348 repo: {
7349 id: number;
7350 url: string;
7351 name: string;
7352 };
7353 };
7354 };
7355 /** Simple Commit */
7356 "simple-commit": {
7357 id: string;
7358 tree_id: string;
7359 message: string;
7360 timestamp: string;
7361 author: {
7362 name: string;
7363 email: string;
7364 } | null;
7365 committer: {
7366 name: string;
7367 email: string;
7368 } | null;
7369 };
7370 /** An invocation of a workflow */
7371 "workflow-run": {
7372 /** The ID of the workflow run. */
7373 id: number;
7374 /** The name of the workflow run. */
7375 name?: string | null;
7376 node_id: string;
7377 /** The ID of the associated check suite. */
7378 check_suite_id?: number;
7379 /** The node ID of the associated check suite. */
7380 check_suite_node_id?: string;
7381 head_branch: string | null;
7382 /** The SHA of the head commit that points to the version of the worflow being run. */
7383 head_sha: string;
7384 /** The auto incrementing run number for the workflow run. */
7385 run_number: number;
7386 event: string;
7387 status: string | null;
7388 conclusion: string | null;
7389 /** The ID of the parent workflow. */
7390 workflow_id: number;
7391 /** The URL to the workflow run. */
7392 url: string;
7393 html_url: string;
7394 pull_requests: components["schemas"]["pull-request-minimal"][] | null;
7395 created_at: string;
7396 updated_at: string;
7397 /** The URL to the jobs for the workflow run. */
7398 jobs_url: string;
7399 /** The URL to download the logs for the workflow run. */
7400 logs_url: string;
7401 /** The URL to the associated check suite. */
7402 check_suite_url: string;
7403 /** The URL to the artifacts for the workflow run. */
7404 artifacts_url: string;
7405 /** The URL to cancel the workflow run. */
7406 cancel_url: string;
7407 /** The URL to rerun the workflow run. */
7408 rerun_url: string;
7409 /** The URL to the workflow. */
7410 workflow_url: string;
7411 head_commit: components["schemas"]["simple-commit"] | null;
7412 repository: components["schemas"]["minimal-repository"];
7413 head_repository: components["schemas"]["minimal-repository"];
7414 head_repository_id?: number;
7415 };
7416 /** An entry in the reviews log for environment deployments */
7417 "environment-approvals": {
7418 /** The list of environments that were approved or rejected */
7419 environments: {
7420 /** The id of the environment. */
7421 id?: number;
7422 node_id?: string;
7423 /** The name of the environment. */
7424 name?: string;
7425 url?: string;
7426 html_url?: string;
7427 /** The time that the environment was created, in ISO 8601 format. */
7428 created_at?: string;
7429 /** The time that the environment was last updated, in ISO 8601 format. */
7430 updated_at?: string;
7431 }[];
7432 /** Whether deployment to the environment(s) was approved or rejected */
7433 state: "approved" | "rejected";
7434 user: components["schemas"]["simple-user"];
7435 /** The comment submitted with the deployment review */
7436 comment: string;
7437 };
7438 /** The type of reviewer. Must be one of: `User` or `Team` */
7439 "deployment-reviewer-type": "User" | "Team";
7440 /** Details of a deployment that is waiting for protection rules to pass */
7441 "pending-deployment": {
7442 environment: {
7443 /** The id of the environment. */
7444 id?: number;
7445 node_id?: string;
7446 /** The name of the environment. */
7447 name?: string;
7448 url?: string;
7449 html_url?: string;
7450 };
7451 /** The set duration of the wait timer */
7452 wait_timer: number;
7453 /** The time that the wait timer began. */
7454 wait_timer_started_at: string | null;
7455 /** Whether the currently authenticated user can approve the deployment */
7456 current_user_can_approve: boolean;
7457 /** The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */
7458 reviewers: {
7459 type?: components["schemas"]["deployment-reviewer-type"];
7460 reviewer?: Partial<components["schemas"]["simple-user"]> &
7461 Partial<components["schemas"]["team"]>;
7462 }[];
7463 };
7464 /** A request for a specific ref(branch,sha,tag) to be deployed */
7465 deployment: {
7466 url: string;
7467 /** Unique identifier of the deployment */
7468 id: number;
7469 node_id: string;
7470 sha: string;
7471 /** The ref to deploy. This can be a branch, tag, or sha. */
7472 ref: string;
7473 /** Parameter to specify a task to execute */
7474 task: string;
7475 payload: { [key: string]: any } | string;
7476 original_environment?: string;
7477 /** Name for the target deployment environment. */
7478 environment: string;
7479 description: string | null;
7480 creator: components["schemas"]["simple-user"] | null;
7481 created_at: string;
7482 updated_at: string;
7483 statuses_url: string;
7484 repository_url: string;
7485 /** Specifies if the given environment is will no longer exist at some point in the future. Default: false. */
7486 transient_environment?: boolean;
7487 /** Specifies if the given environment is one that end-users directly interact with. Default: false. */
7488 production_environment?: boolean;
7489 performed_via_github_app?: components["schemas"]["integration"] | null;
7490 };
7491 /** Workflow Run Usage */
7492 "workflow-run-usage": {
7493 billable: {
7494 UBUNTU?: {
7495 total_ms: number;
7496 jobs: number;
7497 };
7498 MACOS?: {
7499 total_ms: number;
7500 jobs: number;
7501 };
7502 WINDOWS?: {
7503 total_ms: number;
7504 jobs: number;
7505 };
7506 };
7507 run_duration_ms?: number;
7508 };
7509 /** Set secrets for GitHub Actions. */
7510 "actions-secret": {
7511 /** The name of the secret. */
7512 name: string;
7513 created_at: string;
7514 updated_at: string;
7515 };
7516 /** A GitHub Actions workflow */
7517 workflow: {
7518 id: number;
7519 node_id: string;
7520 name: string;
7521 path: string;
7522 state:
7523 | "active"
7524 | "deleted"
7525 | "disabled_fork"
7526 | "disabled_inactivity"
7527 | "disabled_manually";
7528 created_at: string;
7529 updated_at: string;
7530 url: string;
7531 html_url: string;
7532 badge_url: string;
7533 deleted_at?: string;
7534 };
7535 /** Workflow Usage */
7536 "workflow-usage": {
7537 billable: {
7538 UBUNTU?: {
7539 total_ms?: number;
7540 };
7541 MACOS?: {
7542 total_ms?: number;
7543 };
7544 WINDOWS?: {
7545 total_ms?: number;
7546 };
7547 };
7548 };
7549 /** Protected Branch Admin Enforced */
7550 "protected-branch-admin-enforced": {
7551 url: string;
7552 enabled: boolean;
7553 };
7554 /** Protected Branch Pull Request Review */
7555 "protected-branch-pull-request-review": {
7556 url?: string;
7557 dismissal_restrictions?: {
7558 /** The list of users with review dismissal access. */
7559 users?: components["schemas"]["simple-user"][];
7560 /** The list of teams with review dismissal access. */
7561 teams?: components["schemas"]["team"][];
7562 url?: string;
7563 users_url?: string;
7564 teams_url?: string;
7565 };
7566 dismiss_stale_reviews: boolean;
7567 require_code_owner_reviews: boolean;
7568 required_approving_review_count?: number;
7569 };
7570 /** Branch Restriction Policy */
7571 "branch-restriction-policy": {
7572 url: string;
7573 users_url: string;
7574 teams_url: string;
7575 apps_url: string;
7576 users: {
7577 login?: string;
7578 id?: number;
7579 node_id?: string;
7580 avatar_url?: string;
7581 gravatar_id?: string;
7582 url?: string;
7583 html_url?: string;
7584 followers_url?: string;
7585 following_url?: string;
7586 gists_url?: string;
7587 starred_url?: string;
7588 subscriptions_url?: string;
7589 organizations_url?: string;
7590 repos_url?: string;
7591 events_url?: string;
7592 received_events_url?: string;
7593 type?: string;
7594 site_admin?: boolean;
7595 }[];
7596 teams: {
7597 id?: number;
7598 node_id?: string;
7599 url?: string;
7600 html_url?: string;
7601 name?: string;
7602 slug?: string;
7603 description?: string | null;
7604 privacy?: string;
7605 permission?: string;
7606 members_url?: string;
7607 repositories_url?: string;
7608 parent?: string | null;
7609 }[];
7610 apps: {
7611 id?: number;
7612 slug?: string;
7613 node_id?: string;
7614 owner?: {
7615 login?: string;
7616 id?: number;
7617 node_id?: string;
7618 url?: string;
7619 repos_url?: string;
7620 events_url?: string;
7621 hooks_url?: string;
7622 issues_url?: string;
7623 members_url?: string;
7624 public_members_url?: string;
7625 avatar_url?: string;
7626 description?: string;
7627 gravatar_id?: string;
7628 html_url?: string;
7629 followers_url?: string;
7630 following_url?: string;
7631 gists_url?: string;
7632 starred_url?: string;
7633 subscriptions_url?: string;
7634 organizations_url?: string;
7635 received_events_url?: string;
7636 type?: string;
7637 site_admin?: boolean;
7638 };
7639 name?: string;
7640 description?: string;
7641 external_url?: string;
7642 html_url?: string;
7643 created_at?: string;
7644 updated_at?: string;
7645 permissions?: {
7646 metadata?: string;
7647 contents?: string;
7648 issues?: string;
7649 single_file?: string;
7650 };
7651 events?: string[];
7652 }[];
7653 };
7654 /** Branch Protection */
7655 "branch-protection": {
7656 url?: string;
7657 enabled?: boolean;
7658 required_status_checks?: {
7659 url?: string;
7660 enforcement_level?: string;
7661 contexts: string[];
7662 contexts_url?: string;
7663 strict?: boolean;
7664 };
7665 enforce_admins?: components["schemas"]["protected-branch-admin-enforced"];
7666 required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"];
7667 restrictions?: components["schemas"]["branch-restriction-policy"];
7668 required_linear_history?: {
7669 enabled?: boolean;
7670 };
7671 allow_force_pushes?: {
7672 enabled?: boolean;
7673 };
7674 allow_deletions?: {
7675 enabled?: boolean;
7676 };
7677 required_conversation_resolution?: {
7678 enabled?: boolean;
7679 };
7680 name?: string;
7681 protection_url?: string;
7682 required_signatures?: {
7683 url: string;
7684 enabled: boolean;
7685 };
7686 };
7687 /** Short Branch */
7688 "short-branch": {
7689 name: string;
7690 commit: {
7691 sha: string;
7692 url: string;
7693 };
7694 protected: boolean;
7695 protection?: components["schemas"]["branch-protection"];
7696 protection_url?: string;
7697 };
7698 /** Metaproperties for Git author/committer information. */
7699 "git-user": {
7700 name?: string;
7701 email?: string;
7702 date?: string;
7703 };
7704 verification: {
7705 verified: boolean;
7706 reason: string;
7707 payload: string | null;
7708 signature: string | null;
7709 };
7710 /** Commit */
7711 commit: {
7712 url: string;
7713 sha: string;
7714 node_id: string;
7715 html_url: string;
7716 comments_url: string;
7717 commit: {
7718 url: string;
7719 author: components["schemas"]["git-user"] | null;
7720 committer: components["schemas"]["git-user"] | null;
7721 message: string;
7722 comment_count: number;
7723 tree: {
7724 sha: string;
7725 url: string;
7726 };
7727 verification?: components["schemas"]["verification"];
7728 };
7729 author: components["schemas"]["simple-user"] | null;
7730 committer: components["schemas"]["simple-user"] | null;
7731 parents: {
7732 sha: string;
7733 url: string;
7734 html_url?: string;
7735 }[];
7736 stats?: {
7737 additions?: number;
7738 deletions?: number;
7739 total?: number;
7740 };
7741 files?: {
7742 filename?: string;
7743 additions?: number;
7744 deletions?: number;
7745 changes?: number;
7746 status?: string;
7747 raw_url?: string;
7748 blob_url?: string;
7749 patch?: string;
7750 sha?: string;
7751 contents_url?: string;
7752 previous_filename?: string;
7753 }[];
7754 };
7755 /** Branch With Protection */
7756 "branch-with-protection": {
7757 name: string;
7758 commit: components["schemas"]["commit"];
7759 _links: {
7760 html: string;
7761 self: string;
7762 };
7763 protected: boolean;
7764 protection: components["schemas"]["branch-protection"];
7765 protection_url: string;
7766 pattern?: string;
7767 required_approving_review_count?: number;
7768 };
7769 /** Status Check Policy */
7770 "status-check-policy": {
7771 url: string;
7772 strict: boolean;
7773 contexts: string[];
7774 contexts_url: string;
7775 };
7776 /** Branch protections protect branches */
7777 "protected-branch": {
7778 url: string;
7779 required_status_checks?: components["schemas"]["status-check-policy"];
7780 required_pull_request_reviews?: {
7781 url: string;
7782 dismiss_stale_reviews?: boolean;
7783 require_code_owner_reviews?: boolean;
7784 required_approving_review_count?: number;
7785 dismissal_restrictions?: {
7786 url: string;
7787 users_url: string;
7788 teams_url: string;
7789 users: components["schemas"]["simple-user"][];
7790 teams: components["schemas"]["team"][];
7791 };
7792 };
7793 required_signatures?: {
7794 url: string;
7795 enabled: boolean;
7796 };
7797 enforce_admins?: {
7798 url: string;
7799 enabled: boolean;
7800 };
7801 required_linear_history?: {
7802 enabled: boolean;
7803 };
7804 allow_force_pushes?: {
7805 enabled: boolean;
7806 };
7807 allow_deletions?: {
7808 enabled: boolean;
7809 };
7810 restrictions?: components["schemas"]["branch-restriction-policy"];
7811 required_conversation_resolution?: {
7812 enabled?: boolean;
7813 };
7814 };
7815 /** A deployment created as the result of an Actions check run from a workflow that references an environment */
7816 "deployment-simple": {
7817 url: string;
7818 /** Unique identifier of the deployment */
7819 id: number;
7820 node_id: string;
7821 /** Parameter to specify a task to execute */
7822 task: string;
7823 original_environment?: string;
7824 /** Name for the target deployment environment. */
7825 environment: string;
7826 description: string | null;
7827 created_at: string;
7828 updated_at: string;
7829 statuses_url: string;
7830 repository_url: string;
7831 /** Specifies if the given environment is will no longer exist at some point in the future. Default: false. */
7832 transient_environment?: boolean;
7833 /** Specifies if the given environment is one that end-users directly interact with. Default: false. */
7834 production_environment?: boolean;
7835 performed_via_github_app?: components["schemas"]["integration"] | null;
7836 };
7837 /** A check performed on the code of a given code change */
7838 "check-run": {
7839 /** The id of the check. */
7840 id: number;
7841 /** The SHA of the commit that is being checked. */
7842 head_sha: string;
7843 node_id: string;
7844 external_id: string | null;
7845 url: string;
7846 html_url: string | null;
7847 details_url: string | null;
7848 /** The phase of the lifecycle that the check is currently in. */
7849 status: "queued" | "in_progress" | "completed";
7850 conclusion:
7851 | (
7852 | "success"
7853 | "failure"
7854 | "neutral"
7855 | "cancelled"
7856 | "skipped"
7857 | "timed_out"
7858 | "action_required"
7859 )
7860 | null;
7861 started_at: string | null;
7862 completed_at: string | null;
7863 output: {
7864 title: string | null;
7865 summary: string | null;
7866 text: string | null;
7867 annotations_count: number;
7868 annotations_url: string;
7869 };
7870 /** The name of the check. */
7871 name: string;
7872 check_suite: {
7873 id: number;
7874 } | null;
7875 app: components["schemas"]["integration"] | null;
7876 pull_requests: components["schemas"]["pull-request-minimal"][];
7877 deployment?: components["schemas"]["deployment-simple"];
7878 };
7879 /** Check Annotation */
7880 "check-annotation": {
7881 path: string;
7882 start_line: number;
7883 end_line: number;
7884 start_column: number | null;
7885 end_column: number | null;
7886 annotation_level: string | null;
7887 title: string | null;
7888 message: string | null;
7889 raw_details: string | null;
7890 blob_href: string;
7891 };
7892 /** A suite of checks performed on the code of a given code change */
7893 "check-suite": {
7894 id: number;
7895 node_id: string;
7896 head_branch: string | null;
7897 /** The SHA of the head commit that is being checked. */
7898 head_sha: string;
7899 status: ("queued" | "in_progress" | "completed") | null;
7900 conclusion:
7901 | (
7902 | "success"
7903 | "failure"
7904 | "neutral"
7905 | "cancelled"
7906 | "skipped"
7907 | "timed_out"
7908 | "action_required"
7909 )
7910 | null;
7911 url: string | null;
7912 before: string | null;
7913 after: string | null;
7914 pull_requests: components["schemas"]["pull-request-minimal"][] | null;
7915 app: components["schemas"]["integration"] | null;
7916 repository: components["schemas"]["minimal-repository"];
7917 created_at: string | null;
7918 updated_at: string | null;
7919 head_commit: components["schemas"]["simple-commit"];
7920 latest_check_runs_count: number;
7921 check_runs_url: string;
7922 };
7923 /** Check suite configuration preferences for a repository. */
7924 "check-suite-preference": {
7925 preferences: {
7926 auto_trigger_checks?: {
7927 app_id: number;
7928 setting: boolean;
7929 }[];
7930 };
7931 repository: components["schemas"]["minimal-repository"];
7932 };
7933 /** The name of the tool used to generate the code scanning analysis. */
7934 "code-scanning-analysis-tool-name": string;
7935 /** The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */
7936 "code-scanning-analysis-tool-guid": string | null;
7937 /**
7938 * The full Git reference, formatted as `refs/heads/<branch name>`,
7939 * `refs/pull/<number>/merge`, or `refs/pull/<number>/head`.
7940 */
7941 "code-scanning-ref": string;
7942 /** State of a code scanning alert. */
7943 "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed";
7944 /** The security alert number. */
7945 "alert-number": number;
7946 /** The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */
7947 "alert-created-at": string;
7948 /** The REST API URL of the alert resource. */
7949 "alert-url": string;
7950 /** The GitHub URL of the alert resource. */
7951 "alert-html-url": string;
7952 /** The REST API URL for fetching the list of instances for an alert. */
7953 "alert-instances-url": string;
7954 /** The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */
7955 "code-scanning-alert-dismissed-at": string | null;
7956 /** **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */
7957 "code-scanning-alert-dismissed-reason":
7958 | ("false positive" | "won't fix" | "used in tests")
7959 | null;
7960 "code-scanning-alert-rule-summary": {
7961 /** A unique identifier for the rule used to detect the alert. */
7962 id?: string | null;
7963 /** The name of the rule used to detect the alert. */
7964 name?: string;
7965 /** The severity of the alert. */
7966 severity?: ("none" | "note" | "warning" | "error") | null;
7967 /** A short description of the rule used to detect the alert. */
7968 description?: string;
7969 };
7970 /** The version of the tool used to generate the code scanning analysis. */
7971 "code-scanning-analysis-tool-version": string | null;
7972 "code-scanning-analysis-tool": {
7973 name?: components["schemas"]["code-scanning-analysis-tool-name"];
7974 version?: components["schemas"]["code-scanning-analysis-tool-version"];
7975 guid?: components["schemas"]["code-scanning-analysis-tool-guid"];
7976 };
7977 /** Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */
7978 "code-scanning-analysis-analysis-key": string;
7979 /** Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */
7980 "code-scanning-alert-environment": string;
7981 /** Describe a region within a file for the alert. */
7982 "code-scanning-alert-location": {
7983 path?: string;
7984 start_line?: number;
7985 end_line?: number;
7986 start_column?: number;
7987 end_column?: number;
7988 };
7989 /** A classification of the file. For example to identify it as generated. */
7990 "code-scanning-alert-classification":
7991 | ("source" | "generated" | "test" | "library")
7992 | null;
7993 "code-scanning-alert-instance": {
7994 ref?: components["schemas"]["code-scanning-ref"];
7995 analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"];
7996 environment?: components["schemas"]["code-scanning-alert-environment"];
7997 state?: components["schemas"]["code-scanning-alert-state"];
7998 commit_sha?: string;
7999 message?: {
8000 text?: string;
8001 };
8002 location?: components["schemas"]["code-scanning-alert-location"];
8003 html_url?: string;
8004 /**
8005 * Classifications that have been applied to the file that triggered the alert.
8006 * For example identifying it as documentation, or a generated file.
8007 */
8008 classifications?: components["schemas"]["code-scanning-alert-classification"][];
8009 };
8010 "code-scanning-alert-items": {
8011 number: components["schemas"]["alert-number"];
8012 created_at: components["schemas"]["alert-created-at"];
8013 url: components["schemas"]["alert-url"];
8014 html_url: components["schemas"]["alert-html-url"];
8015 instances_url: components["schemas"]["alert-instances-url"];
8016 state: components["schemas"]["code-scanning-alert-state"];
8017 dismissed_by: components["schemas"]["simple-user"];
8018 dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"];
8019 dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"];
8020 rule: components["schemas"]["code-scanning-alert-rule-summary"];
8021 tool: components["schemas"]["code-scanning-analysis-tool"];
8022 most_recent_instance: components["schemas"]["code-scanning-alert-instance"];
8023 };
8024 "code-scanning-alert-rule": {
8025 /** A unique identifier for the rule used to detect the alert. */
8026 id?: string | null;
8027 /** The name of the rule used to detect the alert. */
8028 name?: string;
8029 /** The severity of the alert. */
8030 severity?: ("none" | "note" | "warning" | "error") | null;
8031 /** The security severity of the alert. */
8032 security_severity_level?: ("low" | "medium" | "high" | "critical") | null;
8033 /** A short description of the rule used to detect the alert. */
8034 description?: string;
8035 /** description of the rule used to detect the alert. */
8036 full_description?: string;
8037 /** A set of tags applicable for the rule. */
8038 tags?: string[] | null;
8039 /** Detailed documentation for the rule as GitHub Flavored Markdown. */
8040 help?: string | null;
8041 };
8042 "code-scanning-alert": {
8043 number: components["schemas"]["alert-number"];
8044 created_at: components["schemas"]["alert-created-at"];
8045 url: components["schemas"]["alert-url"];
8046 html_url: components["schemas"]["alert-html-url"];
8047 instances?: { [key: string]: any };
8048 instances_url: components["schemas"]["alert-instances-url"];
8049 state: components["schemas"]["code-scanning-alert-state"];
8050 dismissed_by: components["schemas"]["simple-user"];
8051 dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"];
8052 dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"];
8053 rule: components["schemas"]["code-scanning-alert-rule"];
8054 tool: components["schemas"]["code-scanning-analysis-tool"];
8055 most_recent_instance: components["schemas"]["code-scanning-alert-instance"];
8056 };
8057 /** Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. */
8058 "code-scanning-alert-set-state": "open" | "dismissed";
8059 /** An identifier for the upload. */
8060 "code-scanning-analysis-sarif-id": string;
8061 /** The SHA of the commit to which the analysis you are uploading relates. */
8062 "code-scanning-analysis-commit-sha": string;
8063 /** Identifies the variable values associated with the environment in which this analysis was performed. */
8064 "code-scanning-analysis-environment": string;
8065 /** Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */
8066 "code-scanning-analysis-category": string;
8067 /** The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */
8068 "code-scanning-analysis-created-at": string;
8069 /** The REST API URL of the analysis resource. */
8070 "code-scanning-analysis-url": string;
8071 "code-scanning-analysis": {
8072 ref: components["schemas"]["code-scanning-ref"];
8073 commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"];
8074 analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"];
8075 environment: components["schemas"]["code-scanning-analysis-environment"];
8076 category?: components["schemas"]["code-scanning-analysis-category"];
8077 error: string;
8078 created_at: components["schemas"]["code-scanning-analysis-created-at"];
8079 /** The total number of results in the analysis. */
8080 results_count: number;
8081 /** The total number of rules used in the analysis. */
8082 rules_count: number;
8083 /** Unique identifier for this analysis. */
8084 id: number;
8085 url: components["schemas"]["code-scanning-analysis-url"];
8086 sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"];
8087 tool: components["schemas"]["code-scanning-analysis-tool"];
8088 deletable: boolean;
8089 /** Warning generated when processing the analysis */
8090 warning: string;
8091 tool_name?: string;
8092 };
8093 /** Successful deletion of a code scanning analysis */
8094 "code-scanning-analysis-deletion": {
8095 /** Next deletable analysis in chain, without last analysis deletion confirmation */
8096 next_analysis_url: string | null;
8097 /** Next deletable analysis in chain, with last analysis deletion confirmation */
8098 confirm_delete_url: string | null;
8099 };
8100 /** Scim Error */
8101 "scim-error": {
8102 message?: string | null;
8103 documentation_url?: string | null;
8104 detail?: string | null;
8105 status?: number;
8106 scimType?: string | null;
8107 schemas?: string[];
8108 };
8109 /** A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */
8110 "code-scanning-analysis-sarif-file": string;
8111 "code-scanning-sarifs-receipt": {
8112 id?: components["schemas"]["code-scanning-analysis-sarif-id"];
8113 /** The REST API URL for checking the status of the upload. */
8114 url?: string;
8115 };
8116 "code-scanning-sarifs-status": {
8117 /** `pending` files have not yet been processed, while `complete` means all results in the SARIF have been stored. */
8118 processing_status?: "pending" | "complete";
8119 /** The REST API URL for getting the analyses associated with the upload. */
8120 analyses_url?: string | null;
8121 };
8122 /** Collaborator */
8123 collaborator: {
8124 login: string;
8125 id: number;
8126 email?: string | null;
8127 name?: string | null;
8128 node_id: string;
8129 avatar_url: string;
8130 gravatar_id: string | null;
8131 url: string;
8132 html_url: string;
8133 followers_url: string;
8134 following_url: string;
8135 gists_url: string;
8136 starred_url: string;
8137 subscriptions_url: string;
8138 organizations_url: string;
8139 repos_url: string;
8140 events_url: string;
8141 received_events_url: string;
8142 type: string;
8143 site_admin: boolean;
8144 permissions?: {
8145 pull: boolean;
8146 push: boolean;
8147 admin: boolean;
8148 };
8149 };
8150 /** Repository invitations let you manage who you collaborate with. */
8151 "repository-invitation": {
8152 /** Unique identifier of the repository invitation. */
8153 id: number;
8154 repository: components["schemas"]["minimal-repository"];
8155 invitee: components["schemas"]["simple-user"] | null;
8156 inviter: components["schemas"]["simple-user"] | null;
8157 /** The permission associated with the invitation. */
8158 permissions: "read" | "write" | "admin" | "triage" | "maintain";
8159 created_at: string;
8160 /** Whether or not the invitation has expired */
8161 expired?: boolean;
8162 /** URL for the repository invitation */
8163 url: string;
8164 html_url: string;
8165 node_id: string;
8166 };
8167 /** Commit Comment */
8168 "commit-comment": {
8169 html_url: string;
8170 url: string;
8171 id: number;
8172 node_id: string;
8173 body: string;
8174 path: string | null;
8175 position: number | null;
8176 line: number | null;
8177 commit_id: string;
8178 user: components["schemas"]["simple-user"] | null;
8179 created_at: string;
8180 updated_at: string;
8181 author_association: components["schemas"]["author_association"];
8182 reactions?: components["schemas"]["reaction-rollup"];
8183 };
8184 /** Branch Short */
8185 "branch-short": {
8186 name: string;
8187 commit: {
8188 sha: string;
8189 url: string;
8190 };
8191 protected: boolean;
8192 };
8193 /** Hypermedia Link */
8194 link: {
8195 href: string;
8196 };
8197 /** The status of auto merging a pull request. */
8198 auto_merge: {
8199 enabled_by: components["schemas"]["simple-user"];
8200 /** The merge method to use. */
8201 merge_method: "merge" | "squash" | "rebase";
8202 /** Title for the merge commit message. */
8203 commit_title: string;
8204 /** Commit message for the merge commit. */
8205 commit_message: string;
8206 } | null;
8207 /** Pull Request Simple */
8208 "pull-request-simple": {
8209 url: string;
8210 id: number;
8211 node_id: string;
8212 html_url: string;
8213 diff_url: string;
8214 patch_url: string;
8215 issue_url: string;
8216 commits_url: string;
8217 review_comments_url: string;
8218 review_comment_url: string;
8219 comments_url: string;
8220 statuses_url: string;
8221 number: number;
8222 state: string;
8223 locked: boolean;
8224 title: string;
8225 user: components["schemas"]["simple-user"] | null;
8226 body: string | null;
8227 labels: {
8228 id?: number;
8229 node_id?: string;
8230 url?: string;
8231 name?: string;
8232 description?: string;
8233 color?: string;
8234 default?: boolean;
8235 }[];
8236 milestone: components["schemas"]["milestone"] | null;
8237 active_lock_reason?: string | null;
8238 created_at: string;
8239 updated_at: string;
8240 closed_at: string | null;
8241 merged_at: string | null;
8242 merge_commit_sha: string | null;
8243 assignee: components["schemas"]["simple-user"] | null;
8244 assignees?: components["schemas"]["simple-user"][] | null;
8245 requested_reviewers?: components["schemas"]["simple-user"][] | null;
8246 requested_teams?: components["schemas"]["team"][] | null;
8247 head: {
8248 label: string;
8249 ref: string;
8250 repo: components["schemas"]["repository"];
8251 sha: string;
8252 user: components["schemas"]["simple-user"] | null;
8253 };
8254 base: {
8255 label: string;
8256 ref: string;
8257 repo: components["schemas"]["repository"];
8258 sha: string;
8259 user: components["schemas"]["simple-user"] | null;
8260 };
8261 _links: {
8262 comments: components["schemas"]["link"];
8263 commits: components["schemas"]["link"];
8264 statuses: components["schemas"]["link"];
8265 html: components["schemas"]["link"];
8266 issue: components["schemas"]["link"];
8267 review_comments: components["schemas"]["link"];
8268 review_comment: components["schemas"]["link"];
8269 self: components["schemas"]["link"];
8270 };
8271 author_association: components["schemas"]["author_association"];
8272 auto_merge: components["schemas"]["auto_merge"];
8273 /** Indicates whether or not the pull request is a draft. */
8274 draft?: boolean;
8275 };
8276 "simple-commit-status": {
8277 description: string | null;
8278 id: number;
8279 node_id: string;
8280 state: string;
8281 context: string;
8282 target_url: string;
8283 required?: boolean | null;
8284 avatar_url: string | null;
8285 url: string;
8286 created_at: string;
8287 updated_at: string;
8288 };
8289 /** Combined Commit Status */
8290 "combined-commit-status": {
8291 state: string;
8292 statuses: components["schemas"]["simple-commit-status"][];
8293 sha: string;
8294 total_count: number;
8295 repository: components["schemas"]["minimal-repository"];
8296 commit_url: string;
8297 url: string;
8298 };
8299 /** The status of a commit. */
8300 status: {
8301 url: string;
8302 avatar_url: string | null;
8303 id: number;
8304 node_id: string;
8305 state: string;
8306 description: string;
8307 target_url: string;
8308 context: string;
8309 created_at: string;
8310 updated_at: string;
8311 creator: components["schemas"]["simple-user"];
8312 };
8313 "community-health-file": {
8314 url: string;
8315 html_url: string;
8316 };
8317 /** Community Profile */
8318 "community-profile": {
8319 health_percentage: number;
8320 description: string | null;
8321 documentation: string | null;
8322 files: {
8323 code_of_conduct: components["schemas"]["code-of-conduct-simple"] | null;
8324 code_of_conduct_file:
8325 | components["schemas"]["community-health-file"]
8326 | null;
8327 license: components["schemas"]["license-simple"] | null;
8328 contributing: components["schemas"]["community-health-file"] | null;
8329 readme: components["schemas"]["community-health-file"] | null;
8330 issue_template: components["schemas"]["community-health-file"] | null;
8331 pull_request_template:
8332 | components["schemas"]["community-health-file"]
8333 | null;
8334 };
8335 updated_at: string | null;
8336 content_reports_enabled?: boolean;
8337 };
8338 /** Diff Entry */
8339 "diff-entry": {
8340 sha: string;
8341 filename: string;
8342 status: string;
8343 additions: number;
8344 deletions: number;
8345 changes: number;
8346 blob_url: string;
8347 raw_url: string;
8348 contents_url: string;
8349 patch?: string;
8350 previous_filename?: string;
8351 };
8352 /** Commit Comparison */
8353 "commit-comparison": {
8354 url: string;
8355 html_url: string;
8356 permalink_url: string;
8357 diff_url: string;
8358 patch_url: string;
8359 base_commit: components["schemas"]["commit"];
8360 merge_base_commit: components["schemas"]["commit"];
8361 status: "diverged" | "ahead" | "behind" | "identical";
8362 ahead_by: number;
8363 behind_by: number;
8364 total_commits: number;
8365 commits: components["schemas"]["commit"][];
8366 files?: components["schemas"]["diff-entry"][];
8367 };
8368 /** Content Reference attachments allow you to provide context around URLs posted in comments */
8369 "content-reference-attachment": {
8370 /** The ID of the attachment */
8371 id: number;
8372 /** The title of the attachment */
8373 title: string;
8374 /** The body of the attachment */
8375 body: string;
8376 /** The node_id of the content attachment */
8377 node_id?: string;
8378 };
8379 /** Content Tree */
8380 "content-tree": {
8381 type: string;
8382 size: number;
8383 name: string;
8384 path: string;
8385 sha: string;
8386 url: string;
8387 git_url: string | null;
8388 html_url: string | null;
8389 download_url: string | null;
8390 entries?: {
8391 type: string;
8392 size: number;
8393 name: string;
8394 path: string;
8395 content?: string;
8396 sha: string;
8397 url: string;
8398 git_url: string | null;
8399 html_url: string | null;
8400 download_url: string | null;
8401 _links: {
8402 git: string | null;
8403 html: string | null;
8404 self: string;
8405 };
8406 }[];
8407 _links: {
8408 git: string | null;
8409 html: string | null;
8410 self: string;
8411 };
8412 };
8413 /** A list of directory items */
8414 "content-directory": {
8415 type: string;
8416 size: number;
8417 name: string;
8418 path: string;
8419 content?: string;
8420 sha: string;
8421 url: string;
8422 git_url: string | null;
8423 html_url: string | null;
8424 download_url: string | null;
8425 _links: {
8426 git: string | null;
8427 html: string | null;
8428 self: string;
8429 };
8430 }[];
8431 /** Content File */
8432 "content-file": {
8433 type: string;
8434 encoding: string;
8435 size: number;
8436 name: string;
8437 path: string;
8438 content: string;
8439 sha: string;
8440 url: string;
8441 git_url: string | null;
8442 html_url: string | null;
8443 download_url: string | null;
8444 _links: {
8445 git: string | null;
8446 html: string | null;
8447 self: string;
8448 };
8449 target?: string;
8450 submodule_git_url?: string;
8451 };
8452 /** An object describing a symlink */
8453 "content-symlink": {
8454 type: string;
8455 target: string;
8456 size: number;
8457 name: string;
8458 path: string;
8459 sha: string;
8460 url: string;
8461 git_url: string | null;
8462 html_url: string | null;
8463 download_url: string | null;
8464 _links: {
8465 git: string | null;
8466 html: string | null;
8467 self: string;
8468 };
8469 };
8470 /** An object describing a symlink */
8471 "content-submodule": {
8472 type: string;
8473 submodule_git_url: string;
8474 size: number;
8475 name: string;
8476 path: string;
8477 sha: string;
8478 url: string;
8479 git_url: string | null;
8480 html_url: string | null;
8481 download_url: string | null;
8482 _links: {
8483 git: string | null;
8484 html: string | null;
8485 self: string;
8486 };
8487 };
8488 /** File Commit */
8489 "file-commit": {
8490 content: {
8491 name?: string;
8492 path?: string;
8493 sha?: string;
8494 size?: number;
8495 url?: string;
8496 html_url?: string;
8497 git_url?: string;
8498 download_url?: string;
8499 type?: string;
8500 _links?: {
8501 self?: string;
8502 git?: string;
8503 html?: string;
8504 };
8505 } | null;
8506 commit: {
8507 sha?: string;
8508 node_id?: string;
8509 url?: string;
8510 html_url?: string;
8511 author?: {
8512 date?: string;
8513 name?: string;
8514 email?: string;
8515 };
8516 committer?: {
8517 date?: string;
8518 name?: string;
8519 email?: string;
8520 };
8521 message?: string;
8522 tree?: {
8523 url?: string;
8524 sha?: string;
8525 };
8526 parents?: {
8527 url?: string;
8528 html_url?: string;
8529 sha?: string;
8530 }[];
8531 verification?: {
8532 verified?: boolean;
8533 reason?: string;
8534 signature?: string | null;
8535 payload?: string | null;
8536 };
8537 };
8538 };
8539 /** Contributor */
8540 contributor: {
8541 login?: string;
8542 id?: number;
8543 node_id?: string;
8544 avatar_url?: string;
8545 gravatar_id?: string | null;
8546 url?: string;
8547 html_url?: string;
8548 followers_url?: string;
8549 following_url?: string;
8550 gists_url?: string;
8551 starred_url?: string;
8552 subscriptions_url?: string;
8553 organizations_url?: string;
8554 repos_url?: string;
8555 events_url?: string;
8556 received_events_url?: string;
8557 type: string;
8558 site_admin?: boolean;
8559 contributions: number;
8560 email?: string;
8561 name?: string;
8562 };
8563 /** The status of a deployment. */
8564 "deployment-status": {
8565 url: string;
8566 id: number;
8567 node_id: string;
8568 /** The state of the status. */
8569 state:
8570 | "error"
8571 | "failure"
8572 | "inactive"
8573 | "pending"
8574 | "success"
8575 | "queued"
8576 | "in_progress";
8577 creator: components["schemas"]["simple-user"] | null;
8578 /** A short description of the status. */
8579 description: string;
8580 /** The environment of the deployment that the status is for. */
8581 environment?: string;
8582 /** Deprecated: the URL to associate with this status. */
8583 target_url: string;
8584 created_at: string;
8585 updated_at: string;
8586 deployment_url: string;
8587 repository_url: string;
8588 /** The URL for accessing your environment. */
8589 environment_url?: string;
8590 /** The URL to associate with this status. */
8591 log_url?: string;
8592 performed_via_github_app?: components["schemas"]["integration"] | null;
8593 };
8594 /** The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). */
8595 "wait-timer": number;
8596 /** The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */
8597 deployment_branch_policy: {
8598 /** Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */
8599 protected_branches: boolean;
8600 /** Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */
8601 custom_branch_policies: boolean;
8602 } | null;
8603 /** Details of a deployment environment */
8604 environment: {
8605 /** The id of the environment. */
8606 id: number;
8607 node_id: string;
8608 /** The name of the environment. */
8609 name: string;
8610 url: string;
8611 html_url: string;
8612 /** The time that the environment was created, in ISO 8601 format. */
8613 created_at: string;
8614 /** The time that the environment was last updated, in ISO 8601 format. */
8615 updated_at: string;
8616 protection_rules?: (Partial<{
8617 id: number;
8618 node_id: string;
8619 type: string;
8620 wait_timer?: components["schemas"]["wait-timer"];
8621 }> &
8622 Partial<{
8623 id: number;
8624 node_id: string;
8625 type: string;
8626 /** The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */
8627 reviewers?: {
8628 type?: components["schemas"]["deployment-reviewer-type"];
8629 reviewer?: Partial<components["schemas"]["simple-user"]> &
8630 Partial<components["schemas"]["team"]>;
8631 }[];
8632 }> &
8633 Partial<{
8634 id: number;
8635 node_id: string;
8636 type: string;
8637 }>)[];
8638 deployment_branch_policy?: components["schemas"]["deployment_branch_policy"];
8639 };
8640 /** Short Blob */
8641 "short-blob": {
8642 url: string;
8643 sha: string;
8644 };
8645 /** Blob */
8646 blob: {
8647 content: string;
8648 encoding: string;
8649 url: string;
8650 sha: string;
8651 size: number | null;
8652 node_id: string;
8653 highlighted_content?: string;
8654 };
8655 /** Low-level Git commit operations within a repository */
8656 "git-commit": {
8657 /** SHA for the commit */
8658 sha: string;
8659 node_id: string;
8660 url: string;
8661 /** Identifying information for the git-user */
8662 author: {
8663 /** Timestamp of the commit */
8664 date: string;
8665 /** Git email address of the user */
8666 email: string;
8667 /** Name of the git user */
8668 name: string;
8669 };
8670 /** Identifying information for the git-user */
8671 committer: {
8672 /** Timestamp of the commit */
8673 date: string;
8674 /** Git email address of the user */
8675 email: string;
8676 /** Name of the git user */
8677 name: string;
8678 };
8679 /** Message describing the purpose of the commit */
8680 message: string;
8681 tree: {
8682 /** SHA for the commit */
8683 sha: string;
8684 url: string;
8685 };
8686 parents: {
8687 /** SHA for the commit */
8688 sha: string;
8689 url: string;
8690 html_url: string;
8691 }[];
8692 verification: {
8693 verified: boolean;
8694 reason: string;
8695 signature: string | null;
8696 payload: string | null;
8697 };
8698 html_url: string;
8699 };
8700 /** Git references within a repository */
8701 "git-ref": {
8702 ref: string;
8703 node_id: string;
8704 url: string;
8705 object: {
8706 type: string;
8707 /** SHA for the reference */
8708 sha: string;
8709 url: string;
8710 };
8711 };
8712 /** Metadata for a Git tag */
8713 "git-tag": {
8714 node_id: string;
8715 /** Name of the tag */
8716 tag: string;
8717 sha: string;
8718 /** URL for the tag */
8719 url: string;
8720 /** Message describing the purpose of the tag */
8721 message: string;
8722 tagger: {
8723 date: string;
8724 email: string;
8725 name: string;
8726 };
8727 object: {
8728 sha: string;
8729 type: string;
8730 url: string;
8731 };
8732 verification?: components["schemas"]["verification"];
8733 };
8734 /** The hierarchy between files in a Git repository. */
8735 "git-tree": {
8736 sha: string;
8737 url: string;
8738 truncated: boolean;
8739 /** Objects specifying a tree structure */
8740 tree: {
8741 path?: string;
8742 mode?: string;
8743 type?: string;
8744 sha?: string;
8745 size?: number;
8746 url?: string;
8747 }[];
8748 };
8749 "hook-response": {
8750 code: number | null;
8751 status: string | null;
8752 message: string | null;
8753 };
8754 /** Webhooks for repositories. */
8755 hook: {
8756 type: string;
8757 /** Unique identifier of the webhook. */
8758 id: number;
8759 /** The name of a valid service, use 'web' for a webhook. */
8760 name: string;
8761 /** Determines whether the hook is actually triggered on pushes. */
8762 active: boolean;
8763 /** Determines what events the hook is triggered for. Default: ['push']. */
8764 events: string[];
8765 config: {
8766 email?: string;
8767 password?: string;
8768 room?: string;
8769 subdomain?: string;
8770 url?: components["schemas"]["webhook-config-url"];
8771 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
8772 content_type?: components["schemas"]["webhook-config-content-type"];
8773 digest?: string;
8774 secret?: components["schemas"]["webhook-config-secret"];
8775 token?: string;
8776 };
8777 updated_at: string;
8778 created_at: string;
8779 url: string;
8780 test_url: string;
8781 ping_url: string;
8782 last_response: components["schemas"]["hook-response"];
8783 };
8784 /** A repository import from an external source. */
8785 import: {
8786 vcs: string | null;
8787 use_lfs?: boolean;
8788 /** The URL of the originating repository. */
8789 vcs_url: string;
8790 svc_root?: string;
8791 tfvc_project?: string;
8792 status:
8793 | "auth"
8794 | "error"
8795 | "none"
8796 | "detecting"
8797 | "choose"
8798 | "auth_failed"
8799 | "importing"
8800 | "mapping"
8801 | "waiting_to_push"
8802 | "pushing"
8803 | "complete"
8804 | "setup"
8805 | "unknown"
8806 | "detection_found_multiple"
8807 | "detection_found_nothing"
8808 | "detection_needs_auth";
8809 status_text?: string | null;
8810 failed_step?: string | null;
8811 error_message?: string | null;
8812 import_percent?: number | null;
8813 commit_count?: number | null;
8814 push_percent?: number | null;
8815 has_large_files?: boolean;
8816 large_files_size?: number;
8817 large_files_count?: number;
8818 project_choices?: {
8819 vcs?: string;
8820 tfvc_project?: string;
8821 human_name?: string;
8822 }[];
8823 message?: string;
8824 authors_count?: number | null;
8825 url: string;
8826 html_url: string;
8827 authors_url: string;
8828 repository_url: string;
8829 svn_root?: string;
8830 };
8831 /** Porter Author */
8832 "porter-author": {
8833 id: number;
8834 remote_id: string;
8835 remote_name: string;
8836 email: string;
8837 name: string;
8838 url: string;
8839 import_url: string;
8840 };
8841 /** Porter Large File */
8842 "porter-large-file": {
8843 ref_name: string;
8844 path: string;
8845 oid: string;
8846 size: number;
8847 };
8848 /** Issue Event Label */
8849 "issue-event-label": {
8850 name: string | null;
8851 color: string | null;
8852 };
8853 "issue-event-dismissed-review": {
8854 state: string;
8855 review_id: number;
8856 dismissal_message: string | null;
8857 dismissal_commit_id?: string | null;
8858 };
8859 /** Issue Event Milestone */
8860 "issue-event-milestone": {
8861 title: string;
8862 };
8863 /** Issue Event Project Card */
8864 "issue-event-project-card": {
8865 url: string;
8866 id: number;
8867 project_url: string;
8868 project_id: number;
8869 column_name: string;
8870 previous_column_name?: string;
8871 };
8872 /** Issue Event Rename */
8873 "issue-event-rename": {
8874 from: string;
8875 to: string;
8876 };
8877 /** Issue Event */
8878 "issue-event": {
8879 id: number;
8880 node_id: string;
8881 url: string;
8882 actor: components["schemas"]["simple-user"] | null;
8883 event: string;
8884 commit_id: string | null;
8885 commit_url: string | null;
8886 created_at: string;
8887 issue?: components["schemas"]["issue-simple"];
8888 label?: components["schemas"]["issue-event-label"];
8889 assignee?: components["schemas"]["simple-user"] | null;
8890 assigner?: components["schemas"]["simple-user"] | null;
8891 review_requester?: components["schemas"]["simple-user"] | null;
8892 requested_reviewer?: components["schemas"]["simple-user"] | null;
8893 requested_team?: components["schemas"]["team"];
8894 dismissed_review?: components["schemas"]["issue-event-dismissed-review"];
8895 milestone?: components["schemas"]["issue-event-milestone"];
8896 project_card?: components["schemas"]["issue-event-project-card"];
8897 rename?: components["schemas"]["issue-event-rename"];
8898 author_association?: components["schemas"]["author_association"];
8899 lock_reason?: string | null;
8900 performed_via_github_app?: components["schemas"]["integration"] | null;
8901 };
8902 /** Labeled Issue Event */
8903 "labeled-issue-event": {
8904 id: number;
8905 node_id: string;
8906 url: string;
8907 actor: components["schemas"]["simple-user"];
8908 event: string;
8909 commit_id: string | null;
8910 commit_url: string | null;
8911 created_at: string;
8912 performed_via_github_app: components["schemas"]["integration"];
8913 label: {
8914 name: string;
8915 color: string;
8916 };
8917 };
8918 /** Unlabeled Issue Event */
8919 "unlabeled-issue-event": {
8920 id: number;
8921 node_id: string;
8922 url: string;
8923 actor: components["schemas"]["simple-user"];
8924 event: string;
8925 commit_id: string | null;
8926 commit_url: string | null;
8927 created_at: string;
8928 performed_via_github_app: components["schemas"]["integration"];
8929 label: {
8930 name: string;
8931 color: string;
8932 };
8933 };
8934 /** Assigned Issue Event */
8935 "assigned-issue-event": {
8936 id: number;
8937 node_id: string;
8938 url: string;
8939 actor: components["schemas"]["simple-user"];
8940 event: string;
8941 commit_id: string | null;
8942 commit_url: string | null;
8943 created_at: string;
8944 performed_via_github_app: components["schemas"]["integration"];
8945 assignee: components["schemas"]["simple-user"];
8946 assigner: components["schemas"]["simple-user"];
8947 };
8948 /** Unassigned Issue Event */
8949 "unassigned-issue-event": {
8950 id: number;
8951 node_id: string;
8952 url: string;
8953 actor: components["schemas"]["simple-user"];
8954 event: string;
8955 commit_id: string | null;
8956 commit_url: string | null;
8957 created_at: string;
8958 performed_via_github_app: components["schemas"]["integration"];
8959 assignee: components["schemas"]["simple-user"];
8960 assigner: components["schemas"]["simple-user"];
8961 };
8962 /** Milestoned Issue Event */
8963 "milestoned-issue-event": {
8964 id: number;
8965 node_id: string;
8966 url: string;
8967 actor: components["schemas"]["simple-user"];
8968 event: string;
8969 commit_id: string | null;
8970 commit_url: string | null;
8971 created_at: string;
8972 performed_via_github_app: components["schemas"]["integration"];
8973 milestone: {
8974 title: string;
8975 };
8976 };
8977 /** Demilestoned Issue Event */
8978 "demilestoned-issue-event": {
8979 id: number;
8980 node_id: string;
8981 url: string;
8982 actor: components["schemas"]["simple-user"];
8983 event: string;
8984 commit_id: string | null;
8985 commit_url: string | null;
8986 created_at: string;
8987 performed_via_github_app: components["schemas"]["integration"];
8988 milestone: {
8989 title: string;
8990 };
8991 };
8992 /** Renamed Issue Event */
8993 "renamed-issue-event": {
8994 id: number;
8995 node_id: string;
8996 url: string;
8997 actor: components["schemas"]["simple-user"];
8998 event: string;
8999 commit_id: string | null;
9000 commit_url: string | null;
9001 created_at: string;
9002 performed_via_github_app: components["schemas"]["integration"];
9003 rename: {
9004 from: string;
9005 to: string;
9006 };
9007 };
9008 /** Review Requested Issue Event */
9009 "review-requested-issue-event": {
9010 id: number;
9011 node_id: string;
9012 url: string;
9013 actor: components["schemas"]["simple-user"];
9014 event: string;
9015 commit_id: string | null;
9016 commit_url: string | null;
9017 created_at: string;
9018 performed_via_github_app: components["schemas"]["integration"];
9019 review_requester: components["schemas"]["simple-user"];
9020 requested_team?: components["schemas"]["team"];
9021 requested_reviewer?: components["schemas"]["simple-user"];
9022 };
9023 /** Review Request Removed Issue Event */
9024 "review-request-removed-issue-event": {
9025 id: number;
9026 node_id: string;
9027 url: string;
9028 actor: components["schemas"]["simple-user"];
9029 event: string;
9030 commit_id: string | null;
9031 commit_url: string | null;
9032 created_at: string;
9033 performed_via_github_app: components["schemas"]["integration"];
9034 review_requester: components["schemas"]["simple-user"];
9035 requested_team?: components["schemas"]["team"];
9036 requested_reviewer?: components["schemas"]["simple-user"];
9037 };
9038 /** Review Dismissed Issue Event */
9039 "review-dismissed-issue-event": {
9040 id: number;
9041 node_id: string;
9042 url: string;
9043 actor: components["schemas"]["simple-user"];
9044 event: string;
9045 commit_id: string | null;
9046 commit_url: string | null;
9047 created_at: string;
9048 performed_via_github_app: components["schemas"]["integration"];
9049 dismissed_review: {
9050 state: string;
9051 review_id: number;
9052 dismissal_message: string | null;
9053 dismissal_commit_id?: string;
9054 };
9055 };
9056 /** Locked Issue Event */
9057 "locked-issue-event": {
9058 id: number;
9059 node_id: string;
9060 url: string;
9061 actor: components["schemas"]["simple-user"];
9062 event: string;
9063 commit_id: string | null;
9064 commit_url: string | null;
9065 created_at: string;
9066 performed_via_github_app: components["schemas"]["integration"];
9067 lock_reason: string | null;
9068 };
9069 /** Added to Project Issue Event */
9070 "added-to-project-issue-event": {
9071 id: number;
9072 node_id: string;
9073 url: string;
9074 actor: components["schemas"]["simple-user"];
9075 event: string;
9076 commit_id: string | null;
9077 commit_url: string | null;
9078 created_at: string;
9079 performed_via_github_app: components["schemas"]["integration"];
9080 project_card?: {
9081 id: number;
9082 url: string;
9083 project_id: number;
9084 project_url: string;
9085 column_name: string;
9086 previous_column_name?: string;
9087 };
9088 };
9089 /** Moved Column in Project Issue Event */
9090 "moved-column-in-project-issue-event": {
9091 id: number;
9092 node_id: string;
9093 url: string;
9094 actor: components["schemas"]["simple-user"];
9095 event: string;
9096 commit_id: string | null;
9097 commit_url: string | null;
9098 created_at: string;
9099 performed_via_github_app: components["schemas"]["integration"];
9100 project_card?: {
9101 id: number;
9102 url: string;
9103 project_id: number;
9104 project_url: string;
9105 column_name: string;
9106 previous_column_name?: string;
9107 };
9108 };
9109 /** Removed from Project Issue Event */
9110 "removed-from-project-issue-event": {
9111 id: number;
9112 node_id: string;
9113 url: string;
9114 actor: components["schemas"]["simple-user"];
9115 event: string;
9116 commit_id: string | null;
9117 commit_url: string | null;
9118 created_at: string;
9119 performed_via_github_app: components["schemas"]["integration"];
9120 project_card?: {
9121 id: number;
9122 url: string;
9123 project_id: number;
9124 project_url: string;
9125 column_name: string;
9126 previous_column_name?: string;
9127 };
9128 };
9129 /** Converted Note to Issue Issue Event */
9130 "converted-note-to-issue-issue-event": {
9131 id: number;
9132 node_id: string;
9133 url: string;
9134 actor: components["schemas"]["simple-user"];
9135 event: string;
9136 commit_id: string | null;
9137 commit_url: string | null;
9138 created_at: string;
9139 performed_via_github_app: components["schemas"]["integration"];
9140 project_card?: {
9141 id: number;
9142 url: string;
9143 project_id: number;
9144 project_url: string;
9145 column_name: string;
9146 previous_column_name?: string;
9147 };
9148 };
9149 /** Issue Event for Issue */
9150 "issue-event-for-issue": Partial<
9151 components["schemas"]["labeled-issue-event"]
9152 > &
9153 Partial<components["schemas"]["unlabeled-issue-event"]> &
9154 Partial<components["schemas"]["assigned-issue-event"]> &
9155 Partial<components["schemas"]["unassigned-issue-event"]> &
9156 Partial<components["schemas"]["milestoned-issue-event"]> &
9157 Partial<components["schemas"]["demilestoned-issue-event"]> &
9158 Partial<components["schemas"]["renamed-issue-event"]> &
9159 Partial<components["schemas"]["review-requested-issue-event"]> &
9160 Partial<components["schemas"]["review-request-removed-issue-event"]> &
9161 Partial<components["schemas"]["review-dismissed-issue-event"]> &
9162 Partial<components["schemas"]["locked-issue-event"]> &
9163 Partial<components["schemas"]["added-to-project-issue-event"]> &
9164 Partial<components["schemas"]["moved-column-in-project-issue-event"]> &
9165 Partial<components["schemas"]["removed-from-project-issue-event"]> &
9166 Partial<components["schemas"]["converted-note-to-issue-issue-event"]>;
9167 /** Timeline Comment Event */
9168 "timeline-comment-event": {
9169 event: string;
9170 actor: components["schemas"]["simple-user"];
9171 /** Unique identifier of the issue comment */
9172 id: number;
9173 node_id: string;
9174 /** URL for the issue comment */
9175 url: string;
9176 /** Contents of the issue comment */
9177 body?: string;
9178 body_text?: string;
9179 body_html?: string;
9180 html_url: string;
9181 user: components["schemas"]["simple-user"];
9182 created_at: string;
9183 updated_at: string;
9184 issue_url: string;
9185 author_association: components["schemas"]["author_association"];
9186 performed_via_github_app?: components["schemas"]["integration"];
9187 reactions?: components["schemas"]["reaction-rollup"];
9188 };
9189 /** Timeline Cross Referenced Event */
9190 "timeline-cross-referenced-event": {
9191 event: string;
9192 actor?: components["schemas"]["simple-user"];
9193 created_at: string;
9194 updated_at: string;
9195 source: {
9196 type?: string;
9197 issue?: components["schemas"]["issue-simple"];
9198 };
9199 };
9200 /** Timeline Committed Event */
9201 "timeline-committed-event": {
9202 event?: string;
9203 /** SHA for the commit */
9204 sha: string;
9205 node_id: string;
9206 url: string;
9207 /** Identifying information for the git-user */
9208 author: {
9209 /** Timestamp of the commit */
9210 date: string;
9211 /** Git email address of the user */
9212 email: string;
9213 /** Name of the git user */
9214 name: string;
9215 };
9216 /** Identifying information for the git-user */
9217 committer: {
9218 /** Timestamp of the commit */
9219 date: string;
9220 /** Git email address of the user */
9221 email: string;
9222 /** Name of the git user */
9223 name: string;
9224 };
9225 /** Message describing the purpose of the commit */
9226 message: string;
9227 tree: {
9228 /** SHA for the commit */
9229 sha: string;
9230 url: string;
9231 };
9232 parents: {
9233 /** SHA for the commit */
9234 sha: string;
9235 url: string;
9236 html_url: string;
9237 }[];
9238 verification: {
9239 verified: boolean;
9240 reason: string;
9241 signature: string | null;
9242 payload: string | null;
9243 };
9244 html_url: string;
9245 };
9246 /** Timeline Reviewed Event */
9247 "timeline-reviewed-event": {
9248 event: string;
9249 /** Unique identifier of the review */
9250 id: number;
9251 node_id: string;
9252 user: components["schemas"]["simple-user"];
9253 /** The text of the review. */
9254 body: string | null;
9255 state: string;
9256 html_url: string;
9257 pull_request_url: string;
9258 _links: {
9259 html: {
9260 href: string;
9261 };
9262 pull_request: {
9263 href: string;
9264 };
9265 };
9266 submitted_at?: string;
9267 /** A commit SHA for the review. */
9268 commit_id: string;
9269 body_html?: string;
9270 body_text?: string;
9271 author_association: components["schemas"]["author_association"];
9272 };
9273 /** Pull Request Review Comments are comments on a portion of the Pull Request's diff. */
9274 "pull-request-review-comment": {
9275 /** URL for the pull request review comment */
9276 url: string;
9277 /** The ID of the pull request review to which the comment belongs. */
9278 pull_request_review_id: number | null;
9279 /** The ID of the pull request review comment. */
9280 id: number;
9281 /** The node ID of the pull request review comment. */
9282 node_id: string;
9283 /** The diff of the line that the comment refers to. */
9284 diff_hunk: string;
9285 /** The relative path of the file to which the comment applies. */
9286 path: string;
9287 /** The line index in the diff to which the comment applies. */
9288 position: number;
9289 /** The index of the original line in the diff to which the comment applies. */
9290 original_position: number;
9291 /** The SHA of the commit to which the comment applies. */
9292 commit_id: string;
9293 /** The SHA of the original commit to which the comment applies. */
9294 original_commit_id: string;
9295 /** The comment ID to reply to. */
9296 in_reply_to_id?: number;
9297 user: components["schemas"]["simple-user"];
9298 /** The text of the comment. */
9299 body: string;
9300 created_at: string;
9301 updated_at: string;
9302 /** HTML URL for the pull request review comment. */
9303 html_url: string;
9304 /** URL for the pull request that the review comment belongs to. */
9305 pull_request_url: string;
9306 author_association: components["schemas"]["author_association"];
9307 _links: {
9308 self: {
9309 href: string;
9310 };
9311 html: {
9312 href: string;
9313 };
9314 pull_request: {
9315 href: string;
9316 };
9317 };
9318 /** The first line of the range for a multi-line comment. */
9319 start_line?: number | null;
9320 /** The first line of the range for a multi-line comment. */
9321 original_start_line?: number | null;
9322 /** The side of the first line of the range for a multi-line comment. */
9323 start_side?: ("LEFT" | "RIGHT") | null;
9324 /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */
9325 line?: number;
9326 /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */
9327 original_line?: number;
9328 /** The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment */
9329 side?: "LEFT" | "RIGHT";
9330 reactions?: components["schemas"]["reaction-rollup"];
9331 body_html?: string;
9332 body_text?: string;
9333 };
9334 /** Timeline Line Commented Event */
9335 "timeline-line-commented-event": {
9336 event?: string;
9337 node_id?: string;
9338 comments?: components["schemas"]["pull-request-review-comment"][];
9339 };
9340 /** Timeline Commit Commented Event */
9341 "timeline-commit-commented-event": {
9342 event?: string;
9343 node_id?: string;
9344 commit_id?: string;
9345 comments?: components["schemas"]["commit-comment"][];
9346 };
9347 /** Timeline Assigned Issue Event */
9348 "timeline-assigned-issue-event": {
9349 id: number;
9350 node_id: string;
9351 url: string;
9352 actor: components["schemas"]["simple-user"];
9353 event: string;
9354 commit_id: string | null;
9355 commit_url: string | null;
9356 created_at: string;
9357 performed_via_github_app: components["schemas"]["integration"];
9358 assignee: components["schemas"]["simple-user"];
9359 };
9360 /** Timeline Unassigned Issue Event */
9361 "timeline-unassigned-issue-event": {
9362 id: number;
9363 node_id: string;
9364 url: string;
9365 actor: components["schemas"]["simple-user"];
9366 event: string;
9367 commit_id: string | null;
9368 commit_url: string | null;
9369 created_at: string;
9370 performed_via_github_app: components["schemas"]["integration"];
9371 assignee: components["schemas"]["simple-user"];
9372 };
9373 /** Timeline Event */
9374 "timeline-issue-events": Partial<
9375 components["schemas"]["labeled-issue-event"]
9376 > &
9377 Partial<components["schemas"]["unlabeled-issue-event"]> &
9378 Partial<components["schemas"]["milestoned-issue-event"]> &
9379 Partial<components["schemas"]["demilestoned-issue-event"]> &
9380 Partial<components["schemas"]["renamed-issue-event"]> &
9381 Partial<components["schemas"]["review-requested-issue-event"]> &
9382 Partial<components["schemas"]["review-request-removed-issue-event"]> &
9383 Partial<components["schemas"]["review-dismissed-issue-event"]> &
9384 Partial<components["schemas"]["locked-issue-event"]> &
9385 Partial<components["schemas"]["added-to-project-issue-event"]> &
9386 Partial<components["schemas"]["moved-column-in-project-issue-event"]> &
9387 Partial<components["schemas"]["removed-from-project-issue-event"]> &
9388 Partial<components["schemas"]["converted-note-to-issue-issue-event"]> &
9389 Partial<components["schemas"]["timeline-comment-event"]> &
9390 Partial<components["schemas"]["timeline-cross-referenced-event"]> &
9391 Partial<components["schemas"]["timeline-committed-event"]> &
9392 Partial<components["schemas"]["timeline-reviewed-event"]> &
9393 Partial<components["schemas"]["timeline-line-commented-event"]> &
9394 Partial<components["schemas"]["timeline-commit-commented-event"]> &
9395 Partial<components["schemas"]["timeline-assigned-issue-event"]> &
9396 Partial<components["schemas"]["timeline-unassigned-issue-event"]>;
9397 /** An SSH key granting access to a single repository. */
9398 "deploy-key": {
9399 id: number;
9400 key: string;
9401 url: string;
9402 title: string;
9403 verified: boolean;
9404 created_at: string;
9405 read_only: boolean;
9406 };
9407 /** Language */
9408 language: { [key: string]: number };
9409 /** License Content */
9410 "license-content": {
9411 name: string;
9412 path: string;
9413 sha: string;
9414 size: number;
9415 url: string;
9416 html_url: string | null;
9417 git_url: string | null;
9418 download_url: string | null;
9419 type: string;
9420 content: string;
9421 encoding: string;
9422 _links: {
9423 git: string | null;
9424 html: string | null;
9425 self: string;
9426 };
9427 license: components["schemas"]["license-simple"] | null;
9428 };
9429 "pages-source-hash": {
9430 branch: string;
9431 path: string;
9432 };
9433 "pages-https-certificate": {
9434 state:
9435 | "new"
9436 | "authorization_created"
9437 | "authorization_pending"
9438 | "authorized"
9439 | "authorization_revoked"
9440 | "issued"
9441 | "uploaded"
9442 | "approved"
9443 | "errored"
9444 | "bad_authz"
9445 | "destroy_pending"
9446 | "dns_changed";
9447 description: string;
9448 /** Array of the domain set and its alternate name (if it is configured) */
9449 domains: any[];
9450 expires_at?: string;
9451 };
9452 /** The configuration for GitHub Pages for a repository. */
9453 page: {
9454 /** The API address for accessing this Page resource. */
9455 url: string;
9456 /** The status of the most recent build of the Page. */
9457 status: ("built" | "building" | "errored") | null;
9458 /** The Pages site's custom domain */
9459 cname: string | null;
9460 /** Whether the Page has a custom 404 page. */
9461 custom_404: boolean;
9462 /** The web address the Page can be accessed from. */
9463 html_url?: string;
9464 source?: components["schemas"]["pages-source-hash"];
9465 /** Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. */
9466 public: boolean;
9467 https_certificate?: components["schemas"]["pages-https-certificate"];
9468 /** Whether https is enabled on the domain */
9469 https_enforced?: boolean;
9470 };
9471 /** Page Build */
9472 "page-build": {
9473 url: string;
9474 status: string;
9475 error: {
9476 message: string | null;
9477 };
9478 pusher: components["schemas"]["simple-user"] | null;
9479 commit: string;
9480 duration: number;
9481 created_at: string;
9482 updated_at: string;
9483 };
9484 /** Page Build Status */
9485 "page-build-status": {
9486 url: string;
9487 status: string;
9488 };
9489 /** Pages Health Check Status */
9490 "pages-health-check": {
9491 domain?: {
9492 host?: string;
9493 uri?: string;
9494 nameservers?: string;
9495 dns_resolves?: boolean;
9496 is_proxied?: boolean | null;
9497 is_cloudflare_ip?: boolean | null;
9498 is_fastly_ip?: boolean | null;
9499 is_old_ip_address?: boolean | null;
9500 is_a_record?: boolean | null;
9501 has_cname_record?: boolean | null;
9502 has_mx_records_present?: boolean | null;
9503 is_valid_domain?: boolean;
9504 is_apex_domain?: boolean;
9505 should_be_a_record?: boolean | null;
9506 is_cname_to_github_user_domain?: boolean | null;
9507 is_cname_to_pages_dot_github_dot_com?: boolean | null;
9508 is_cname_to_fastly?: boolean | null;
9509 is_pointed_to_github_pages_ip?: boolean | null;
9510 is_non_github_pages_ip_present?: boolean | null;
9511 is_pages_domain?: boolean;
9512 is_served_by_pages?: boolean | null;
9513 is_valid?: boolean;
9514 reason?: string | null;
9515 responds_to_https?: boolean;
9516 enforces_https?: boolean;
9517 https_error?: string | null;
9518 is_https_eligible?: boolean | null;
9519 caa_error?: string | null;
9520 };
9521 alt_domain?: {
9522 host?: string;
9523 uri?: string;
9524 nameservers?: string;
9525 dns_resolves?: boolean;
9526 is_proxied?: boolean | null;
9527 is_cloudflare_ip?: boolean | null;
9528 is_fastly_ip?: boolean | null;
9529 is_old_ip_address?: boolean | null;
9530 is_a_record?: boolean | null;
9531 has_cname_record?: boolean | null;
9532 has_mx_records_present?: boolean | null;
9533 is_valid_domain?: boolean;
9534 is_apex_domain?: boolean;
9535 should_be_a_record?: boolean | null;
9536 is_cname_to_github_user_domain?: boolean | null;
9537 is_cname_to_pages_dot_github_dot_com?: boolean | null;
9538 is_cname_to_fastly?: boolean | null;
9539 is_pointed_to_github_pages_ip?: boolean | null;
9540 is_non_github_pages_ip_present?: boolean | null;
9541 is_pages_domain?: boolean;
9542 is_served_by_pages?: boolean | null;
9543 is_valid?: boolean;
9544 reason?: string | null;
9545 responds_to_https?: boolean;
9546 enforces_https?: boolean;
9547 https_error?: string | null;
9548 is_https_eligible?: boolean | null;
9549 caa_error?: string | null;
9550 } | null;
9551 };
9552 /** Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. */
9553 "pull-request": {
9554 url: string;
9555 id: number;
9556 node_id: string;
9557 html_url: string;
9558 diff_url: string;
9559 patch_url: string;
9560 issue_url: string;
9561 commits_url: string;
9562 review_comments_url: string;
9563 review_comment_url: string;
9564 comments_url: string;
9565 statuses_url: string;
9566 /** Number uniquely identifying the pull request within its repository. */
9567 number: number;
9568 /** State of this Pull Request. Either `open` or `closed`. */
9569 state: "open" | "closed";
9570 locked: boolean;
9571 /** The title of the pull request. */
9572 title: string;
9573 user: components["schemas"]["simple-user"] | null;
9574 body: string | null;
9575 labels: {
9576 id?: number;
9577 node_id?: string;
9578 url?: string;
9579 name?: string;
9580 description?: string | null;
9581 color?: string;
9582 default?: boolean;
9583 }[];
9584 milestone: components["schemas"]["milestone"] | null;
9585 active_lock_reason?: string | null;
9586 created_at: string;
9587 updated_at: string;
9588 closed_at: string | null;
9589 merged_at: string | null;
9590 merge_commit_sha: string | null;
9591 assignee: components["schemas"]["simple-user"] | null;
9592 assignees?: components["schemas"]["simple-user"][] | null;
9593 requested_reviewers?: components["schemas"]["simple-user"][] | null;
9594 requested_teams?: components["schemas"]["team-simple"][] | null;
9595 head: {
9596 label: string;
9597 ref: string;
9598 repo: {
9599 archive_url: string;
9600 assignees_url: string;
9601 blobs_url: string;
9602 branches_url: string;
9603 collaborators_url: string;
9604 comments_url: string;
9605 commits_url: string;
9606 compare_url: string;
9607 contents_url: string;
9608 contributors_url: string;
9609 deployments_url: string;
9610 description: string | null;
9611 downloads_url: string;
9612 events_url: string;
9613 fork: boolean;
9614 forks_url: string;
9615 full_name: string;
9616 git_commits_url: string;
9617 git_refs_url: string;
9618 git_tags_url: string;
9619 hooks_url: string;
9620 html_url: string;
9621 id: number;
9622 node_id: string;
9623 issue_comment_url: string;
9624 issue_events_url: string;
9625 issues_url: string;
9626 keys_url: string;
9627 labels_url: string;
9628 languages_url: string;
9629 merges_url: string;
9630 milestones_url: string;
9631 name: string;
9632 notifications_url: string;
9633 owner: {
9634 avatar_url: string;
9635 events_url: string;
9636 followers_url: string;
9637 following_url: string;
9638 gists_url: string;
9639 gravatar_id: string | null;
9640 html_url: string;
9641 id: number;
9642 node_id: string;
9643 login: string;
9644 organizations_url: string;
9645 received_events_url: string;
9646 repos_url: string;
9647 site_admin: boolean;
9648 starred_url: string;
9649 subscriptions_url: string;
9650 type: string;
9651 url: string;
9652 };
9653 private: boolean;
9654 pulls_url: string;
9655 releases_url: string;
9656 stargazers_url: string;
9657 statuses_url: string;
9658 subscribers_url: string;
9659 subscription_url: string;
9660 tags_url: string;
9661 teams_url: string;
9662 trees_url: string;
9663 url: string;
9664 clone_url: string;
9665 default_branch: string;
9666 forks: number;
9667 forks_count: number;
9668 git_url: string;
9669 has_downloads: boolean;
9670 has_issues: boolean;
9671 has_projects: boolean;
9672 has_wiki: boolean;
9673 has_pages: boolean;
9674 homepage: string | null;
9675 language: string | null;
9676 master_branch?: string;
9677 archived: boolean;
9678 disabled: boolean;
9679 mirror_url: string | null;
9680 open_issues: number;
9681 open_issues_count: number;
9682 permissions?: {
9683 admin: boolean;
9684 pull: boolean;
9685 push: boolean;
9686 };
9687 temp_clone_token?: string;
9688 allow_merge_commit?: boolean;
9689 allow_squash_merge?: boolean;
9690 allow_rebase_merge?: boolean;
9691 license: {
9692 key: string;
9693 name: string;
9694 url: string | null;
9695 spdx_id: string | null;
9696 node_id: string;
9697 } | null;
9698 pushed_at: string;
9699 size: number;
9700 ssh_url: string;
9701 stargazers_count: number;
9702 svn_url: string;
9703 topics?: string[];
9704 watchers: number;
9705 watchers_count: number;
9706 created_at: string;
9707 updated_at: string;
9708 };
9709 sha: string;
9710 user: {
9711 avatar_url: string;
9712 events_url: string;
9713 followers_url: string;
9714 following_url: string;
9715 gists_url: string;
9716 gravatar_id: string | null;
9717 html_url: string;
9718 id: number;
9719 node_id: string;
9720 login: string;
9721 organizations_url: string;
9722 received_events_url: string;
9723 repos_url: string;
9724 site_admin: boolean;
9725 starred_url: string;
9726 subscriptions_url: string;
9727 type: string;
9728 url: string;
9729 };
9730 };
9731 base: {
9732 label: string;
9733 ref: string;
9734 repo: {
9735 archive_url: string;
9736 assignees_url: string;
9737 blobs_url: string;
9738 branches_url: string;
9739 collaborators_url: string;
9740 comments_url: string;
9741 commits_url: string;
9742 compare_url: string;
9743 contents_url: string;
9744 contributors_url: string;
9745 deployments_url: string;
9746 description: string | null;
9747 downloads_url: string;
9748 events_url: string;
9749 fork: boolean;
9750 forks_url: string;
9751 full_name: string;
9752 git_commits_url: string;
9753 git_refs_url: string;
9754 git_tags_url: string;
9755 hooks_url: string;
9756 html_url: string;
9757 id: number;
9758 node_id: string;
9759 issue_comment_url: string;
9760 issue_events_url: string;
9761 issues_url: string;
9762 keys_url: string;
9763 labels_url: string;
9764 languages_url: string;
9765 merges_url: string;
9766 milestones_url: string;
9767 name: string;
9768 notifications_url: string;
9769 owner: {
9770 avatar_url: string;
9771 events_url: string;
9772 followers_url: string;
9773 following_url: string;
9774 gists_url: string;
9775 gravatar_id: string | null;
9776 html_url: string;
9777 id: number;
9778 node_id: string;
9779 login: string;
9780 organizations_url: string;
9781 received_events_url: string;
9782 repos_url: string;
9783 site_admin: boolean;
9784 starred_url: string;
9785 subscriptions_url: string;
9786 type: string;
9787 url: string;
9788 };
9789 private: boolean;
9790 pulls_url: string;
9791 releases_url: string;
9792 stargazers_url: string;
9793 statuses_url: string;
9794 subscribers_url: string;
9795 subscription_url: string;
9796 tags_url: string;
9797 teams_url: string;
9798 trees_url: string;
9799 url: string;
9800 clone_url: string;
9801 default_branch: string;
9802 forks: number;
9803 forks_count: number;
9804 git_url: string;
9805 has_downloads: boolean;
9806 has_issues: boolean;
9807 has_projects: boolean;
9808 has_wiki: boolean;
9809 has_pages: boolean;
9810 homepage: string | null;
9811 language: string | null;
9812 master_branch?: string;
9813 archived: boolean;
9814 disabled: boolean;
9815 mirror_url: string | null;
9816 open_issues: number;
9817 open_issues_count: number;
9818 permissions?: {
9819 admin: boolean;
9820 pull: boolean;
9821 push: boolean;
9822 };
9823 temp_clone_token?: string;
9824 allow_merge_commit?: boolean;
9825 allow_squash_merge?: boolean;
9826 allow_rebase_merge?: boolean;
9827 license: components["schemas"]["license-simple"] | null;
9828 pushed_at: string;
9829 size: number;
9830 ssh_url: string;
9831 stargazers_count: number;
9832 svn_url: string;
9833 topics?: string[];
9834 watchers: number;
9835 watchers_count: number;
9836 created_at: string;
9837 updated_at: string;
9838 };
9839 sha: string;
9840 user: {
9841 avatar_url: string;
9842 events_url: string;
9843 followers_url: string;
9844 following_url: string;
9845 gists_url: string;
9846 gravatar_id: string | null;
9847 html_url: string;
9848 id: number;
9849 node_id: string;
9850 login: string;
9851 organizations_url: string;
9852 received_events_url: string;
9853 repos_url: string;
9854 site_admin: boolean;
9855 starred_url: string;
9856 subscriptions_url: string;
9857 type: string;
9858 url: string;
9859 };
9860 };
9861 _links: {
9862 comments: components["schemas"]["link"];
9863 commits: components["schemas"]["link"];
9864 statuses: components["schemas"]["link"];
9865 html: components["schemas"]["link"];
9866 issue: components["schemas"]["link"];
9867 review_comments: components["schemas"]["link"];
9868 review_comment: components["schemas"]["link"];
9869 self: components["schemas"]["link"];
9870 };
9871 author_association: components["schemas"]["author_association"];
9872 auto_merge: components["schemas"]["auto_merge"];
9873 /** Indicates whether or not the pull request is a draft. */
9874 draft?: boolean;
9875 merged: boolean;
9876 mergeable: boolean | null;
9877 rebaseable?: boolean | null;
9878 mergeable_state: string;
9879 merged_by: components["schemas"]["simple-user"] | null;
9880 comments: number;
9881 review_comments: number;
9882 /** Indicates whether maintainers can modify the pull request. */
9883 maintainer_can_modify: boolean;
9884 commits: number;
9885 additions: number;
9886 deletions: number;
9887 changed_files: number;
9888 };
9889 /** Pull Request Merge Result */
9890 "pull-request-merge-result": {
9891 sha: string;
9892 merged: boolean;
9893 message: string;
9894 };
9895 /** Pull Request Review Request */
9896 "pull-request-review-request": {
9897 users: components["schemas"]["simple-user"][];
9898 teams: components["schemas"]["team"][];
9899 };
9900 /** Pull Request Reviews are reviews on pull requests. */
9901 "pull-request-review": {
9902 /** Unique identifier of the review */
9903 id: number;
9904 node_id: string;
9905 user: components["schemas"]["simple-user"] | null;
9906 /** The text of the review. */
9907 body: string;
9908 state: string;
9909 html_url: string;
9910 pull_request_url: string;
9911 _links: {
9912 html: {
9913 href: string;
9914 };
9915 pull_request: {
9916 href: string;
9917 };
9918 };
9919 submitted_at?: string;
9920 /** A commit SHA for the review. */
9921 commit_id: string;
9922 body_html?: string;
9923 body_text?: string;
9924 author_association: components["schemas"]["author_association"];
9925 };
9926 /** Legacy Review Comment */
9927 "review-comment": {
9928 url: string;
9929 pull_request_review_id: number | null;
9930 id: number;
9931 node_id: string;
9932 diff_hunk: string;
9933 path: string;
9934 position: number | null;
9935 original_position: number;
9936 commit_id: string;
9937 original_commit_id: string;
9938 in_reply_to_id?: number;
9939 user: components["schemas"]["simple-user"] | null;
9940 body: string;
9941 created_at: string;
9942 updated_at: string;
9943 html_url: string;
9944 pull_request_url: string;
9945 author_association: components["schemas"]["author_association"];
9946 _links: {
9947 self: components["schemas"]["link"];
9948 html: components["schemas"]["link"];
9949 pull_request: components["schemas"]["link"];
9950 };
9951 body_text?: string;
9952 body_html?: string;
9953 reactions?: components["schemas"]["reaction-rollup"];
9954 /** The side of the first line of the range for a multi-line comment. */
9955 side?: "LEFT" | "RIGHT";
9956 /** The side of the first line of the range for a multi-line comment. */
9957 start_side?: ("LEFT" | "RIGHT") | null;
9958 /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */
9959 line?: number;
9960 /** The original line of the blob to which the comment applies. The last line of the range for a multi-line comment */
9961 original_line?: number;
9962 /** The first line of the range for a multi-line comment. */
9963 start_line?: number | null;
9964 /** The original first line of the range for a multi-line comment. */
9965 original_start_line?: number | null;
9966 };
9967 /** Data related to a release. */
9968 "release-asset": {
9969 url: string;
9970 browser_download_url: string;
9971 id: number;
9972 node_id: string;
9973 /** The file name of the asset. */
9974 name: string;
9975 label: string | null;
9976 /** State of the release asset. */
9977 state: "uploaded" | "open";
9978 content_type: string;
9979 size: number;
9980 download_count: number;
9981 created_at: string;
9982 updated_at: string;
9983 uploader: components["schemas"]["simple-user"] | null;
9984 };
9985 /** A release. */
9986 release: {
9987 url: string;
9988 html_url: string;
9989 assets_url: string;
9990 upload_url: string;
9991 tarball_url: string | null;
9992 zipball_url: string | null;
9993 id: number;
9994 node_id: string;
9995 /** The name of the tag. */
9996 tag_name: string;
9997 /** Specifies the commitish value that determines where the Git tag is created from. */
9998 target_commitish: string;
9999 name: string | null;
10000 body?: string | null;
10001 /** true to create a draft (unpublished) release, false to create a published one. */
10002 draft: boolean;
10003 /** Whether to identify the release as a prerelease or a full release. */
10004 prerelease: boolean;
10005 created_at: string;
10006 published_at: string | null;
10007 author: components["schemas"]["simple-user"];
10008 assets: components["schemas"]["release-asset"][];
10009 body_html?: string;
10010 body_text?: string;
10011 /** The URL of the release discussion. */
10012 discussion_url?: string;
10013 reactions?: components["schemas"]["reaction-rollup"];
10014 };
10015 /** Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. */
10016 "secret-scanning-alert-state": "open" | "resolved";
10017 /** **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. */
10018 "secret-scanning-alert-resolution":
10019 | ("false_positive" | "wont_fix" | "revoked" | "used_in_tests")
10020 | null;
10021 "secret-scanning-alert": {
10022 number?: components["schemas"]["alert-number"];
10023 created_at?: components["schemas"]["alert-created-at"];
10024 url?: components["schemas"]["alert-url"];
10025 html_url?: components["schemas"]["alert-html-url"];
10026 state?: components["schemas"]["secret-scanning-alert-state"];
10027 resolution?: components["schemas"]["secret-scanning-alert-resolution"];
10028 /** The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */
10029 resolved_at?: string | null;
10030 resolved_by?: components["schemas"]["simple-user"];
10031 /** The type of secret that secret scanning detected. */
10032 secret_type?: string;
10033 /** The secret that was detected. */
10034 secret?: string;
10035 };
10036 /** Stargazer */
10037 stargazer: {
10038 starred_at: string;
10039 user: components["schemas"]["simple-user"] | null;
10040 };
10041 /** Code Frequency Stat */
10042 "code-frequency-stat": number[];
10043 /** Commit Activity */
10044 "commit-activity": {
10045 days: number[];
10046 total: number;
10047 week: number;
10048 };
10049 /** Contributor Activity */
10050 "contributor-activity": {
10051 author: components["schemas"]["simple-user"] | null;
10052 total: number;
10053 weeks: {
10054 w?: number;
10055 a?: number;
10056 d?: number;
10057 c?: number;
10058 }[];
10059 };
10060 "participation-stats": {
10061 all: number[];
10062 owner: number[];
10063 };
10064 /** Repository invitations let you manage who you collaborate with. */
10065 "repository-subscription": {
10066 /** Determines if notifications should be received from this repository. */
10067 subscribed: boolean;
10068 /** Determines if all notifications should be blocked from this repository. */
10069 ignored: boolean;
10070 reason: string | null;
10071 created_at: string;
10072 url: string;
10073 repository_url: string;
10074 };
10075 /** Tag */
10076 tag: {
10077 name: string;
10078 commit: {
10079 sha: string;
10080 url: string;
10081 };
10082 zipball_url: string;
10083 tarball_url: string;
10084 node_id: string;
10085 };
10086 /** A topic aggregates entities that are related to a subject. */
10087 topic: {
10088 names: string[];
10089 };
10090 traffic: {
10091 timestamp: string;
10092 uniques: number;
10093 count: number;
10094 };
10095 /** Clone Traffic */
10096 "clone-traffic": {
10097 count: number;
10098 uniques: number;
10099 clones: components["schemas"]["traffic"][];
10100 };
10101 /** Content Traffic */
10102 "content-traffic": {
10103 path: string;
10104 title: string;
10105 count: number;
10106 uniques: number;
10107 };
10108 /** Referrer Traffic */
10109 "referrer-traffic": {
10110 referrer: string;
10111 count: number;
10112 uniques: number;
10113 };
10114 /** View Traffic */
10115 "view-traffic": {
10116 count: number;
10117 uniques: number;
10118 views: components["schemas"]["traffic"][];
10119 };
10120 "scim-group-list-enterprise": {
10121 schemas: string[];
10122 totalResults: number;
10123 itemsPerPage: number;
10124 startIndex: number;
10125 Resources: {
10126 schemas: string[];
10127 id: string;
10128 externalId?: string | null;
10129 displayName?: string;
10130 members?: {
10131 value?: string;
10132 $ref?: string;
10133 display?: string;
10134 }[];
10135 meta?: {
10136 resourceType?: string;
10137 created?: string;
10138 lastModified?: string;
10139 location?: string;
10140 };
10141 }[];
10142 };
10143 "scim-enterprise-group": {
10144 schemas: string[];
10145 id: string;
10146 externalId?: string | null;
10147 displayName?: string;
10148 members?: {
10149 value?: string;
10150 $ref?: string;
10151 display?: string;
10152 }[];
10153 meta?: {
10154 resourceType?: string;
10155 created?: string;
10156 lastModified?: string;
10157 location?: string;
10158 };
10159 };
10160 "scim-user-list-enterprise": {
10161 schemas: string[];
10162 totalResults: number;
10163 itemsPerPage: number;
10164 startIndex: number;
10165 Resources: {
10166 schemas: string[];
10167 id: string;
10168 externalId?: string;
10169 userName?: string;
10170 name?: {
10171 givenName?: string;
10172 familyName?: string;
10173 };
10174 emails?: {
10175 value?: string;
10176 primary?: boolean;
10177 type?: string;
10178 }[];
10179 groups?: {
10180 value?: string;
10181 }[];
10182 active?: boolean;
10183 meta?: {
10184 resourceType?: string;
10185 created?: string;
10186 lastModified?: string;
10187 location?: string;
10188 };
10189 }[];
10190 };
10191 "scim-enterprise-user": {
10192 schemas: string[];
10193 id: string;
10194 externalId?: string;
10195 userName?: string;
10196 name?: {
10197 givenName?: string;
10198 familyName?: string;
10199 };
10200 emails?: {
10201 value?: string;
10202 type?: string;
10203 primary?: boolean;
10204 }[];
10205 groups?: {
10206 value?: string;
10207 }[];
10208 active?: boolean;
10209 meta?: {
10210 resourceType?: string;
10211 created?: string;
10212 lastModified?: string;
10213 location?: string;
10214 };
10215 };
10216 /** SCIM /Users provisioning endpoints */
10217 "scim-user": {
10218 /** SCIM schema used. */
10219 schemas: string[];
10220 /** Unique identifier of an external identity */
10221 id: string;
10222 /** The ID of the User. */
10223 externalId: string | null;
10224 /** Configured by the admin. Could be an email, login, or username */
10225 userName: string | null;
10226 /** The name of the user, suitable for display to end-users */
10227 displayName?: string | null;
10228 name: {
10229 givenName: string | null;
10230 familyName: string | null;
10231 formatted?: string | null;
10232 };
10233 /** user emails */
10234 emails: {
10235 value: string;
10236 primary?: boolean;
10237 }[];
10238 /** The active status of the User. */
10239 active: boolean;
10240 meta: {
10241 resourceType?: string;
10242 created?: string;
10243 lastModified?: string;
10244 location?: string;
10245 };
10246 /** The ID of the organization. */
10247 organization_id?: number;
10248 /** Set of operations to be performed */
10249 operations?: {
10250 op: "add" | "remove" | "replace";
10251 path?: string;
10252 value?: string | { [key: string]: any } | { [key: string]: any }[];
10253 }[];
10254 /** associated groups */
10255 groups?: {
10256 value?: string;
10257 display?: string;
10258 }[];
10259 };
10260 /** SCIM User List */
10261 "scim-user-list": {
10262 /** SCIM schema used. */
10263 schemas: string[];
10264 totalResults: number;
10265 itemsPerPage: number;
10266 startIndex: number;
10267 Resources: components["schemas"]["scim-user"][];
10268 };
10269 "search-result-text-matches": {
10270 object_url?: string;
10271 object_type?: string | null;
10272 property?: string;
10273 fragment?: string;
10274 matches?: {
10275 text?: string;
10276 indices?: number[];
10277 }[];
10278 }[];
10279 /** Code Search Result Item */
10280 "code-search-result-item": {
10281 name: string;
10282 path: string;
10283 sha: string;
10284 url: string;
10285 git_url: string;
10286 html_url: string;
10287 repository: components["schemas"]["minimal-repository"];
10288 score: number;
10289 file_size?: number;
10290 language?: string | null;
10291 last_modified_at?: string;
10292 line_numbers?: string[];
10293 text_matches?: components["schemas"]["search-result-text-matches"];
10294 };
10295 /** Commit Search Result Item */
10296 "commit-search-result-item": {
10297 url: string;
10298 sha: string;
10299 html_url: string;
10300 comments_url: string;
10301 commit: {
10302 author: {
10303 name: string;
10304 email: string;
10305 date: string;
10306 };
10307 committer: components["schemas"]["git-user"] | null;
10308 comment_count: number;
10309 message: string;
10310 tree: {
10311 sha: string;
10312 url: string;
10313 };
10314 url: string;
10315 verification?: components["schemas"]["verification"];
10316 };
10317 author: components["schemas"]["simple-user"] | null;
10318 committer: components["schemas"]["git-user"] | null;
10319 parents: {
10320 url?: string;
10321 html_url?: string;
10322 sha?: string;
10323 }[];
10324 repository: components["schemas"]["minimal-repository"];
10325 score: number;
10326 node_id: string;
10327 text_matches?: components["schemas"]["search-result-text-matches"];
10328 };
10329 /** Issue Search Result Item */
10330 "issue-search-result-item": {
10331 url: string;
10332 repository_url: string;
10333 labels_url: string;
10334 comments_url: string;
10335 events_url: string;
10336 html_url: string;
10337 id: number;
10338 node_id: string;
10339 number: number;
10340 title: string;
10341 locked: boolean;
10342 active_lock_reason?: string | null;
10343 assignees?: components["schemas"]["simple-user"][] | null;
10344 user: components["schemas"]["simple-user"] | null;
10345 labels: {
10346 id?: number;
10347 node_id?: string;
10348 url?: string;
10349 name?: string;
10350 color?: string;
10351 default?: boolean;
10352 description?: string | null;
10353 }[];
10354 state: string;
10355 assignee: components["schemas"]["simple-user"] | null;
10356 milestone: components["schemas"]["milestone"] | null;
10357 comments: number;
10358 created_at: string;
10359 updated_at: string;
10360 closed_at: string | null;
10361 text_matches?: components["schemas"]["search-result-text-matches"];
10362 pull_request?: {
10363 merged_at?: string | null;
10364 diff_url: string | null;
10365 html_url: string | null;
10366 patch_url: string | null;
10367 url: string | null;
10368 };
10369 body?: string;
10370 score: number;
10371 author_association: components["schemas"]["author_association"];
10372 draft?: boolean;
10373 repository?: components["schemas"]["repository"];
10374 body_html?: string;
10375 body_text?: string;
10376 timeline_url?: string;
10377 performed_via_github_app?: components["schemas"]["integration"] | null;
10378 };
10379 /** Label Search Result Item */
10380 "label-search-result-item": {
10381 id: number;
10382 node_id: string;
10383 url: string;
10384 name: string;
10385 color: string;
10386 default: boolean;
10387 description: string | null;
10388 score: number;
10389 text_matches?: components["schemas"]["search-result-text-matches"];
10390 };
10391 /** Repo Search Result Item */
10392 "repo-search-result-item": {
10393 id: number;
10394 node_id: string;
10395 name: string;
10396 full_name: string;
10397 owner: components["schemas"]["simple-user"] | null;
10398 private: boolean;
10399 html_url: string;
10400 description: string | null;
10401 fork: boolean;
10402 url: string;
10403 created_at: string;
10404 updated_at: string;
10405 pushed_at: string;
10406 homepage: string | null;
10407 size: number;
10408 stargazers_count: number;
10409 watchers_count: number;
10410 language: string | null;
10411 forks_count: number;
10412 open_issues_count: number;
10413 master_branch?: string;
10414 default_branch: string;
10415 score: number;
10416 forks_url: string;
10417 keys_url: string;
10418 collaborators_url: string;
10419 teams_url: string;
10420 hooks_url: string;
10421 issue_events_url: string;
10422 events_url: string;
10423 assignees_url: string;
10424 branches_url: string;
10425 tags_url: string;
10426 blobs_url: string;
10427 git_tags_url: string;
10428 git_refs_url: string;
10429 trees_url: string;
10430 statuses_url: string;
10431 languages_url: string;
10432 stargazers_url: string;
10433 contributors_url: string;
10434 subscribers_url: string;
10435 subscription_url: string;
10436 commits_url: string;
10437 git_commits_url: string;
10438 comments_url: string;
10439 issue_comment_url: string;
10440 contents_url: string;
10441 compare_url: string;
10442 merges_url: string;
10443 archive_url: string;
10444 downloads_url: string;
10445 issues_url: string;
10446 pulls_url: string;
10447 milestones_url: string;
10448 notifications_url: string;
10449 labels_url: string;
10450 releases_url: string;
10451 deployments_url: string;
10452 git_url: string;
10453 ssh_url: string;
10454 clone_url: string;
10455 svn_url: string;
10456 forks: number;
10457 open_issues: number;
10458 watchers: number;
10459 topics?: string[];
10460 mirror_url: string | null;
10461 has_issues: boolean;
10462 has_projects: boolean;
10463 has_pages: boolean;
10464 has_wiki: boolean;
10465 has_downloads: boolean;
10466 archived: boolean;
10467 /** Returns whether or not this repository disabled. */
10468 disabled: boolean;
10469 license: components["schemas"]["license-simple"] | null;
10470 permissions?: {
10471 admin: boolean;
10472 pull: boolean;
10473 push: boolean;
10474 };
10475 text_matches?: components["schemas"]["search-result-text-matches"];
10476 temp_clone_token?: string;
10477 allow_merge_commit?: boolean;
10478 allow_squash_merge?: boolean;
10479 allow_rebase_merge?: boolean;
10480 delete_branch_on_merge?: boolean;
10481 };
10482 /** Topic Search Result Item */
10483 "topic-search-result-item": {
10484 name: string;
10485 display_name: string | null;
10486 short_description: string | null;
10487 description: string | null;
10488 created_by: string | null;
10489 released: string | null;
10490 created_at: string;
10491 updated_at: string;
10492 featured: boolean;
10493 curated: boolean;
10494 score: number;
10495 repository_count?: number | null;
10496 logo_url?: string | null;
10497 text_matches?: components["schemas"]["search-result-text-matches"];
10498 related?:
10499 | {
10500 topic_relation?: {
10501 id?: number;
10502 name?: string;
10503 topic_id?: number;
10504 relation_type?: string;
10505 };
10506 }[]
10507 | null;
10508 aliases?:
10509 | {
10510 topic_relation?: {
10511 id?: number;
10512 name?: string;
10513 topic_id?: number;
10514 relation_type?: string;
10515 };
10516 }[]
10517 | null;
10518 };
10519 /** User Search Result Item */
10520 "user-search-result-item": {
10521 login: string;
10522 id: number;
10523 node_id: string;
10524 avatar_url: string;
10525 gravatar_id: string | null;
10526 url: string;
10527 html_url: string;
10528 followers_url: string;
10529 subscriptions_url: string;
10530 organizations_url: string;
10531 repos_url: string;
10532 received_events_url: string;
10533 type: string;
10534 score: number;
10535 following_url: string;
10536 gists_url: string;
10537 starred_url: string;
10538 events_url: string;
10539 public_repos?: number;
10540 public_gists?: number;
10541 followers?: number;
10542 following?: number;
10543 created_at?: string;
10544 updated_at?: string;
10545 name?: string | null;
10546 bio?: string | null;
10547 email?: string | null;
10548 location?: string | null;
10549 site_admin: boolean;
10550 hireable?: boolean | null;
10551 text_matches?: components["schemas"]["search-result-text-matches"];
10552 blog?: string | null;
10553 company?: string | null;
10554 suspended_at?: string | null;
10555 };
10556 /** Private User */
10557 "private-user": {
10558 login: string;
10559 id: number;
10560 node_id: string;
10561 avatar_url: string;
10562 gravatar_id: string | null;
10563 url: string;
10564 html_url: string;
10565 followers_url: string;
10566 following_url: string;
10567 gists_url: string;
10568 starred_url: string;
10569 subscriptions_url: string;
10570 organizations_url: string;
10571 repos_url: string;
10572 events_url: string;
10573 received_events_url: string;
10574 type: string;
10575 site_admin: boolean;
10576 name: string | null;
10577 company: string | null;
10578 blog: string | null;
10579 location: string | null;
10580 email: string | null;
10581 hireable: boolean | null;
10582 bio: string | null;
10583 twitter_username?: string | null;
10584 public_repos: number;
10585 public_gists: number;
10586 followers: number;
10587 following: number;
10588 created_at: string;
10589 updated_at: string;
10590 private_gists: number;
10591 total_private_repos: number;
10592 owned_private_repos: number;
10593 disk_usage: number;
10594 collaborators: number;
10595 two_factor_authentication: boolean;
10596 plan?: {
10597 collaborators: number;
10598 name: string;
10599 space: number;
10600 private_repos: number;
10601 };
10602 suspended_at?: string | null;
10603 business_plus?: boolean;
10604 ldap_dn?: string;
10605 };
10606 /** Email */
10607 email: {
10608 email: string;
10609 primary: boolean;
10610 verified: boolean;
10611 visibility: string | null;
10612 };
10613 /** A unique encryption key */
10614 "gpg-key": {
10615 id: number;
10616 primary_key_id: number | null;
10617 key_id: string;
10618 public_key: string;
10619 emails: {
10620 email?: string;
10621 verified?: boolean;
10622 }[];
10623 subkeys: {
10624 id?: number;
10625 primary_key_id?: number;
10626 key_id?: string;
10627 public_key?: string;
10628 emails?: { [key: string]: any }[];
10629 subkeys?: { [key: string]: any }[];
10630 can_sign?: boolean;
10631 can_encrypt_comms?: boolean;
10632 can_encrypt_storage?: boolean;
10633 can_certify?: boolean;
10634 created_at?: string;
10635 expires_at?: string | null;
10636 raw_key?: string | null;
10637 }[];
10638 can_sign: boolean;
10639 can_encrypt_comms: boolean;
10640 can_encrypt_storage: boolean;
10641 can_certify: boolean;
10642 created_at: string;
10643 expires_at: string | null;
10644 raw_key: string | null;
10645 };
10646 /** Key */
10647 key: {
10648 key: string;
10649 id: number;
10650 url: string;
10651 title: string;
10652 created_at: string;
10653 verified: boolean;
10654 read_only: boolean;
10655 };
10656 "marketplace-account": {
10657 url: string;
10658 id: number;
10659 type: string;
10660 node_id?: string;
10661 login: string;
10662 email?: string | null;
10663 organization_billing_email?: string | null;
10664 };
10665 /** User Marketplace Purchase */
10666 "user-marketplace-purchase": {
10667 billing_cycle: string;
10668 next_billing_date: string | null;
10669 unit_count: number | null;
10670 on_free_trial: boolean;
10671 free_trial_ends_on: string | null;
10672 updated_at: string | null;
10673 account: components["schemas"]["marketplace-account"];
10674 plan: components["schemas"]["marketplace-listing-plan"];
10675 };
10676 /** Starred Repository */
10677 "starred-repository": {
10678 starred_at: string;
10679 repo: components["schemas"]["repository"];
10680 };
10681 /** Hovercard */
10682 hovercard: {
10683 contexts: {
10684 message: string;
10685 octicon: string;
10686 }[];
10687 };
10688 /** Key Simple */
10689 "key-simple": {
10690 id: number;
10691 key: string;
10692 };
10693 };
10694 responses: {
10695 /** Resource not found */
10696 not_found: {
10697 content: {
10698 "application/json": components["schemas"]["basic-error"];
10699 };
10700 };
10701 /** Validation failed */
10702 validation_failed_simple: {
10703 content: {
10704 "application/json": components["schemas"]["validation-error-simple"];
10705 };
10706 };
10707 /** Preview header missing */
10708 preview_header_missing: {
10709 content: {
10710 "application/json": {
10711 message: string;
10712 documentation_url: string;
10713 };
10714 };
10715 };
10716 /** Forbidden */
10717 forbidden: {
10718 content: {
10719 "application/json": components["schemas"]["basic-error"];
10720 };
10721 };
10722 /** Requires authentication */
10723 requires_authentication: {
10724 content: {
10725 "application/json": components["schemas"]["basic-error"];
10726 };
10727 };
10728 /** Validation failed */
10729 validation_failed: {
10730 content: {
10731 "application/json": components["schemas"]["validation-error"];
10732 };
10733 };
10734 /** Not modified */
10735 not_modified: unknown;
10736 /** Gone */
10737 gone: {
10738 content: {
10739 "application/json": components["schemas"]["basic-error"];
10740 };
10741 };
10742 /** Service unavailable */
10743 service_unavailable: {
10744 content: {
10745 "application/json": {
10746 code?: string;
10747 message?: string;
10748 documentation_url?: string;
10749 };
10750 };
10751 };
10752 /** Forbidden Gist */
10753 forbidden_gist: {
10754 content: {
10755 "application/json": {
10756 block?: {
10757 reason?: string;
10758 created_at?: string;
10759 html_url?: string | null;
10760 };
10761 message?: string;
10762 documentation_url?: string;
10763 };
10764 };
10765 };
10766 /** Moved permanently */
10767 moved_permanently: {
10768 content: {
10769 "application/json": components["schemas"]["basic-error"];
10770 };
10771 };
10772 /** Conflict */
10773 conflict: {
10774 content: {
10775 "application/json": components["schemas"]["basic-error"];
10776 };
10777 };
10778 /** Temporary Redirect */
10779 temporary_redirect: {
10780 content: {
10781 "application/json": components["schemas"]["basic-error"];
10782 };
10783 };
10784 /** Response if GitHub Advanced Security is not enabled for this repository */
10785 code_scanning_forbidden_read: {
10786 content: {
10787 "application/json": components["schemas"]["basic-error"];
10788 };
10789 };
10790 /** Response if the repository is archived or if github advanced security is not enabled for this repository */
10791 code_scanning_forbidden_write: {
10792 content: {
10793 "application/json": components["schemas"]["basic-error"];
10794 };
10795 };
10796 /** Bad Request */
10797 bad_request: {
10798 content: {
10799 "application/json": components["schemas"]["basic-error"];
10800 "application/scim+json": components["schemas"]["scim-error"];
10801 };
10802 };
10803 /** Internal Error */
10804 internal_error: {
10805 content: {
10806 "application/json": components["schemas"]["basic-error"];
10807 };
10808 };
10809 /** Found */
10810 found: unknown;
10811 /** Accepted */
10812 accepted: {
10813 content: {
10814 "application/json": { [key: string]: any };
10815 };
10816 };
10817 /** A header with no content is returned. */
10818 no_content: unknown;
10819 /** Resource not found */
10820 scim_not_found: {
10821 content: {
10822 "application/json": components["schemas"]["scim-error"];
10823 "application/scim+json": components["schemas"]["scim-error"];
10824 };
10825 };
10826 /** Forbidden */
10827 scim_forbidden: {
10828 content: {
10829 "application/json": components["schemas"]["scim-error"];
10830 "application/scim+json": components["schemas"]["scim-error"];
10831 };
10832 };
10833 /** Bad Request */
10834 scim_bad_request: {
10835 content: {
10836 "application/json": components["schemas"]["scim-error"];
10837 "application/scim+json": components["schemas"]["scim-error"];
10838 };
10839 };
10840 /** Internal Error */
10841 scim_internal_error: {
10842 content: {
10843 "application/json": components["schemas"]["scim-error"];
10844 "application/scim+json": components["schemas"]["scim-error"];
10845 };
10846 };
10847 /** Conflict */
10848 scim_conflict: {
10849 content: {
10850 "application/json": components["schemas"]["scim-error"];
10851 "application/scim+json": components["schemas"]["scim-error"];
10852 };
10853 };
10854 };
10855 parameters: {
10856 /** Results per page (max 100). */
10857 per_page: number;
10858 /** Page number of the results to fetch. */
10859 page: number;
10860 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
10861 since: string;
10862 /** installation_id parameter */
10863 installation_id: number;
10864 /** grant_id parameter */
10865 grant_id: number;
10866 /** The client ID of your GitHub app. */
10867 "client-id": string;
10868 "access-token": string;
10869 app_slug: string;
10870 /** authorization_id parameter */
10871 authorization_id: number;
10872 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
10873 enterprise: string;
10874 /** Unique identifier of an organization. */
10875 org_id: number;
10876 /** Unique identifier of the self-hosted runner group. */
10877 runner_group_id: number;
10878 /** Unique identifier of the self-hosted runner. */
10879 runner_id: number;
10880 /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */
10881 "audit-log-phrase": string;
10882 /**
10883 * The event types to include:
10884 *
10885 * - `web` - returns web (non-Git) events
10886 * - `git` - returns Git events
10887 * - `all` - returns both web and Git events
10888 *
10889 * The default is `web`.
10890 */
10891 "audit-log-include": "web" | "git" | "all";
10892 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */
10893 "audit-log-after": string;
10894 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
10895 "audit-log-before": string;
10896 /**
10897 * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
10898 *
10899 * The default is `desc`.
10900 */
10901 "audit-log-order": "desc" | "asc";
10902 /** gist_id parameter */
10903 gist_id: string;
10904 /** comment_id parameter */
10905 comment_id: number;
10906 /** A list of comma separated label names. Example: `bug,ui,@high` */
10907 labels: string;
10908 /** One of `asc` (ascending) or `desc` (descending). */
10909 direction: "asc" | "desc";
10910 /** account_id parameter */
10911 account_id: number;
10912 /** plan_id parameter */
10913 plan_id: number;
10914 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
10915 sort: "created" | "updated";
10916 owner: string;
10917 repo: string;
10918 /** If `true`, show notifications marked as read. */
10919 all: boolean;
10920 /** If `true`, only shows notifications in which the user is directly participating or mentioned. */
10921 participating: boolean;
10922 /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
10923 before: string;
10924 /** thread_id parameter */
10925 thread_id: number;
10926 /** An organization ID. Only return organizations with an ID greater than this ID. */
10927 "since-org": number;
10928 org: string;
10929 repository_id: number;
10930 /** secret_name parameter */
10931 secret_name: string;
10932 username: string;
10933 "hook-id": number;
10934 /** invitation_id parameter */
10935 invitation_id: number;
10936 /** migration_id parameter */
10937 migration_id: number;
10938 /** repo_name parameter */
10939 repo_name: string;
10940 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
10941 package_type:
10942 | "npm"
10943 | "maven"
10944 | "rubygems"
10945 | "docker"
10946 | "nuget"
10947 | "container";
10948 /** The name of the package. */
10949 package_name: string;
10950 /** Unique identifier of the package version. */
10951 package_version_id: number;
10952 /** team_slug parameter */
10953 team_slug: string;
10954 "discussion-number": number;
10955 "comment-number": number;
10956 "reaction-id": number;
10957 "project-id": number;
10958 /** card_id parameter */
10959 card_id: number;
10960 /** column_id parameter */
10961 column_id: number;
10962 /** artifact_id parameter */
10963 artifact_id: number;
10964 /** job_id parameter */
10965 job_id: number;
10966 /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */
10967 actor: string;
10968 /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */
10969 "workflow-run-branch": string;
10970 /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */
10971 event: string;
10972 /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */
10973 "workflow-run-status":
10974 | "completed"
10975 | "action_required"
10976 | "cancelled"
10977 | "failure"
10978 | "neutral"
10979 | "skipped"
10980 | "stale"
10981 | "success"
10982 | "timed_out"
10983 | "in_progress"
10984 | "queued"
10985 | "requested"
10986 | "waiting";
10987 /** The id of the workflow run. */
10988 "run-id": number;
10989 /** The ID of the workflow. You can also pass the workflow file name as a string. */
10990 "workflow-id": number | string;
10991 /** The name of the branch. */
10992 branch: string;
10993 /** check_run_id parameter */
10994 check_run_id: number;
10995 /** check_suite_id parameter */
10996 check_suite_id: number;
10997 /** Returns check runs with the specified `name`. */
10998 check_name: string;
10999 /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */
11000 status: "queued" | "in_progress" | "completed";
11001 /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */
11002 tool_name: components["schemas"]["code-scanning-analysis-tool-name"];
11003 /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */
11004 tool_guid: components["schemas"]["code-scanning-analysis-tool-guid"];
11005 /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. */
11006 git_ref: components["schemas"]["code-scanning-ref"];
11007 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
11008 alert_number: components["schemas"]["alert-number"];
11009 /** commit_sha parameter */
11010 commit_sha: string;
11011 /** Results per page (max 100) */
11012 "per-page": number;
11013 /** deployment_id parameter */
11014 deployment_id: number;
11015 /** The name of the environment */
11016 environment_name: string;
11017 /** A user ID. Only return users with an ID greater than this ID. */
11018 "since-user": number;
11019 /** issue_number parameter */
11020 issue_number: number;
11021 /** key_id parameter */
11022 key_id: number;
11023 /** milestone_number parameter */
11024 milestone_number: number;
11025 "pull-number": number;
11026 /** review_id parameter */
11027 review_id: number;
11028 /** asset_id parameter */
11029 asset_id: number;
11030 /** release_id parameter */
11031 release_id: number;
11032 /** Must be one of: `day`, `week`. */
11033 per: "" | "day" | "week";
11034 /** A repository ID. Only return repositories with an ID greater than this ID. */
11035 "since-repo": number;
11036 /** Used for pagination: the index of the first result to return. */
11037 start_index: number;
11038 /** Used for pagination: the number of results to return. */
11039 count: number;
11040 /** Identifier generated by the GitHub SCIM endpoint. */
11041 scim_group_id: string;
11042 /** scim_user_id parameter */
11043 scim_user_id: string;
11044 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
11045 order: "desc" | "asc";
11046 "team-id": number;
11047 /** gpg_key_id parameter */
11048 gpg_key_id: number;
11049 };
11050 headers: {
11051 link?: string;
11052 "content-type"?: string;
11053 "x-common-marker-version"?: string;
11054 "x-rate-limit-limit"?: number;
11055 "x-rate-limit-remaining"?: number;
11056 "x-rate-limit-reset"?: number;
11057 location?: string;
11058 };
11059}
11060
11061export interface operations {
11062 /** Get Hypermedia links to resources accessible in GitHub's REST API */
11063 "meta/root": {
11064 responses: {
11065 /** Response */
11066 200: {
11067 content: {
11068 "application/json": {
11069 current_user_url: string;
11070 current_user_authorizations_html_url: string;
11071 authorizations_url: string;
11072 code_search_url: string;
11073 commit_search_url: string;
11074 emails_url: string;
11075 emojis_url: string;
11076 events_url: string;
11077 feeds_url: string;
11078 followers_url: string;
11079 following_url: string;
11080 gists_url: string;
11081 hub_url: string;
11082 issue_search_url: string;
11083 issues_url: string;
11084 keys_url: string;
11085 label_search_url: string;
11086 notifications_url: string;
11087 organization_url: string;
11088 organization_repositories_url: string;
11089 organization_teams_url: string;
11090 public_gists_url: string;
11091 rate_limit_url: string;
11092 repository_url: string;
11093 repository_search_url: string;
11094 current_user_repositories_url: string;
11095 starred_url: string;
11096 starred_gists_url: string;
11097 topic_search_url?: string;
11098 user_url: string;
11099 user_organizations_url: string;
11100 user_repositories_url: string;
11101 user_search_url: string;
11102 };
11103 };
11104 };
11105 };
11106 };
11107 /**
11108 * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint.
11109 *
11110 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11111 */
11112 "apps/get-authenticated": {
11113 parameters: {};
11114 responses: {
11115 /** Response */
11116 200: {
11117 content: {
11118 "application/json": components["schemas"]["integration"];
11119 };
11120 };
11121 };
11122 };
11123 /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */
11124 "apps/create-from-manifest": {
11125 parameters: {
11126 path: {
11127 code: string;
11128 };
11129 };
11130 responses: {
11131 /** Response */
11132 201: {
11133 content: {
11134 "application/json": components["schemas"]["integration"] &
11135 ({
11136 client_id: string;
11137 client_secret: string;
11138 webhook_secret: string | null;
11139 pem: string;
11140 } & { [key: string]: any });
11141 };
11142 };
11143 404: components["responses"]["not_found"];
11144 422: components["responses"]["validation_failed_simple"];
11145 };
11146 requestBody: {
11147 content: {
11148 "application/json": { [key: string]: any };
11149 };
11150 };
11151 };
11152 /**
11153 * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
11154 *
11155 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11156 */
11157 "apps/get-webhook-config-for-app": {
11158 responses: {
11159 /** Response */
11160 200: {
11161 content: {
11162 "application/json": components["schemas"]["webhook-config"];
11163 };
11164 };
11165 };
11166 };
11167 /**
11168 * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
11169 *
11170 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11171 */
11172 "apps/update-webhook-config-for-app": {
11173 responses: {
11174 /** Response */
11175 200: {
11176 content: {
11177 "application/json": components["schemas"]["webhook-config"];
11178 };
11179 };
11180 };
11181 requestBody: {
11182 content: {
11183 "application/json": {
11184 url?: components["schemas"]["webhook-config-url"];
11185 content_type?: components["schemas"]["webhook-config-content-type"];
11186 secret?: components["schemas"]["webhook-config-secret"];
11187 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
11188 };
11189 };
11190 };
11191 };
11192 /**
11193 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11194 *
11195 * The permissions the installation has are included under the `permissions` key.
11196 */
11197 "apps/list-installations": {
11198 parameters: {
11199 query: {
11200 /** Results per page (max 100). */
11201 per_page?: components["parameters"]["per_page"];
11202 /** Page number of the results to fetch. */
11203 page?: components["parameters"]["page"];
11204 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
11205 since?: components["parameters"]["since"];
11206 outdated?: string;
11207 };
11208 };
11209 responses: {
11210 /** The permissions the installation has are included under the `permissions` key. */
11211 200: {
11212 headers: {};
11213 content: {
11214 "application/json": components["schemas"]["installation"][];
11215 };
11216 };
11217 };
11218 };
11219 /**
11220 * Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to.
11221 *
11222 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11223 */
11224 "apps/get-installation": {
11225 parameters: {
11226 path: {
11227 /** installation_id parameter */
11228 installation_id: components["parameters"]["installation_id"];
11229 };
11230 };
11231 responses: {
11232 /** Response */
11233 200: {
11234 content: {
11235 "application/json": components["schemas"]["installation"];
11236 };
11237 };
11238 404: components["responses"]["not_found"];
11239 415: components["responses"]["preview_header_missing"];
11240 };
11241 };
11242 /**
11243 * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint.
11244 *
11245 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11246 */
11247 "apps/delete-installation": {
11248 parameters: {
11249 path: {
11250 /** installation_id parameter */
11251 installation_id: components["parameters"]["installation_id"];
11252 };
11253 };
11254 responses: {
11255 /** Response */
11256 204: never;
11257 404: components["responses"]["not_found"];
11258 };
11259 };
11260 /**
11261 * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.
11262 *
11263 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11264 */
11265 "apps/create-installation-access-token": {
11266 parameters: {
11267 path: {
11268 /** installation_id parameter */
11269 installation_id: components["parameters"]["installation_id"];
11270 };
11271 };
11272 responses: {
11273 /** Response */
11274 201: {
11275 content: {
11276 "application/json": components["schemas"]["installation-token"];
11277 };
11278 };
11279 401: components["responses"]["requires_authentication"];
11280 403: components["responses"]["forbidden"];
11281 404: components["responses"]["not_found"];
11282 415: components["responses"]["preview_header_missing"];
11283 422: components["responses"]["validation_failed"];
11284 };
11285 requestBody: {
11286 content: {
11287 "application/json": {
11288 /** List of repository names that the token should have access to */
11289 repositories?: string[];
11290 /** List of repository IDs that the token should have access to */
11291 repository_ids?: number[];
11292 permissions?: components["schemas"]["app-permissions"];
11293 };
11294 };
11295 };
11296 };
11297 /**
11298 * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
11299 *
11300 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11301 */
11302 "apps/suspend-installation": {
11303 parameters: {
11304 path: {
11305 /** installation_id parameter */
11306 installation_id: components["parameters"]["installation_id"];
11307 };
11308 };
11309 responses: {
11310 /** Response */
11311 204: never;
11312 404: components["responses"]["not_found"];
11313 };
11314 };
11315 /**
11316 * Removes a GitHub App installation suspension.
11317 *
11318 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
11319 */
11320 "apps/unsuspend-installation": {
11321 parameters: {
11322 path: {
11323 /** installation_id parameter */
11324 installation_id: components["parameters"]["installation_id"];
11325 };
11326 };
11327 responses: {
11328 /** Response */
11329 204: never;
11330 404: components["responses"]["not_found"];
11331 };
11332 };
11333 /**
11334 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11335 *
11336 * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.
11337 */
11338 "oauth-authorizations/list-grants": {
11339 parameters: {
11340 query: {
11341 /** Results per page (max 100). */
11342 per_page?: components["parameters"]["per_page"];
11343 /** Page number of the results to fetch. */
11344 page?: components["parameters"]["page"];
11345 /** The client ID of your GitHub app. */
11346 client_id?: string;
11347 };
11348 };
11349 responses: {
11350 /** Response */
11351 200: {
11352 headers: {};
11353 content: {
11354 "application/json": components["schemas"]["application-grant"][];
11355 };
11356 };
11357 304: components["responses"]["not_modified"];
11358 401: components["responses"]["requires_authentication"];
11359 403: components["responses"]["forbidden"];
11360 404: components["responses"]["not_found"];
11361 };
11362 };
11363 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
11364 "oauth-authorizations/get-grant": {
11365 parameters: {
11366 path: {
11367 /** grant_id parameter */
11368 grant_id: components["parameters"]["grant_id"];
11369 };
11370 };
11371 responses: {
11372 /** Response */
11373 200: {
11374 content: {
11375 "application/json": components["schemas"]["application-grant"];
11376 };
11377 };
11378 304: components["responses"]["not_modified"];
11379 401: components["responses"]["requires_authentication"];
11380 403: components["responses"]["forbidden"];
11381 };
11382 };
11383 /**
11384 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11385 *
11386 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
11387 */
11388 "oauth-authorizations/delete-grant": {
11389 parameters: {
11390 path: {
11391 /** grant_id parameter */
11392 grant_id: components["parameters"]["grant_id"];
11393 };
11394 };
11395 responses: {
11396 /** Response */
11397 204: never;
11398 304: components["responses"]["not_modified"];
11399 401: components["responses"]["requires_authentication"];
11400 403: components["responses"]["forbidden"];
11401 };
11402 };
11403 /**
11404 * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
11405 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
11406 */
11407 "apps/delete-authorization": {
11408 parameters: {
11409 path: {
11410 /** The client ID of your GitHub app. */
11411 client_id: components["parameters"]["client-id"];
11412 };
11413 };
11414 responses: {
11415 /** Response */
11416 204: never;
11417 422: components["responses"]["validation_failed"];
11418 };
11419 requestBody: {
11420 content: {
11421 "application/json": {
11422 /** The OAuth access token used to authenticate to the GitHub API. */
11423 access_token?: string;
11424 };
11425 };
11426 };
11427 };
11428 /**
11429 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
11430 *
11431 * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted.
11432 *
11433 * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized).
11434 */
11435 "apps/revoke-grant-for-application": {
11436 parameters: {
11437 path: {
11438 /** The client ID of your GitHub app. */
11439 client_id: components["parameters"]["client-id"];
11440 access_token: components["parameters"]["access-token"];
11441 };
11442 };
11443 responses: {
11444 /** Response */
11445 204: never;
11446 };
11447 };
11448 /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */
11449 "apps/check-token": {
11450 parameters: {
11451 path: {
11452 /** The client ID of your GitHub app. */
11453 client_id: components["parameters"]["client-id"];
11454 };
11455 };
11456 responses: {
11457 /** Response */
11458 200: {
11459 content: {
11460 "application/json": components["schemas"]["authorization"];
11461 };
11462 };
11463 404: components["responses"]["not_found"];
11464 422: components["responses"]["validation_failed"];
11465 };
11466 requestBody: {
11467 content: {
11468 "application/json": {
11469 /** The access_token of the OAuth application. */
11470 access_token: string;
11471 };
11472 };
11473 };
11474 };
11475 /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */
11476 "apps/delete-token": {
11477 parameters: {
11478 path: {
11479 /** The client ID of your GitHub app. */
11480 client_id: components["parameters"]["client-id"];
11481 };
11482 };
11483 responses: {
11484 /** Response */
11485 204: never;
11486 422: components["responses"]["validation_failed"];
11487 };
11488 requestBody: {
11489 content: {
11490 "application/json": {
11491 /** The OAuth access token used to authenticate to the GitHub API. */
11492 access_token: string;
11493 };
11494 };
11495 };
11496 };
11497 /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */
11498 "apps/reset-token": {
11499 parameters: {
11500 path: {
11501 /** The client ID of your GitHub app. */
11502 client_id: components["parameters"]["client-id"];
11503 };
11504 };
11505 responses: {
11506 /** Response */
11507 200: {
11508 content: {
11509 "application/json": components["schemas"]["authorization"];
11510 };
11511 };
11512 422: components["responses"]["validation_failed"];
11513 };
11514 requestBody: {
11515 content: {
11516 "application/json": {
11517 /** The access_token of the OAuth application. */
11518 access_token: string;
11519 };
11520 };
11521 };
11522 };
11523 /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */
11524 "apps/scope-token": {
11525 parameters: {
11526 path: {
11527 /** The client ID of your GitHub app. */
11528 client_id: components["parameters"]["client-id"];
11529 };
11530 };
11531 responses: {
11532 /** Response */
11533 200: {
11534 content: {
11535 "application/json": components["schemas"]["authorization"];
11536 };
11537 };
11538 401: components["responses"]["requires_authentication"];
11539 403: components["responses"]["forbidden"];
11540 404: components["responses"]["not_found"];
11541 422: components["responses"]["validation_failed"];
11542 };
11543 requestBody: {
11544 content: {
11545 "application/json": {
11546 /** The OAuth access token used to authenticate to the GitHub API. */
11547 access_token: string;
11548 /** The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. */
11549 target?: string;
11550 /** The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */
11551 target_id?: number;
11552 /** The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */
11553 repositories?: string[];
11554 /** The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */
11555 repository_ids?: number[];
11556 permissions?: components["schemas"]["app-permissions"];
11557 };
11558 };
11559 };
11560 };
11561 /**
11562 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
11563 *
11564 * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
11565 */
11566 "apps/check-authorization": {
11567 parameters: {
11568 path: {
11569 /** The client ID of your GitHub app. */
11570 client_id: components["parameters"]["client-id"];
11571 access_token: components["parameters"]["access-token"];
11572 };
11573 };
11574 responses: {
11575 /** Response */
11576 200: {
11577 content: {
11578 "application/json": components["schemas"]["authorization"] | null;
11579 };
11580 };
11581 404: components["responses"]["not_found"];
11582 };
11583 };
11584 /**
11585 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
11586 *
11587 * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
11588 */
11589 "apps/reset-authorization": {
11590 parameters: {
11591 path: {
11592 /** The client ID of your GitHub app. */
11593 client_id: components["parameters"]["client-id"];
11594 access_token: components["parameters"]["access-token"];
11595 };
11596 };
11597 responses: {
11598 /** Response */
11599 200: {
11600 content: {
11601 "application/json": components["schemas"]["authorization"];
11602 };
11603 };
11604 };
11605 };
11606 /**
11607 * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
11608 *
11609 * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.
11610 */
11611 "apps/revoke-authorization-for-application": {
11612 parameters: {
11613 path: {
11614 /** The client ID of your GitHub app. */
11615 client_id: components["parameters"]["client-id"];
11616 access_token: components["parameters"]["access-token"];
11617 };
11618 };
11619 responses: {
11620 /** Response */
11621 204: never;
11622 };
11623 };
11624 /**
11625 * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
11626 *
11627 * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
11628 */
11629 "apps/get-by-slug": {
11630 parameters: {
11631 path: {
11632 app_slug: components["parameters"]["app_slug"];
11633 };
11634 };
11635 responses: {
11636 /** Response */
11637 200: {
11638 content: {
11639 "application/json": components["schemas"]["integration"];
11640 };
11641 };
11642 403: components["responses"]["forbidden"];
11643 404: components["responses"]["not_found"];
11644 415: components["responses"]["preview_header_missing"];
11645 };
11646 };
11647 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
11648 "oauth-authorizations/list-authorizations": {
11649 parameters: {
11650 query: {
11651 /** Results per page (max 100). */
11652 per_page?: components["parameters"]["per_page"];
11653 /** Page number of the results to fetch. */
11654 page?: components["parameters"]["page"];
11655 /** The client ID of your GitHub app. */
11656 client_id?: string;
11657 };
11658 };
11659 responses: {
11660 /** Response */
11661 200: {
11662 headers: {};
11663 content: {
11664 "application/json": components["schemas"]["authorization"][];
11665 };
11666 };
11667 304: components["responses"]["not_modified"];
11668 401: components["responses"]["requires_authentication"];
11669 403: components["responses"]["forbidden"];
11670 404: components["responses"]["not_found"];
11671 };
11672 };
11673 /**
11674 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11675 *
11676 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
11677 *
11678 * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
11679 *
11680 * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.
11681 *
11682 * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).
11683 *
11684 * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).
11685 */
11686 "oauth-authorizations/create-authorization": {
11687 parameters: {};
11688 responses: {
11689 /** Response */
11690 201: {
11691 headers: {
11692 Location?: string;
11693 };
11694 content: {
11695 "application/json": components["schemas"]["authorization"];
11696 };
11697 };
11698 304: components["responses"]["not_modified"];
11699 401: components["responses"]["requires_authentication"];
11700 403: components["responses"]["forbidden"];
11701 410: components["responses"]["gone"];
11702 422: components["responses"]["validation_failed"];
11703 };
11704 requestBody: {
11705 content: {
11706 "application/json": {
11707 /** A list of scopes that this authorization is in. */
11708 scopes?: string[] | null;
11709 /** A note to remind you what the OAuth token is for. */
11710 note?: string;
11711 /** A URL to remind you what app the OAuth token is for. */
11712 note_url?: string;
11713 /** The OAuth app client key for which to create the token. */
11714 client_id?: string;
11715 /** The OAuth app client secret for which to create the token. */
11716 client_secret?: string;
11717 /** A unique string to distinguish an authorization from others created for the same client ID and user. */
11718 fingerprint?: string;
11719 };
11720 };
11721 };
11722 };
11723 /**
11724 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11725 *
11726 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
11727 *
11728 * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
11729 *
11730 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
11731 *
11732 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11733 */
11734 "oauth-authorizations/get-or-create-authorization-for-app": {
11735 parameters: {
11736 path: {
11737 /** The client ID of your GitHub app. */
11738 client_id: components["parameters"]["client-id"];
11739 };
11740 };
11741 responses: {
11742 /** if returning an existing token */
11743 200: {
11744 headers: {
11745 Location?: string;
11746 };
11747 content: {
11748 "application/json": components["schemas"]["authorization"];
11749 };
11750 };
11751 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
11752 201: {
11753 headers: {
11754 Location?: string;
11755 };
11756 content: {
11757 "application/json": components["schemas"]["authorization"];
11758 };
11759 };
11760 304: components["responses"]["not_modified"];
11761 401: components["responses"]["requires_authentication"];
11762 403: components["responses"]["forbidden"];
11763 422: components["responses"]["validation_failed"];
11764 };
11765 requestBody: {
11766 content: {
11767 "application/json": {
11768 /** The OAuth app client secret for which to create the token. */
11769 client_secret: string;
11770 /** A list of scopes that this authorization is in. */
11771 scopes?: string[] | null;
11772 /** A note to remind you what the OAuth token is for. */
11773 note?: string;
11774 /** A URL to remind you what app the OAuth token is for. */
11775 note_url?: string;
11776 /** A unique string to distinguish an authorization from others created for the same client ID and user. */
11777 fingerprint?: string;
11778 };
11779 };
11780 };
11781 };
11782 /**
11783 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11784 *
11785 * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
11786 *
11787 * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
11788 *
11789 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
11790 */
11791 "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint": {
11792 parameters: {
11793 path: {
11794 /** The client ID of your GitHub app. */
11795 client_id: components["parameters"]["client-id"];
11796 fingerprint: string;
11797 };
11798 };
11799 responses: {
11800 /** if returning an existing token */
11801 200: {
11802 headers: {
11803 Location?: string;
11804 };
11805 content: {
11806 "application/json": components["schemas"]["authorization"];
11807 };
11808 };
11809 /** Response if returning a new token */
11810 201: {
11811 headers: {
11812 Location?: string;
11813 };
11814 content: {
11815 "application/json": components["schemas"]["authorization"];
11816 };
11817 };
11818 422: components["responses"]["validation_failed"];
11819 };
11820 requestBody: {
11821 content: {
11822 "application/json": {
11823 /** The OAuth app client secret for which to create the token. */
11824 client_secret: string;
11825 /** A list of scopes that this authorization is in. */
11826 scopes?: string[] | null;
11827 /** A note to remind you what the OAuth token is for. */
11828 note?: string;
11829 /** A URL to remind you what app the OAuth token is for. */
11830 note_url?: string;
11831 };
11832 };
11833 };
11834 };
11835 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
11836 "oauth-authorizations/get-authorization": {
11837 parameters: {
11838 path: {
11839 /** authorization_id parameter */
11840 authorization_id: components["parameters"]["authorization_id"];
11841 };
11842 };
11843 responses: {
11844 /** Response */
11845 200: {
11846 content: {
11847 "application/json": components["schemas"]["authorization"];
11848 };
11849 };
11850 304: components["responses"]["not_modified"];
11851 401: components["responses"]["requires_authentication"];
11852 403: components["responses"]["forbidden"];
11853 };
11854 };
11855 /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */
11856 "oauth-authorizations/delete-authorization": {
11857 parameters: {
11858 path: {
11859 /** authorization_id parameter */
11860 authorization_id: components["parameters"]["authorization_id"];
11861 };
11862 };
11863 responses: {
11864 /** Response */
11865 204: never;
11866 304: components["responses"]["not_modified"];
11867 401: components["responses"]["requires_authentication"];
11868 403: components["responses"]["forbidden"];
11869 };
11870 };
11871 /**
11872 * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
11873 *
11874 * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
11875 *
11876 * You can only send one of these scope keys at a time.
11877 */
11878 "oauth-authorizations/update-authorization": {
11879 parameters: {
11880 path: {
11881 /** authorization_id parameter */
11882 authorization_id: components["parameters"]["authorization_id"];
11883 };
11884 };
11885 responses: {
11886 /** Response */
11887 200: {
11888 content: {
11889 "application/json": components["schemas"]["authorization"];
11890 };
11891 };
11892 422: components["responses"]["validation_failed"];
11893 };
11894 requestBody: {
11895 content: {
11896 "application/json": {
11897 /** A list of scopes that this authorization is in. */
11898 scopes?: string[] | null;
11899 /** A list of scopes to add to this authorization. */
11900 add_scopes?: string[];
11901 /** A list of scopes to remove from this authorization. */
11902 remove_scopes?: string[];
11903 /** A note to remind you what the OAuth token is for. */
11904 note?: string;
11905 /** A URL to remind you what app the OAuth token is for. */
11906 note_url?: string;
11907 /** A unique string to distinguish an authorization from others created for the same client ID and user. */
11908 fingerprint?: string;
11909 };
11910 };
11911 };
11912 };
11913 "codes-of-conduct/get-all-codes-of-conduct": {
11914 parameters: {};
11915 responses: {
11916 /** Response */
11917 200: {
11918 content: {
11919 "application/json": components["schemas"]["code-of-conduct"][];
11920 };
11921 };
11922 304: components["responses"]["not_modified"];
11923 415: components["responses"]["preview_header_missing"];
11924 };
11925 };
11926 "codes-of-conduct/get-conduct-code": {
11927 parameters: {
11928 path: {
11929 key: string;
11930 };
11931 };
11932 responses: {
11933 /** Response */
11934 200: {
11935 content: {
11936 "application/json": components["schemas"]["code-of-conduct"];
11937 };
11938 };
11939 304: components["responses"]["not_modified"];
11940 404: components["responses"]["not_found"];
11941 415: components["responses"]["preview_header_missing"];
11942 };
11943 };
11944 /** Lists all the emojis available to use on GitHub. */
11945 "emojis/get": {
11946 parameters: {};
11947 responses: {
11948 /** Response */
11949 200: {
11950 content: {
11951 "application/json": { [key: string]: string };
11952 };
11953 };
11954 304: components["responses"]["not_modified"];
11955 };
11956 };
11957 /**
11958 * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
11959 *
11960 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
11961 */
11962 "enterprise-admin/get-github-actions-permissions-enterprise": {
11963 parameters: {
11964 path: {
11965 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
11966 enterprise: components["parameters"]["enterprise"];
11967 };
11968 };
11969 responses: {
11970 /** Response */
11971 200: {
11972 content: {
11973 "application/json": components["schemas"]["actions-enterprise-permissions"];
11974 };
11975 };
11976 };
11977 };
11978 /**
11979 * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
11980 *
11981 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
11982 */
11983 "enterprise-admin/set-github-actions-permissions-enterprise": {
11984 parameters: {
11985 path: {
11986 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
11987 enterprise: components["parameters"]["enterprise"];
11988 };
11989 };
11990 responses: {
11991 /** Response */
11992 204: never;
11993 };
11994 requestBody: {
11995 content: {
11996 "application/json": {
11997 enabled_organizations: components["schemas"]["enabled-organizations"];
11998 allowed_actions?: components["schemas"]["allowed-actions"];
11999 };
12000 };
12001 };
12002 };
12003 /**
12004 * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12005 *
12006 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12007 */
12008 "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": {
12009 parameters: {
12010 path: {
12011 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12012 enterprise: components["parameters"]["enterprise"];
12013 };
12014 query: {
12015 /** Results per page (max 100). */
12016 per_page?: components["parameters"]["per_page"];
12017 /** Page number of the results to fetch. */
12018 page?: components["parameters"]["page"];
12019 };
12020 };
12021 responses: {
12022 /** Response */
12023 200: {
12024 content: {
12025 "application/json": {
12026 total_count: number;
12027 organizations: components["schemas"]["organization-simple"][];
12028 };
12029 };
12030 };
12031 };
12032 };
12033 /**
12034 * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12035 *
12036 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12037 */
12038 "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": {
12039 parameters: {
12040 path: {
12041 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12042 enterprise: components["parameters"]["enterprise"];
12043 };
12044 };
12045 responses: {
12046 /** Response */
12047 204: never;
12048 };
12049 requestBody: {
12050 content: {
12051 "application/json": {
12052 /** List of organization IDs to enable for GitHub Actions. */
12053 selected_organization_ids: number[];
12054 };
12055 };
12056 };
12057 };
12058 /**
12059 * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12060 *
12061 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12062 */
12063 "enterprise-admin/enable-selected-organization-github-actions-enterprise": {
12064 parameters: {
12065 path: {
12066 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12067 enterprise: components["parameters"]["enterprise"];
12068 /** Unique identifier of an organization. */
12069 org_id: components["parameters"]["org_id"];
12070 };
12071 };
12072 responses: {
12073 /** Response */
12074 204: never;
12075 };
12076 };
12077 /**
12078 * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12079 *
12080 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12081 */
12082 "enterprise-admin/disable-selected-organization-github-actions-enterprise": {
12083 parameters: {
12084 path: {
12085 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12086 enterprise: components["parameters"]["enterprise"];
12087 /** Unique identifier of an organization. */
12088 org_id: components["parameters"]["org_id"];
12089 };
12090 };
12091 responses: {
12092 /** Response */
12093 204: never;
12094 };
12095 };
12096 /**
12097 * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12098 *
12099 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12100 */
12101 "enterprise-admin/get-allowed-actions-enterprise": {
12102 parameters: {
12103 path: {
12104 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12105 enterprise: components["parameters"]["enterprise"];
12106 };
12107 };
12108 responses: {
12109 /** Response */
12110 200: {
12111 content: {
12112 "application/json": components["schemas"]["selected-actions"];
12113 };
12114 };
12115 };
12116 };
12117 /**
12118 * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
12119 *
12120 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12121 */
12122 "enterprise-admin/set-allowed-actions-enterprise": {
12123 parameters: {
12124 path: {
12125 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12126 enterprise: components["parameters"]["enterprise"];
12127 };
12128 };
12129 responses: {
12130 /** Response */
12131 204: never;
12132 };
12133 requestBody: {
12134 content: {
12135 "application/json": components["schemas"]["selected-actions"];
12136 };
12137 };
12138 };
12139 /**
12140 * Lists all self-hosted runner groups for an enterprise.
12141 *
12142 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12143 */
12144 "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": {
12145 parameters: {
12146 path: {
12147 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12148 enterprise: components["parameters"]["enterprise"];
12149 };
12150 query: {
12151 /** Results per page (max 100). */
12152 per_page?: components["parameters"]["per_page"];
12153 /** Page number of the results to fetch. */
12154 page?: components["parameters"]["page"];
12155 };
12156 };
12157 responses: {
12158 /** Response */
12159 200: {
12160 content: {
12161 "application/json": {
12162 total_count: number;
12163 runner_groups: components["schemas"]["runner-groups-enterprise"][];
12164 };
12165 };
12166 };
12167 };
12168 };
12169 /**
12170 * Creates a new self-hosted runner group for an enterprise.
12171 *
12172 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12173 */
12174 "enterprise-admin/create-self-hosted-runner-group-for-enterprise": {
12175 parameters: {
12176 path: {
12177 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12178 enterprise: components["parameters"]["enterprise"];
12179 };
12180 };
12181 responses: {
12182 /** Response */
12183 201: {
12184 content: {
12185 "application/json": components["schemas"]["runner-groups-enterprise"];
12186 };
12187 };
12188 };
12189 requestBody: {
12190 content: {
12191 "application/json": {
12192 /** Name of the runner group. */
12193 name: string;
12194 /** Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` */
12195 visibility?: "selected" | "all";
12196 /** List of organization IDs that can access the runner group. */
12197 selected_organization_ids?: number[];
12198 /** List of runner IDs to add to the runner group. */
12199 runners?: number[];
12200 };
12201 };
12202 };
12203 };
12204 /**
12205 * Gets a specific self-hosted runner group for an enterprise.
12206 *
12207 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12208 */
12209 "enterprise-admin/get-self-hosted-runner-group-for-enterprise": {
12210 parameters: {
12211 path: {
12212 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12213 enterprise: components["parameters"]["enterprise"];
12214 /** Unique identifier of the self-hosted runner group. */
12215 runner_group_id: components["parameters"]["runner_group_id"];
12216 };
12217 };
12218 responses: {
12219 /** Response */
12220 200: {
12221 content: {
12222 "application/json": components["schemas"]["runner-groups-enterprise"];
12223 };
12224 };
12225 };
12226 };
12227 /**
12228 * Deletes a self-hosted runner group for an enterprise.
12229 *
12230 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12231 */
12232 "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": {
12233 parameters: {
12234 path: {
12235 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12236 enterprise: components["parameters"]["enterprise"];
12237 /** Unique identifier of the self-hosted runner group. */
12238 runner_group_id: components["parameters"]["runner_group_id"];
12239 };
12240 };
12241 responses: {
12242 /** Response */
12243 204: never;
12244 };
12245 };
12246 /**
12247 * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.
12248 *
12249 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12250 */
12251 "enterprise-admin/update-self-hosted-runner-group-for-enterprise": {
12252 parameters: {
12253 path: {
12254 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12255 enterprise: components["parameters"]["enterprise"];
12256 /** Unique identifier of the self-hosted runner group. */
12257 runner_group_id: components["parameters"]["runner_group_id"];
12258 };
12259 };
12260 responses: {
12261 /** Response */
12262 200: {
12263 content: {
12264 "application/json": components["schemas"]["runner-groups-enterprise"];
12265 };
12266 };
12267 };
12268 requestBody: {
12269 content: {
12270 "application/json": {
12271 /** Name of the runner group. */
12272 name?: string;
12273 /** Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` */
12274 visibility?: "selected" | "all";
12275 };
12276 };
12277 };
12278 };
12279 /**
12280 * Lists the organizations with access to a self-hosted runner group.
12281 *
12282 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12283 */
12284 "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": {
12285 parameters: {
12286 path: {
12287 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12288 enterprise: components["parameters"]["enterprise"];
12289 /** Unique identifier of the self-hosted runner group. */
12290 runner_group_id: components["parameters"]["runner_group_id"];
12291 };
12292 query: {
12293 /** Results per page (max 100). */
12294 per_page?: components["parameters"]["per_page"];
12295 /** Page number of the results to fetch. */
12296 page?: components["parameters"]["page"];
12297 };
12298 };
12299 responses: {
12300 /** Response */
12301 200: {
12302 content: {
12303 "application/json": {
12304 total_count: number;
12305 organizations: components["schemas"]["organization-simple"][];
12306 };
12307 };
12308 };
12309 };
12310 };
12311 /**
12312 * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.
12313 *
12314 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12315 */
12316 "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": {
12317 parameters: {
12318 path: {
12319 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12320 enterprise: components["parameters"]["enterprise"];
12321 /** Unique identifier of the self-hosted runner group. */
12322 runner_group_id: components["parameters"]["runner_group_id"];
12323 };
12324 };
12325 responses: {
12326 /** Response */
12327 204: never;
12328 };
12329 requestBody: {
12330 content: {
12331 "application/json": {
12332 /** List of organization IDs that can access the runner group. */
12333 selected_organization_ids: number[];
12334 };
12335 };
12336 };
12337 };
12338 /**
12339 * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
12340 *
12341 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12342 */
12343 "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": {
12344 parameters: {
12345 path: {
12346 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12347 enterprise: components["parameters"]["enterprise"];
12348 /** Unique identifier of the self-hosted runner group. */
12349 runner_group_id: components["parameters"]["runner_group_id"];
12350 /** Unique identifier of an organization. */
12351 org_id: components["parameters"]["org_id"];
12352 };
12353 };
12354 responses: {
12355 /** Response */
12356 204: never;
12357 };
12358 };
12359 /**
12360 * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
12361 *
12362 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12363 */
12364 "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": {
12365 parameters: {
12366 path: {
12367 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12368 enterprise: components["parameters"]["enterprise"];
12369 /** Unique identifier of the self-hosted runner group. */
12370 runner_group_id: components["parameters"]["runner_group_id"];
12371 /** Unique identifier of an organization. */
12372 org_id: components["parameters"]["org_id"];
12373 };
12374 };
12375 responses: {
12376 /** Response */
12377 204: never;
12378 };
12379 };
12380 /**
12381 * Lists the self-hosted runners that are in a specific enterprise group.
12382 *
12383 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12384 */
12385 "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": {
12386 parameters: {
12387 path: {
12388 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12389 enterprise: components["parameters"]["enterprise"];
12390 /** Unique identifier of the self-hosted runner group. */
12391 runner_group_id: components["parameters"]["runner_group_id"];
12392 };
12393 query: {
12394 /** Results per page (max 100). */
12395 per_page?: components["parameters"]["per_page"];
12396 /** Page number of the results to fetch. */
12397 page?: components["parameters"]["page"];
12398 };
12399 };
12400 responses: {
12401 /** Response */
12402 200: {
12403 headers: {};
12404 content: {
12405 "application/json": {
12406 total_count: number;
12407 runners: components["schemas"]["runner"][];
12408 };
12409 };
12410 };
12411 };
12412 };
12413 /**
12414 * Replaces the list of self-hosted runners that are part of an enterprise runner group.
12415 *
12416 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12417 */
12418 "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": {
12419 parameters: {
12420 path: {
12421 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12422 enterprise: components["parameters"]["enterprise"];
12423 /** Unique identifier of the self-hosted runner group. */
12424 runner_group_id: components["parameters"]["runner_group_id"];
12425 };
12426 };
12427 responses: {
12428 /** Response */
12429 204: never;
12430 };
12431 requestBody: {
12432 content: {
12433 "application/json": {
12434 /** List of runner IDs to add to the runner group. */
12435 runners: number[];
12436 };
12437 };
12438 };
12439 };
12440 /**
12441 * Adds a self-hosted runner to a runner group configured in an enterprise.
12442 *
12443 * You must authenticate using an access token with the `admin:enterprise`
12444 * scope to use this endpoint.
12445 */
12446 "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": {
12447 parameters: {
12448 path: {
12449 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12450 enterprise: components["parameters"]["enterprise"];
12451 /** Unique identifier of the self-hosted runner group. */
12452 runner_group_id: components["parameters"]["runner_group_id"];
12453 /** Unique identifier of the self-hosted runner. */
12454 runner_id: components["parameters"]["runner_id"];
12455 };
12456 };
12457 responses: {
12458 /** Response */
12459 204: never;
12460 };
12461 };
12462 /**
12463 * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.
12464 *
12465 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12466 */
12467 "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": {
12468 parameters: {
12469 path: {
12470 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12471 enterprise: components["parameters"]["enterprise"];
12472 /** Unique identifier of the self-hosted runner group. */
12473 runner_group_id: components["parameters"]["runner_group_id"];
12474 /** Unique identifier of the self-hosted runner. */
12475 runner_id: components["parameters"]["runner_id"];
12476 };
12477 };
12478 responses: {
12479 /** Response */
12480 204: never;
12481 };
12482 };
12483 /**
12484 * Lists all self-hosted runners configured for an enterprise.
12485 *
12486 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12487 */
12488 "enterprise-admin/list-self-hosted-runners-for-enterprise": {
12489 parameters: {
12490 path: {
12491 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12492 enterprise: components["parameters"]["enterprise"];
12493 };
12494 query: {
12495 /** Results per page (max 100). */
12496 per_page?: components["parameters"]["per_page"];
12497 /** Page number of the results to fetch. */
12498 page?: components["parameters"]["page"];
12499 };
12500 };
12501 responses: {
12502 /** Response */
12503 200: {
12504 headers: {};
12505 content: {
12506 "application/json": {
12507 total_count?: number;
12508 runners?: components["schemas"]["runner"][];
12509 };
12510 };
12511 };
12512 };
12513 };
12514 /**
12515 * Lists binaries for the runner application that you can download and run.
12516 *
12517 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12518 */
12519 "enterprise-admin/list-runner-applications-for-enterprise": {
12520 parameters: {
12521 path: {
12522 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12523 enterprise: components["parameters"]["enterprise"];
12524 };
12525 };
12526 responses: {
12527 /** Response */
12528 200: {
12529 content: {
12530 "application/json": components["schemas"]["runner-application"][];
12531 };
12532 };
12533 };
12534 };
12535 /**
12536 * Returns a token that you can pass to the `config` script. The token expires after one hour.
12537 *
12538 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12539 *
12540 * #### Example using registration token
12541 *
12542 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
12543 *
12544 * ```
12545 * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
12546 * ```
12547 */
12548 "enterprise-admin/create-registration-token-for-enterprise": {
12549 parameters: {
12550 path: {
12551 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12552 enterprise: components["parameters"]["enterprise"];
12553 };
12554 };
12555 responses: {
12556 /** Response */
12557 201: {
12558 content: {
12559 "application/json": components["schemas"]["authentication-token"];
12560 };
12561 };
12562 };
12563 };
12564 /**
12565 * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.
12566 *
12567 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12568 *
12569 * #### Example using remove token
12570 *
12571 * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this
12572 * endpoint.
12573 *
12574 * ```
12575 * ./config.sh remove --token TOKEN
12576 * ```
12577 */
12578 "enterprise-admin/create-remove-token-for-enterprise": {
12579 parameters: {
12580 path: {
12581 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12582 enterprise: components["parameters"]["enterprise"];
12583 };
12584 };
12585 responses: {
12586 /** Response */
12587 201: {
12588 content: {
12589 "application/json": components["schemas"]["authentication-token"];
12590 };
12591 };
12592 };
12593 };
12594 /**
12595 * Gets a specific self-hosted runner configured in an enterprise.
12596 *
12597 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12598 */
12599 "enterprise-admin/get-self-hosted-runner-for-enterprise": {
12600 parameters: {
12601 path: {
12602 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12603 enterprise: components["parameters"]["enterprise"];
12604 /** Unique identifier of the self-hosted runner. */
12605 runner_id: components["parameters"]["runner_id"];
12606 };
12607 };
12608 responses: {
12609 /** Response */
12610 200: {
12611 content: {
12612 "application/json": components["schemas"]["runner"];
12613 };
12614 };
12615 };
12616 };
12617 /**
12618 * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
12619 *
12620 * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
12621 */
12622 "enterprise-admin/delete-self-hosted-runner-from-enterprise": {
12623 parameters: {
12624 path: {
12625 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12626 enterprise: components["parameters"]["enterprise"];
12627 /** Unique identifier of the self-hosted runner. */
12628 runner_id: components["parameters"]["runner_id"];
12629 };
12630 };
12631 responses: {
12632 /** Response */
12633 204: never;
12634 };
12635 };
12636 /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */
12637 "enterprise-admin/get-audit-log": {
12638 parameters: {
12639 path: {
12640 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12641 enterprise: components["parameters"]["enterprise"];
12642 };
12643 query: {
12644 /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */
12645 phrase?: components["parameters"]["audit-log-phrase"];
12646 /**
12647 * The event types to include:
12648 *
12649 * - `web` - returns web (non-Git) events
12650 * - `git` - returns Git events
12651 * - `all` - returns both web and Git events
12652 *
12653 * The default is `web`.
12654 */
12655 include?: components["parameters"]["audit-log-include"];
12656 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */
12657 after?: components["parameters"]["audit-log-after"];
12658 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
12659 before?: components["parameters"]["audit-log-before"];
12660 /**
12661 * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
12662 *
12663 * The default is `desc`.
12664 */
12665 order?: components["parameters"]["audit-log-order"];
12666 /** Page number of the results to fetch. */
12667 page?: components["parameters"]["page"];
12668 /** Results per page (max 100). */
12669 per_page?: components["parameters"]["per_page"];
12670 };
12671 };
12672 responses: {
12673 /** Response */
12674 200: {
12675 content: {
12676 "application/json": components["schemas"]["audit-log-event"][];
12677 };
12678 };
12679 };
12680 };
12681 /**
12682 * Gets the summary of the free and paid GitHub Actions minutes used.
12683 *
12684 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
12685 *
12686 * The authenticated user must be an enterprise admin.
12687 */
12688 "billing/get-github-actions-billing-ghe": {
12689 parameters: {
12690 path: {
12691 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12692 enterprise: components["parameters"]["enterprise"];
12693 };
12694 };
12695 responses: {
12696 /** Response */
12697 200: {
12698 content: {
12699 "application/json": components["schemas"]["actions-billing-usage"];
12700 };
12701 };
12702 };
12703 };
12704 /**
12705 * Gets the free and paid storage used for GitHub Packages in gigabytes.
12706 *
12707 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
12708 *
12709 * The authenticated user must be an enterprise admin.
12710 */
12711 "billing/get-github-packages-billing-ghe": {
12712 parameters: {
12713 path: {
12714 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12715 enterprise: components["parameters"]["enterprise"];
12716 };
12717 };
12718 responses: {
12719 /** Response */
12720 200: {
12721 content: {
12722 "application/json": components["schemas"]["packages-billing-usage"];
12723 };
12724 };
12725 };
12726 };
12727 /**
12728 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
12729 *
12730 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
12731 *
12732 * The authenticated user must be an enterprise admin.
12733 */
12734 "billing/get-shared-storage-billing-ghe": {
12735 parameters: {
12736 path: {
12737 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
12738 enterprise: components["parameters"]["enterprise"];
12739 };
12740 };
12741 responses: {
12742 /** Response */
12743 200: {
12744 content: {
12745 "application/json": components["schemas"]["combined-billing-usage"];
12746 };
12747 };
12748 };
12749 };
12750 /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */
12751 "activity/list-public-events": {
12752 parameters: {
12753 query: {
12754 /** Results per page (max 100). */
12755 per_page?: components["parameters"]["per_page"];
12756 /** Page number of the results to fetch. */
12757 page?: components["parameters"]["page"];
12758 };
12759 };
12760 responses: {
12761 /** Response */
12762 200: {
12763 content: {
12764 "application/json": components["schemas"]["event"][];
12765 };
12766 };
12767 304: components["responses"]["not_modified"];
12768 403: components["responses"]["forbidden"];
12769 503: components["responses"]["service_unavailable"];
12770 };
12771 };
12772 /**
12773 * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:
12774 *
12775 * * **Timeline**: The GitHub global public timeline
12776 * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia)
12777 * * **Current user public**: The public timeline for the authenticated user
12778 * * **Current user**: The private timeline for the authenticated user
12779 * * **Current user actor**: The private timeline for activity created by the authenticated user
12780 * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
12781 * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
12782 *
12783 * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
12784 */
12785 "activity/get-feeds": {
12786 parameters: {};
12787 responses: {
12788 /** Response */
12789 200: {
12790 content: {
12791 "application/json": components["schemas"]["feed"];
12792 };
12793 };
12794 };
12795 };
12796 /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */
12797 "gists/list": {
12798 parameters: {
12799 query: {
12800 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
12801 since?: components["parameters"]["since"];
12802 /** Results per page (max 100). */
12803 per_page?: components["parameters"]["per_page"];
12804 /** Page number of the results to fetch. */
12805 page?: components["parameters"]["page"];
12806 };
12807 };
12808 responses: {
12809 /** Response */
12810 200: {
12811 headers: {};
12812 content: {
12813 "application/json": components["schemas"]["base-gist"][];
12814 };
12815 };
12816 304: components["responses"]["not_modified"];
12817 403: components["responses"]["forbidden"];
12818 };
12819 };
12820 /**
12821 * Allows you to add a new gist with one or more files.
12822 *
12823 * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
12824 */
12825 "gists/create": {
12826 parameters: {};
12827 responses: {
12828 /** Response */
12829 201: {
12830 headers: {
12831 Location?: string;
12832 };
12833 content: {
12834 "application/json": components["schemas"]["gist-simple"];
12835 };
12836 };
12837 304: components["responses"]["not_modified"];
12838 403: components["responses"]["forbidden"];
12839 404: components["responses"]["not_found"];
12840 422: components["responses"]["validation_failed"];
12841 };
12842 requestBody: {
12843 content: {
12844 "application/json": {
12845 /** Description of the gist */
12846 description?: string;
12847 /** Names and content for the files that make up the gist */
12848 files: {
12849 [key: string]: {
12850 /** Content of the file */
12851 content: string;
12852 };
12853 };
12854 public?: boolean | ("true" | "false");
12855 };
12856 };
12857 };
12858 };
12859 /**
12860 * List public gists sorted by most recently updated to least recently updated.
12861 *
12862 * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
12863 */
12864 "gists/list-public": {
12865 parameters: {
12866 query: {
12867 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
12868 since?: components["parameters"]["since"];
12869 /** Results per page (max 100). */
12870 per_page?: components["parameters"]["per_page"];
12871 /** Page number of the results to fetch. */
12872 page?: components["parameters"]["page"];
12873 };
12874 };
12875 responses: {
12876 /** Response */
12877 200: {
12878 headers: {};
12879 content: {
12880 "application/json": components["schemas"]["base-gist"][];
12881 };
12882 };
12883 304: components["responses"]["not_modified"];
12884 403: components["responses"]["forbidden"];
12885 422: components["responses"]["validation_failed"];
12886 };
12887 };
12888 /** List the authenticated user's starred gists: */
12889 "gists/list-starred": {
12890 parameters: {
12891 query: {
12892 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
12893 since?: components["parameters"]["since"];
12894 /** Results per page (max 100). */
12895 per_page?: components["parameters"]["per_page"];
12896 /** Page number of the results to fetch. */
12897 page?: components["parameters"]["page"];
12898 };
12899 };
12900 responses: {
12901 /** Response */
12902 200: {
12903 headers: {};
12904 content: {
12905 "application/json": components["schemas"]["base-gist"][];
12906 };
12907 };
12908 304: components["responses"]["not_modified"];
12909 401: components["responses"]["requires_authentication"];
12910 403: components["responses"]["forbidden"];
12911 };
12912 };
12913 "gists/get": {
12914 parameters: {
12915 path: {
12916 /** gist_id parameter */
12917 gist_id: components["parameters"]["gist_id"];
12918 };
12919 };
12920 responses: {
12921 /** Response */
12922 200: {
12923 content: {
12924 "application/json": components["schemas"]["gist-simple"];
12925 };
12926 };
12927 304: components["responses"]["not_modified"];
12928 403: components["responses"]["forbidden_gist"];
12929 404: components["responses"]["not_found"];
12930 };
12931 };
12932 "gists/delete": {
12933 parameters: {
12934 path: {
12935 /** gist_id parameter */
12936 gist_id: components["parameters"]["gist_id"];
12937 };
12938 };
12939 responses: {
12940 /** Response */
12941 204: never;
12942 304: components["responses"]["not_modified"];
12943 403: components["responses"]["forbidden"];
12944 404: components["responses"]["not_found"];
12945 };
12946 };
12947 /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */
12948 "gists/update": {
12949 parameters: {
12950 path: {
12951 /** gist_id parameter */
12952 gist_id: components["parameters"]["gist_id"];
12953 };
12954 };
12955 responses: {
12956 /** Response */
12957 200: {
12958 content: {
12959 "application/json": components["schemas"]["gist-simple"];
12960 };
12961 };
12962 404: components["responses"]["not_found"];
12963 422: components["responses"]["validation_failed"];
12964 };
12965 requestBody: {
12966 content: {
12967 "application/json": {
12968 /** Description of the gist */
12969 description?: string;
12970 /** Names of files to be updated */
12971 files?: { [key: string]: Partial<{ [key: string]: any }> };
12972 } | null;
12973 };
12974 };
12975 };
12976 "gists/list-comments": {
12977 parameters: {
12978 path: {
12979 /** gist_id parameter */
12980 gist_id: components["parameters"]["gist_id"];
12981 };
12982 query: {
12983 /** Results per page (max 100). */
12984 per_page?: components["parameters"]["per_page"];
12985 /** Page number of the results to fetch. */
12986 page?: components["parameters"]["page"];
12987 };
12988 };
12989 responses: {
12990 /** Response */
12991 200: {
12992 headers: {};
12993 content: {
12994 "application/json": components["schemas"]["gist-comment"][];
12995 };
12996 };
12997 304: components["responses"]["not_modified"];
12998 403: components["responses"]["forbidden"];
12999 404: components["responses"]["not_found"];
13000 };
13001 };
13002 "gists/create-comment": {
13003 parameters: {
13004 path: {
13005 /** gist_id parameter */
13006 gist_id: components["parameters"]["gist_id"];
13007 };
13008 };
13009 responses: {
13010 /** Response */
13011 201: {
13012 headers: {
13013 Location?: string;
13014 };
13015 content: {
13016 "application/json": components["schemas"]["gist-comment"];
13017 };
13018 };
13019 304: components["responses"]["not_modified"];
13020 403: components["responses"]["forbidden"];
13021 404: components["responses"]["not_found"];
13022 };
13023 requestBody: {
13024 content: {
13025 "application/json": {
13026 /** The comment text. */
13027 body: string;
13028 };
13029 };
13030 };
13031 };
13032 "gists/get-comment": {
13033 parameters: {
13034 path: {
13035 /** gist_id parameter */
13036 gist_id: components["parameters"]["gist_id"];
13037 /** comment_id parameter */
13038 comment_id: components["parameters"]["comment_id"];
13039 };
13040 };
13041 responses: {
13042 /** Response */
13043 200: {
13044 content: {
13045 "application/json": components["schemas"]["gist-comment"];
13046 };
13047 };
13048 304: components["responses"]["not_modified"];
13049 403: components["responses"]["forbidden_gist"];
13050 404: components["responses"]["not_found"];
13051 };
13052 };
13053 "gists/delete-comment": {
13054 parameters: {
13055 path: {
13056 /** gist_id parameter */
13057 gist_id: components["parameters"]["gist_id"];
13058 /** comment_id parameter */
13059 comment_id: components["parameters"]["comment_id"];
13060 };
13061 };
13062 responses: {
13063 /** Response */
13064 204: never;
13065 304: components["responses"]["not_modified"];
13066 403: components["responses"]["forbidden"];
13067 404: components["responses"]["not_found"];
13068 };
13069 };
13070 "gists/update-comment": {
13071 parameters: {
13072 path: {
13073 /** gist_id parameter */
13074 gist_id: components["parameters"]["gist_id"];
13075 /** comment_id parameter */
13076 comment_id: components["parameters"]["comment_id"];
13077 };
13078 };
13079 responses: {
13080 /** Response */
13081 200: {
13082 content: {
13083 "application/json": components["schemas"]["gist-comment"];
13084 };
13085 };
13086 404: components["responses"]["not_found"];
13087 };
13088 requestBody: {
13089 content: {
13090 "application/json": {
13091 /** The comment text. */
13092 body: string;
13093 };
13094 };
13095 };
13096 };
13097 "gists/list-commits": {
13098 parameters: {
13099 path: {
13100 /** gist_id parameter */
13101 gist_id: components["parameters"]["gist_id"];
13102 };
13103 query: {
13104 /** Results per page (max 100). */
13105 per_page?: components["parameters"]["per_page"];
13106 /** Page number of the results to fetch. */
13107 page?: components["parameters"]["page"];
13108 };
13109 };
13110 responses: {
13111 /** Response */
13112 200: {
13113 headers: {
13114 Link?: string;
13115 };
13116 content: {
13117 "application/json": components["schemas"]["gist-commit"][];
13118 };
13119 };
13120 304: components["responses"]["not_modified"];
13121 403: components["responses"]["forbidden"];
13122 404: components["responses"]["not_found"];
13123 };
13124 };
13125 "gists/list-forks": {
13126 parameters: {
13127 path: {
13128 /** gist_id parameter */
13129 gist_id: components["parameters"]["gist_id"];
13130 };
13131 query: {
13132 /** Results per page (max 100). */
13133 per_page?: components["parameters"]["per_page"];
13134 /** Page number of the results to fetch. */
13135 page?: components["parameters"]["page"];
13136 };
13137 };
13138 responses: {
13139 /** Response */
13140 200: {
13141 headers: {};
13142 content: {
13143 "application/json": components["schemas"]["gist-simple"][];
13144 };
13145 };
13146 304: components["responses"]["not_modified"];
13147 403: components["responses"]["forbidden"];
13148 404: components["responses"]["not_found"];
13149 };
13150 };
13151 /** **Note**: This was previously `/gists/:gist_id/fork`. */
13152 "gists/fork": {
13153 parameters: {
13154 path: {
13155 /** gist_id parameter */
13156 gist_id: components["parameters"]["gist_id"];
13157 };
13158 };
13159 responses: {
13160 /** Response */
13161 201: {
13162 headers: {
13163 Location?: string;
13164 };
13165 content: {
13166 "application/json": components["schemas"]["base-gist"];
13167 };
13168 };
13169 304: components["responses"]["not_modified"];
13170 403: components["responses"]["forbidden"];
13171 404: components["responses"]["not_found"];
13172 422: components["responses"]["validation_failed"];
13173 };
13174 };
13175 "gists/check-is-starred": {
13176 parameters: {
13177 path: {
13178 /** gist_id parameter */
13179 gist_id: components["parameters"]["gist_id"];
13180 };
13181 };
13182 responses: {
13183 /** Response if gist is starred */
13184 204: never;
13185 304: components["responses"]["not_modified"];
13186 403: components["responses"]["forbidden"];
13187 /** Not Found if gist is not starred */
13188 404: {
13189 content: {
13190 "application/json": { [key: string]: any };
13191 };
13192 };
13193 };
13194 };
13195 /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */
13196 "gists/star": {
13197 parameters: {
13198 path: {
13199 /** gist_id parameter */
13200 gist_id: components["parameters"]["gist_id"];
13201 };
13202 };
13203 responses: {
13204 /** Response */
13205 204: never;
13206 304: components["responses"]["not_modified"];
13207 403: components["responses"]["forbidden"];
13208 404: components["responses"]["not_found"];
13209 };
13210 };
13211 "gists/unstar": {
13212 parameters: {
13213 path: {
13214 /** gist_id parameter */
13215 gist_id: components["parameters"]["gist_id"];
13216 };
13217 };
13218 responses: {
13219 /** Response */
13220 204: never;
13221 304: components["responses"]["not_modified"];
13222 403: components["responses"]["forbidden"];
13223 404: components["responses"]["not_found"];
13224 };
13225 };
13226 "gists/get-revision": {
13227 parameters: {
13228 path: {
13229 /** gist_id parameter */
13230 gist_id: components["parameters"]["gist_id"];
13231 sha: string;
13232 };
13233 };
13234 responses: {
13235 /** Response */
13236 200: {
13237 content: {
13238 "application/json": components["schemas"]["gist-simple"];
13239 };
13240 };
13241 403: components["responses"]["forbidden"];
13242 404: components["responses"]["not_found"];
13243 422: components["responses"]["validation_failed"];
13244 };
13245 };
13246 /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */
13247 "gitignore/get-all-templates": {
13248 parameters: {};
13249 responses: {
13250 /** Response */
13251 200: {
13252 content: {
13253 "application/json": string[];
13254 };
13255 };
13256 304: components["responses"]["not_modified"];
13257 };
13258 };
13259 /**
13260 * The API also allows fetching the source of a single template.
13261 * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents.
13262 */
13263 "gitignore/get-template": {
13264 parameters: {
13265 path: {
13266 name: string;
13267 };
13268 };
13269 responses: {
13270 /** Response */
13271 200: {
13272 content: {
13273 "application/json": components["schemas"]["gitignore-template"];
13274 };
13275 };
13276 304: components["responses"]["not_modified"];
13277 };
13278 };
13279 /**
13280 * List repositories that an app installation can access.
13281 *
13282 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
13283 */
13284 "apps/list-repos-accessible-to-installation": {
13285 parameters: {
13286 query: {
13287 /** Results per page (max 100). */
13288 per_page?: components["parameters"]["per_page"];
13289 /** Page number of the results to fetch. */
13290 page?: components["parameters"]["page"];
13291 };
13292 };
13293 responses: {
13294 /** Response */
13295 200: {
13296 headers: {};
13297 content: {
13298 "application/json": {
13299 total_count: number;
13300 repositories: components["schemas"]["repository"][];
13301 repository_selection?: string;
13302 };
13303 };
13304 };
13305 304: components["responses"]["not_modified"];
13306 401: components["responses"]["requires_authentication"];
13307 403: components["responses"]["forbidden"];
13308 };
13309 };
13310 /**
13311 * Revokes the installation token you're using to authenticate as an installation and access this endpoint.
13312 *
13313 * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint.
13314 *
13315 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
13316 */
13317 "apps/revoke-installation-access-token": {
13318 parameters: {};
13319 responses: {
13320 /** Response */
13321 204: never;
13322 };
13323 };
13324 /**
13325 * List issues assigned to the authenticated user across all visible repositories including owned repositories, member
13326 * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not
13327 * necessarily assigned to you.
13328 *
13329 *
13330 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
13331 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
13332 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
13333 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
13334 */
13335 "issues/list": {
13336 parameters: {
13337 query: {
13338 /**
13339 * Indicates which sorts of issues to return. Can be one of:
13340 * \* `assigned`: Issues assigned to you
13341 * \* `created`: Issues created by you
13342 * \* `mentioned`: Issues mentioning you
13343 * \* `subscribed`: Issues you're subscribed to updates for
13344 * \* `all`: All issues the authenticated user can see, regardless of participation or creation
13345 */
13346 filter?:
13347 | "assigned"
13348 | "created"
13349 | "mentioned"
13350 | "subscribed"
13351 | "repos"
13352 | "all";
13353 /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */
13354 state?: "open" | "closed" | "all";
13355 /** A list of comma separated label names. Example: `bug,ui,@high` */
13356 labels?: components["parameters"]["labels"];
13357 /** What to sort results by. Can be either `created`, `updated`, `comments`. */
13358 sort?: "created" | "updated" | "comments";
13359 /** One of `asc` (ascending) or `desc` (descending). */
13360 direction?: components["parameters"]["direction"];
13361 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
13362 since?: components["parameters"]["since"];
13363 collab?: boolean;
13364 orgs?: boolean;
13365 owned?: boolean;
13366 pulls?: boolean;
13367 /** Results per page (max 100). */
13368 per_page?: components["parameters"]["per_page"];
13369 /** Page number of the results to fetch. */
13370 page?: components["parameters"]["page"];
13371 };
13372 };
13373 responses: {
13374 /** Response */
13375 200: {
13376 headers: {};
13377 content: {
13378 "application/json": components["schemas"]["issue"][];
13379 };
13380 };
13381 304: components["responses"]["not_modified"];
13382 404: components["responses"]["not_found"];
13383 422: components["responses"]["validation_failed"];
13384 };
13385 };
13386 "licenses/get-all-commonly-used": {
13387 parameters: {
13388 query: {
13389 featured?: boolean;
13390 /** Results per page (max 100). */
13391 per_page?: components["parameters"]["per_page"];
13392 /** Page number of the results to fetch. */
13393 page?: components["parameters"]["page"];
13394 };
13395 };
13396 responses: {
13397 /** Response */
13398 200: {
13399 content: {
13400 "application/json": components["schemas"]["license-simple"][];
13401 };
13402 };
13403 304: components["responses"]["not_modified"];
13404 };
13405 };
13406 "licenses/get": {
13407 parameters: {
13408 path: {
13409 license: string;
13410 };
13411 };
13412 responses: {
13413 /** Response */
13414 200: {
13415 content: {
13416 "application/json": components["schemas"]["license"];
13417 };
13418 };
13419 304: components["responses"]["not_modified"];
13420 403: components["responses"]["forbidden"];
13421 404: components["responses"]["not_found"];
13422 };
13423 };
13424 "markdown/render": {
13425 parameters: {};
13426 responses: {
13427 /** Response */
13428 200: {
13429 headers: {
13430 "Content-Length"?: string;
13431 };
13432 content: {
13433 "text/html": string;
13434 };
13435 };
13436 304: components["responses"]["not_modified"];
13437 };
13438 requestBody: {
13439 content: {
13440 "application/json": {
13441 /** The Markdown text to render in HTML. */
13442 text: string;
13443 /** The rendering mode. */
13444 mode?: "markdown" | "gfm";
13445 /** The repository context to use when creating references in `gfm` mode. */
13446 context?: string;
13447 };
13448 };
13449 };
13450 };
13451 /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */
13452 "markdown/render-raw": {
13453 parameters: {};
13454 responses: {
13455 /** Response */
13456 200: {
13457 headers: {};
13458 content: {
13459 "text/html": string;
13460 };
13461 };
13462 304: components["responses"]["not_modified"];
13463 };
13464 requestBody: {
13465 content: {
13466 "text/plain": string;
13467 "text/x-markdown": string;
13468 };
13469 };
13470 };
13471 /**
13472 * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
13473 *
13474 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13475 */
13476 "apps/get-subscription-plan-for-account": {
13477 parameters: {
13478 path: {
13479 /** account_id parameter */
13480 account_id: components["parameters"]["account_id"];
13481 };
13482 };
13483 responses: {
13484 /** Response */
13485 200: {
13486 content: {
13487 "application/json": components["schemas"]["marketplace-purchase"];
13488 };
13489 };
13490 401: components["responses"]["requires_authentication"];
13491 /** Not Found when the account has not purchased the listing */
13492 404: {
13493 content: {
13494 "application/json": components["schemas"]["basic-error"];
13495 };
13496 };
13497 };
13498 };
13499 /**
13500 * Lists all plans that are part of your GitHub Marketplace listing.
13501 *
13502 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13503 */
13504 "apps/list-plans": {
13505 parameters: {
13506 query: {
13507 /** Results per page (max 100). */
13508 per_page?: components["parameters"]["per_page"];
13509 /** Page number of the results to fetch. */
13510 page?: components["parameters"]["page"];
13511 };
13512 };
13513 responses: {
13514 /** Response */
13515 200: {
13516 headers: {};
13517 content: {
13518 "application/json": components["schemas"]["marketplace-listing-plan"][];
13519 };
13520 };
13521 401: components["responses"]["requires_authentication"];
13522 404: components["responses"]["not_found"];
13523 };
13524 };
13525 /**
13526 * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
13527 *
13528 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13529 */
13530 "apps/list-accounts-for-plan": {
13531 parameters: {
13532 path: {
13533 /** plan_id parameter */
13534 plan_id: components["parameters"]["plan_id"];
13535 };
13536 query: {
13537 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
13538 sort?: components["parameters"]["sort"];
13539 /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */
13540 direction?: "asc" | "desc";
13541 /** Results per page (max 100). */
13542 per_page?: components["parameters"]["per_page"];
13543 /** Page number of the results to fetch. */
13544 page?: components["parameters"]["page"];
13545 };
13546 };
13547 responses: {
13548 /** Response */
13549 200: {
13550 headers: {};
13551 content: {
13552 "application/json": components["schemas"]["marketplace-purchase"][];
13553 };
13554 };
13555 401: components["responses"]["requires_authentication"];
13556 404: components["responses"]["not_found"];
13557 422: components["responses"]["validation_failed"];
13558 };
13559 };
13560 /**
13561 * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
13562 *
13563 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13564 */
13565 "apps/get-subscription-plan-for-account-stubbed": {
13566 parameters: {
13567 path: {
13568 /** account_id parameter */
13569 account_id: components["parameters"]["account_id"];
13570 };
13571 };
13572 responses: {
13573 /** Response */
13574 200: {
13575 content: {
13576 "application/json": components["schemas"]["marketplace-purchase"];
13577 };
13578 };
13579 401: components["responses"]["requires_authentication"];
13580 /** Not Found when the account has not purchased the listing */
13581 404: unknown;
13582 };
13583 };
13584 /**
13585 * Lists all plans that are part of your GitHub Marketplace listing.
13586 *
13587 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13588 */
13589 "apps/list-plans-stubbed": {
13590 parameters: {
13591 query: {
13592 /** Results per page (max 100). */
13593 per_page?: components["parameters"]["per_page"];
13594 /** Page number of the results to fetch. */
13595 page?: components["parameters"]["page"];
13596 };
13597 };
13598 responses: {
13599 /** Response */
13600 200: {
13601 headers: {};
13602 content: {
13603 "application/json": components["schemas"]["marketplace-listing-plan"][];
13604 };
13605 };
13606 401: components["responses"]["requires_authentication"];
13607 };
13608 };
13609 /**
13610 * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
13611 *
13612 * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
13613 */
13614 "apps/list-accounts-for-plan-stubbed": {
13615 parameters: {
13616 path: {
13617 /** plan_id parameter */
13618 plan_id: components["parameters"]["plan_id"];
13619 };
13620 query: {
13621 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
13622 sort?: components["parameters"]["sort"];
13623 /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */
13624 direction?: "asc" | "desc";
13625 /** Results per page (max 100). */
13626 per_page?: components["parameters"]["per_page"];
13627 /** Page number of the results to fetch. */
13628 page?: components["parameters"]["page"];
13629 };
13630 };
13631 responses: {
13632 /** Response */
13633 200: {
13634 headers: {};
13635 content: {
13636 "application/json": components["schemas"]["marketplace-purchase"][];
13637 };
13638 };
13639 401: components["responses"]["requires_authentication"];
13640 };
13641 };
13642 /**
13643 * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)."
13644 *
13645 * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.
13646 */
13647 "meta/get": {
13648 parameters: {};
13649 responses: {
13650 /** Response */
13651 200: {
13652 content: {
13653 "application/json": components["schemas"]["api-overview"];
13654 };
13655 };
13656 304: components["responses"]["not_modified"];
13657 };
13658 };
13659 "activity/list-public-events-for-repo-network": {
13660 parameters: {
13661 path: {
13662 owner: components["parameters"]["owner"];
13663 repo: components["parameters"]["repo"];
13664 };
13665 query: {
13666 /** Results per page (max 100). */
13667 per_page?: components["parameters"]["per_page"];
13668 /** Page number of the results to fetch. */
13669 page?: components["parameters"]["page"];
13670 };
13671 };
13672 responses: {
13673 /** Response */
13674 200: {
13675 content: {
13676 "application/json": components["schemas"]["event"][];
13677 };
13678 };
13679 301: components["responses"]["moved_permanently"];
13680 304: components["responses"]["not_modified"];
13681 403: components["responses"]["forbidden"];
13682 404: components["responses"]["not_found"];
13683 };
13684 };
13685 /** List all notifications for the current user, sorted by most recently updated. */
13686 "activity/list-notifications-for-authenticated-user": {
13687 parameters: {
13688 query: {
13689 /** If `true`, show notifications marked as read. */
13690 all?: components["parameters"]["all"];
13691 /** If `true`, only shows notifications in which the user is directly participating or mentioned. */
13692 participating?: components["parameters"]["participating"];
13693 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
13694 since?: components["parameters"]["since"];
13695 /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
13696 before?: components["parameters"]["before"];
13697 /** Results per page (max 100). */
13698 per_page?: components["parameters"]["per_page"];
13699 /** Page number of the results to fetch. */
13700 page?: components["parameters"]["page"];
13701 };
13702 };
13703 responses: {
13704 /** Response */
13705 200: {
13706 headers: {};
13707 content: {
13708 "application/json": components["schemas"]["thread"][];
13709 };
13710 };
13711 304: components["responses"]["not_modified"];
13712 401: components["responses"]["requires_authentication"];
13713 403: components["responses"]["forbidden"];
13714 422: components["responses"]["validation_failed"];
13715 };
13716 };
13717 /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */
13718 "activity/mark-notifications-as-read": {
13719 parameters: {};
13720 responses: {
13721 /** Response */
13722 202: {
13723 content: {
13724 "application/json": {
13725 message?: string;
13726 };
13727 };
13728 };
13729 /** Reset Content */
13730 205: unknown;
13731 304: components["responses"]["not_modified"];
13732 401: components["responses"]["requires_authentication"];
13733 403: components["responses"]["forbidden"];
13734 };
13735 requestBody: {
13736 content: {
13737 "application/json": {
13738 /** Describes the last point that notifications were checked. */
13739 last_read_at?: string;
13740 /** Whether the notification has been read. */
13741 read?: boolean;
13742 };
13743 };
13744 };
13745 };
13746 "activity/get-thread": {
13747 parameters: {
13748 path: {
13749 /** thread_id parameter */
13750 thread_id: components["parameters"]["thread_id"];
13751 };
13752 };
13753 responses: {
13754 /** Response */
13755 200: {
13756 content: {
13757 "application/json": components["schemas"]["thread"];
13758 };
13759 };
13760 304: components["responses"]["not_modified"];
13761 401: components["responses"]["requires_authentication"];
13762 403: components["responses"]["forbidden"];
13763 };
13764 };
13765 "activity/mark-thread-as-read": {
13766 parameters: {
13767 path: {
13768 /** thread_id parameter */
13769 thread_id: components["parameters"]["thread_id"];
13770 };
13771 };
13772 responses: {
13773 /** Reset Content */
13774 205: unknown;
13775 304: components["responses"]["not_modified"];
13776 403: components["responses"]["forbidden"];
13777 };
13778 };
13779 /**
13780 * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription).
13781 *
13782 * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
13783 */
13784 "activity/get-thread-subscription-for-authenticated-user": {
13785 parameters: {
13786 path: {
13787 /** thread_id parameter */
13788 thread_id: components["parameters"]["thread_id"];
13789 };
13790 };
13791 responses: {
13792 /** Response */
13793 200: {
13794 content: {
13795 "application/json": components["schemas"]["thread-subscription"];
13796 };
13797 };
13798 304: components["responses"]["not_modified"];
13799 401: components["responses"]["requires_authentication"];
13800 403: components["responses"]["forbidden"];
13801 };
13802 };
13803 /**
13804 * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.
13805 *
13806 * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
13807 *
13808 * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint.
13809 */
13810 "activity/set-thread-subscription": {
13811 parameters: {
13812 path: {
13813 /** thread_id parameter */
13814 thread_id: components["parameters"]["thread_id"];
13815 };
13816 };
13817 responses: {
13818 /** Response */
13819 200: {
13820 content: {
13821 "application/json": components["schemas"]["thread-subscription"];
13822 };
13823 };
13824 304: components["responses"]["not_modified"];
13825 401: components["responses"]["requires_authentication"];
13826 403: components["responses"]["forbidden"];
13827 };
13828 requestBody: {
13829 content: {
13830 "application/json": {
13831 /** Whether to block all notifications from a thread. */
13832 ignored?: boolean;
13833 };
13834 };
13835 };
13836 };
13837 /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */
13838 "activity/delete-thread-subscription": {
13839 parameters: {
13840 path: {
13841 /** thread_id parameter */
13842 thread_id: components["parameters"]["thread_id"];
13843 };
13844 };
13845 responses: {
13846 /** Response */
13847 204: never;
13848 304: components["responses"]["not_modified"];
13849 401: components["responses"]["requires_authentication"];
13850 403: components["responses"]["forbidden"];
13851 };
13852 };
13853 /** Get the octocat as ASCII art */
13854 "meta/get-octocat": {
13855 parameters: {
13856 query: {
13857 /** The words to show in Octocat's speech bubble */
13858 s?: string;
13859 };
13860 };
13861 responses: {
13862 /** Response */
13863 200: {
13864 content: {
13865 "application/octocat-stream": string;
13866 };
13867 };
13868 };
13869 };
13870 /**
13871 * Lists all organizations, in the order that they were created on GitHub.
13872 *
13873 * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations.
13874 */
13875 "orgs/list": {
13876 parameters: {
13877 query: {
13878 /** An organization ID. Only return organizations with an ID greater than this ID. */
13879 since?: components["parameters"]["since-org"];
13880 /** Results per page (max 100). */
13881 per_page?: components["parameters"]["per_page"];
13882 };
13883 };
13884 responses: {
13885 /** Response */
13886 200: {
13887 headers: {
13888 Link?: string;
13889 };
13890 content: {
13891 "application/json": components["schemas"]["organization-simple"][];
13892 };
13893 };
13894 304: components["responses"]["not_modified"];
13895 };
13896 };
13897 /**
13898 * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
13899 *
13900 * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below."
13901 */
13902 "orgs/get": {
13903 parameters: {
13904 path: {
13905 org: components["parameters"]["org"];
13906 };
13907 };
13908 responses: {
13909 /** Response */
13910 200: {
13911 content: {
13912 "application/json": components["schemas"]["organization-full"];
13913 };
13914 };
13915 404: components["responses"]["not_found"];
13916 };
13917 };
13918 /**
13919 * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).
13920 *
13921 * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.
13922 */
13923 "orgs/update": {
13924 parameters: {
13925 path: {
13926 org: components["parameters"]["org"];
13927 };
13928 };
13929 responses: {
13930 /** Response */
13931 200: {
13932 content: {
13933 "application/json": components["schemas"]["organization-full"];
13934 };
13935 };
13936 409: components["responses"]["conflict"];
13937 415: components["responses"]["preview_header_missing"];
13938 /** Validation failed */
13939 422: {
13940 content: {
13941 "application/json":
13942 | components["schemas"]["validation-error"]
13943 | components["schemas"]["validation-error-simple"];
13944 };
13945 };
13946 };
13947 requestBody: {
13948 content: {
13949 "application/json": {
13950 /** Billing email address. This address is not publicized. */
13951 billing_email?: string;
13952 /** The company name. */
13953 company?: string;
13954 /** The publicly visible email address. */
13955 email?: string;
13956 /** The Twitter username of the company. */
13957 twitter_username?: string;
13958 /** The location. */
13959 location?: string;
13960 /** The shorthand name of the company. */
13961 name?: string;
13962 /** The description of the company. */
13963 description?: string;
13964 /** Toggles whether an organization can use organization projects. */
13965 has_organization_projects?: boolean;
13966 /** Toggles whether repositories that belong to the organization can use repository projects. */
13967 has_repository_projects?: boolean;
13968 /**
13969 * Default permission level members have for organization repositories:
13970 * \* `read` - can pull, but not push to or administer this repository.
13971 * \* `write` - can pull and push, but not administer this repository.
13972 * \* `admin` - can pull, push, and administer this repository.
13973 * \* `none` - no permissions granted by default.
13974 */
13975 default_repository_permission?: "read" | "write" | "admin" | "none";
13976 /**
13977 * Toggles the ability of non-admin organization members to create repositories. Can be one of:
13978 * \* `true` - all organization members can create repositories.
13979 * \* `false` - only organization owners can create repositories.
13980 * Default: `true`
13981 * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details.
13982 */
13983 members_can_create_repositories?: boolean;
13984 /**
13985 * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
13986 * \* `true` - all organization members can create internal repositories.
13987 * \* `false` - only organization owners can create internal repositories.
13988 * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation.
13989 */
13990 members_can_create_internal_repositories?: boolean;
13991 /**
13992 * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
13993 * \* `true` - all organization members can create private repositories.
13994 * \* `false` - only organization owners can create private repositories.
13995 * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation.
13996 */
13997 members_can_create_private_repositories?: boolean;
13998 /**
13999 * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
14000 * \* `true` - all organization members can create public repositories.
14001 * \* `false` - only organization owners can create public repositories.
14002 * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation.
14003 */
14004 members_can_create_public_repositories?: boolean;
14005 /**
14006 * Specifies which types of repositories non-admin organization members can create. Can be one of:
14007 * \* `all` - all organization members can create public and private repositories.
14008 * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
14009 * \* `none` - only admin members can create repositories.
14010 * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details.
14011 */
14012 members_allowed_repository_creation_type?: "all" | "private" | "none";
14013 /**
14014 * Toggles whether organization members can create GitHub Pages sites. Can be one of:
14015 * \* `true` - all organization members can create GitHub Pages sites.
14016 * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
14017 */
14018 members_can_create_pages?: boolean;
14019 /**
14020 * Toggles whether organization members can create public GitHub Pages sites. Can be one of:
14021 * \* `true` - all organization members can create public GitHub Pages sites.
14022 * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted.
14023 */
14024 members_can_create_public_pages?: boolean;
14025 /**
14026 * Toggles whether organization members can create private GitHub Pages sites. Can be one of:
14027 * \* `true` - all organization members can create private GitHub Pages sites.
14028 * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted.
14029 */
14030 members_can_create_private_pages?: boolean;
14031 blog?: string;
14032 };
14033 };
14034 };
14035 };
14036 /**
14037 * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
14038 *
14039 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14040 */
14041 "actions/get-github-actions-permissions-organization": {
14042 parameters: {
14043 path: {
14044 org: components["parameters"]["org"];
14045 };
14046 };
14047 responses: {
14048 /** Response */
14049 200: {
14050 content: {
14051 "application/json": components["schemas"]["actions-organization-permissions"];
14052 };
14053 };
14054 };
14055 };
14056 /**
14057 * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
14058 *
14059 * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.
14060 *
14061 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14062 */
14063 "actions/set-github-actions-permissions-organization": {
14064 parameters: {
14065 path: {
14066 org: components["parameters"]["org"];
14067 };
14068 };
14069 responses: {
14070 /** Response */
14071 204: never;
14072 };
14073 requestBody: {
14074 content: {
14075 "application/json": {
14076 enabled_repositories: components["schemas"]["enabled-repositories"];
14077 allowed_actions?: components["schemas"]["allowed-actions"];
14078 };
14079 };
14080 };
14081 };
14082 /**
14083 * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
14084 *
14085 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14086 */
14087 "actions/list-selected-repositories-enabled-github-actions-organization": {
14088 parameters: {
14089 path: {
14090 org: components["parameters"]["org"];
14091 };
14092 query: {
14093 /** Results per page (max 100). */
14094 per_page?: components["parameters"]["per_page"];
14095 /** Page number of the results to fetch. */
14096 page?: components["parameters"]["page"];
14097 };
14098 };
14099 responses: {
14100 /** Response */
14101 200: {
14102 content: {
14103 "application/json": {
14104 total_count: number;
14105 repositories: components["schemas"]["repository"][];
14106 };
14107 };
14108 };
14109 };
14110 };
14111 /**
14112 * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
14113 *
14114 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14115 */
14116 "actions/set-selected-repositories-enabled-github-actions-organization": {
14117 parameters: {
14118 path: {
14119 org: components["parameters"]["org"];
14120 };
14121 };
14122 responses: {
14123 /** Response */
14124 204: never;
14125 };
14126 requestBody: {
14127 content: {
14128 "application/json": {
14129 /** List of repository IDs to enable for GitHub Actions. */
14130 selected_repository_ids: number[];
14131 };
14132 };
14133 };
14134 };
14135 /**
14136 * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
14137 *
14138 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14139 */
14140 "actions/enable-selected-repository-github-actions-organization": {
14141 parameters: {
14142 path: {
14143 org: components["parameters"]["org"];
14144 repository_id: components["parameters"]["repository_id"];
14145 };
14146 };
14147 responses: {
14148 /** Response */
14149 204: never;
14150 };
14151 };
14152 /**
14153 * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
14154 *
14155 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14156 */
14157 "actions/disable-selected-repository-github-actions-organization": {
14158 parameters: {
14159 path: {
14160 org: components["parameters"]["org"];
14161 repository_id: components["parameters"]["repository_id"];
14162 };
14163 };
14164 responses: {
14165 /** Response */
14166 204: never;
14167 };
14168 };
14169 /**
14170 * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).""
14171 *
14172 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14173 */
14174 "actions/get-allowed-actions-organization": {
14175 parameters: {
14176 path: {
14177 org: components["parameters"]["org"];
14178 };
14179 };
14180 responses: {
14181 /** Response */
14182 200: {
14183 content: {
14184 "application/json": components["schemas"]["selected-actions"];
14185 };
14186 };
14187 };
14188 };
14189 /**
14190 * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
14191 *
14192 * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.
14193 *
14194 * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.
14195 *
14196 * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
14197 */
14198 "actions/set-allowed-actions-organization": {
14199 parameters: {
14200 path: {
14201 org: components["parameters"]["org"];
14202 };
14203 };
14204 responses: {
14205 /** Response */
14206 204: never;
14207 };
14208 requestBody: {
14209 content: {
14210 "application/json": components["schemas"]["selected-actions"];
14211 };
14212 };
14213 };
14214 /**
14215 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14216 *
14217 * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.
14218 *
14219 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14220 */
14221 "actions/list-self-hosted-runner-groups-for-org": {
14222 parameters: {
14223 path: {
14224 org: components["parameters"]["org"];
14225 };
14226 query: {
14227 /** Results per page (max 100). */
14228 per_page?: components["parameters"]["per_page"];
14229 /** Page number of the results to fetch. */
14230 page?: components["parameters"]["page"];
14231 };
14232 };
14233 responses: {
14234 /** Response */
14235 200: {
14236 content: {
14237 "application/json": {
14238 total_count: number;
14239 runner_groups: components["schemas"]["runner-groups-org"][];
14240 };
14241 };
14242 };
14243 };
14244 };
14245 /**
14246 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14247 *
14248 * Creates a new self-hosted runner group for an organization.
14249 *
14250 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14251 */
14252 "actions/create-self-hosted-runner-group-for-org": {
14253 parameters: {
14254 path: {
14255 org: components["parameters"]["org"];
14256 };
14257 };
14258 responses: {
14259 /** Response */
14260 201: {
14261 content: {
14262 "application/json": components["schemas"]["runner-groups-org"];
14263 };
14264 };
14265 };
14266 requestBody: {
14267 content: {
14268 "application/json": {
14269 /** Name of the runner group. */
14270 name: string;
14271 /** Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. */
14272 visibility?: "selected" | "all" | "private";
14273 /** List of repository IDs that can access the runner group. */
14274 selected_repository_ids?: number[];
14275 /** List of runner IDs to add to the runner group. */
14276 runners?: number[];
14277 };
14278 };
14279 };
14280 };
14281 /**
14282 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14283 *
14284 * Gets a specific self-hosted runner group for an organization.
14285 *
14286 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14287 */
14288 "actions/get-self-hosted-runner-group-for-org": {
14289 parameters: {
14290 path: {
14291 org: components["parameters"]["org"];
14292 /** Unique identifier of the self-hosted runner group. */
14293 runner_group_id: components["parameters"]["runner_group_id"];
14294 };
14295 };
14296 responses: {
14297 /** Response */
14298 200: {
14299 content: {
14300 "application/json": components["schemas"]["runner-groups-org"];
14301 };
14302 };
14303 };
14304 };
14305 /**
14306 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14307 *
14308 * Deletes a self-hosted runner group for an organization.
14309 *
14310 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14311 */
14312 "actions/delete-self-hosted-runner-group-from-org": {
14313 parameters: {
14314 path: {
14315 org: components["parameters"]["org"];
14316 /** Unique identifier of the self-hosted runner group. */
14317 runner_group_id: components["parameters"]["runner_group_id"];
14318 };
14319 };
14320 responses: {
14321 /** Response */
14322 204: never;
14323 };
14324 };
14325 /**
14326 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14327 *
14328 * Updates the `name` and `visibility` of a self-hosted runner group in an organization.
14329 *
14330 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14331 */
14332 "actions/update-self-hosted-runner-group-for-org": {
14333 parameters: {
14334 path: {
14335 org: components["parameters"]["org"];
14336 /** Unique identifier of the self-hosted runner group. */
14337 runner_group_id: components["parameters"]["runner_group_id"];
14338 };
14339 };
14340 responses: {
14341 /** Response */
14342 200: {
14343 content: {
14344 "application/json": components["schemas"]["runner-groups-org"];
14345 };
14346 };
14347 };
14348 requestBody: {
14349 content: {
14350 "application/json": {
14351 /** Name of the runner group. */
14352 name?: string;
14353 /** Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. */
14354 visibility?: "selected" | "all" | "private";
14355 };
14356 };
14357 };
14358 };
14359 /**
14360 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14361 *
14362 * Lists the repositories with access to a self-hosted runner group configured in an organization.
14363 *
14364 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14365 */
14366 "actions/list-repo-access-to-self-hosted-runner-group-in-org": {
14367 parameters: {
14368 path: {
14369 org: components["parameters"]["org"];
14370 /** Unique identifier of the self-hosted runner group. */
14371 runner_group_id: components["parameters"]["runner_group_id"];
14372 };
14373 query: {
14374 /** Page number of the results to fetch. */
14375 page?: components["parameters"]["page"];
14376 /** Results per page (max 100). */
14377 per_page?: components["parameters"]["per_page"];
14378 };
14379 };
14380 responses: {
14381 /** Response */
14382 200: {
14383 content: {
14384 "application/json": {
14385 total_count: number;
14386 repositories: components["schemas"]["minimal-repository"][];
14387 };
14388 };
14389 };
14390 };
14391 };
14392 /**
14393 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14394 *
14395 * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.
14396 *
14397 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14398 */
14399 "actions/set-repo-access-to-self-hosted-runner-group-in-org": {
14400 parameters: {
14401 path: {
14402 org: components["parameters"]["org"];
14403 /** Unique identifier of the self-hosted runner group. */
14404 runner_group_id: components["parameters"]["runner_group_id"];
14405 };
14406 };
14407 responses: {
14408 /** Response */
14409 204: never;
14410 };
14411 requestBody: {
14412 content: {
14413 "application/json": {
14414 /** List of repository IDs that can access the runner group. */
14415 selected_repository_ids: number[];
14416 };
14417 };
14418 };
14419 };
14420 /**
14421 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14422 *
14423 *
14424 * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
14425 *
14426 * You must authenticate using an access token with the `admin:org`
14427 * scope to use this endpoint.
14428 */
14429 "actions/add-repo-access-to-self-hosted-runner-group-in-org": {
14430 parameters: {
14431 path: {
14432 org: components["parameters"]["org"];
14433 /** Unique identifier of the self-hosted runner group. */
14434 runner_group_id: components["parameters"]["runner_group_id"];
14435 repository_id: components["parameters"]["repository_id"];
14436 };
14437 };
14438 responses: {
14439 /** Response */
14440 204: never;
14441 };
14442 };
14443 /**
14444 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14445 *
14446 *
14447 * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
14448 *
14449 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14450 */
14451 "actions/remove-repo-access-to-self-hosted-runner-group-in-org": {
14452 parameters: {
14453 path: {
14454 org: components["parameters"]["org"];
14455 /** Unique identifier of the self-hosted runner group. */
14456 runner_group_id: components["parameters"]["runner_group_id"];
14457 repository_id: components["parameters"]["repository_id"];
14458 };
14459 };
14460 responses: {
14461 /** Response */
14462 204: never;
14463 };
14464 };
14465 /**
14466 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14467 *
14468 * Lists self-hosted runners that are in a specific organization group.
14469 *
14470 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14471 */
14472 "actions/list-self-hosted-runners-in-group-for-org": {
14473 parameters: {
14474 path: {
14475 org: components["parameters"]["org"];
14476 /** Unique identifier of the self-hosted runner group. */
14477 runner_group_id: components["parameters"]["runner_group_id"];
14478 };
14479 query: {
14480 /** Results per page (max 100). */
14481 per_page?: components["parameters"]["per_page"];
14482 /** Page number of the results to fetch. */
14483 page?: components["parameters"]["page"];
14484 };
14485 };
14486 responses: {
14487 /** Response */
14488 200: {
14489 headers: {};
14490 content: {
14491 "application/json": {
14492 total_count: number;
14493 runners: components["schemas"]["runner"][];
14494 };
14495 };
14496 };
14497 };
14498 };
14499 /**
14500 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14501 *
14502 * Replaces the list of self-hosted runners that are part of an organization runner group.
14503 *
14504 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14505 */
14506 "actions/set-self-hosted-runners-in-group-for-org": {
14507 parameters: {
14508 path: {
14509 org: components["parameters"]["org"];
14510 /** Unique identifier of the self-hosted runner group. */
14511 runner_group_id: components["parameters"]["runner_group_id"];
14512 };
14513 };
14514 responses: {
14515 /** Response */
14516 204: never;
14517 };
14518 requestBody: {
14519 content: {
14520 "application/json": {
14521 /** List of runner IDs to add to the runner group. */
14522 runners: number[];
14523 };
14524 };
14525 };
14526 };
14527 /**
14528 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14529 *
14530 *
14531 * Adds a self-hosted runner to a runner group configured in an organization.
14532 *
14533 * You must authenticate using an access token with the `admin:org`
14534 * scope to use this endpoint.
14535 */
14536 "actions/add-self-hosted-runner-to-group-for-org": {
14537 parameters: {
14538 path: {
14539 org: components["parameters"]["org"];
14540 /** Unique identifier of the self-hosted runner group. */
14541 runner_group_id: components["parameters"]["runner_group_id"];
14542 /** Unique identifier of the self-hosted runner. */
14543 runner_id: components["parameters"]["runner_id"];
14544 };
14545 };
14546 responses: {
14547 /** Response */
14548 204: never;
14549 };
14550 };
14551 /**
14552 * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
14553 *
14554 *
14555 * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
14556 *
14557 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14558 */
14559 "actions/remove-self-hosted-runner-from-group-for-org": {
14560 parameters: {
14561 path: {
14562 org: components["parameters"]["org"];
14563 /** Unique identifier of the self-hosted runner group. */
14564 runner_group_id: components["parameters"]["runner_group_id"];
14565 /** Unique identifier of the self-hosted runner. */
14566 runner_id: components["parameters"]["runner_id"];
14567 };
14568 };
14569 responses: {
14570 /** Response */
14571 204: never;
14572 };
14573 };
14574 /**
14575 * Lists all self-hosted runners configured in an organization.
14576 *
14577 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14578 */
14579 "actions/list-self-hosted-runners-for-org": {
14580 parameters: {
14581 path: {
14582 org: components["parameters"]["org"];
14583 };
14584 query: {
14585 /** Results per page (max 100). */
14586 per_page?: components["parameters"]["per_page"];
14587 /** Page number of the results to fetch. */
14588 page?: components["parameters"]["page"];
14589 };
14590 };
14591 responses: {
14592 /** Response */
14593 200: {
14594 headers: {};
14595 content: {
14596 "application/json": {
14597 total_count: number;
14598 runners: components["schemas"]["runner"][];
14599 };
14600 };
14601 };
14602 };
14603 };
14604 /**
14605 * Lists binaries for the runner application that you can download and run.
14606 *
14607 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14608 */
14609 "actions/list-runner-applications-for-org": {
14610 parameters: {
14611 path: {
14612 org: components["parameters"]["org"];
14613 };
14614 };
14615 responses: {
14616 /** Response */
14617 200: {
14618 content: {
14619 "application/json": components["schemas"]["runner-application"][];
14620 };
14621 };
14622 };
14623 };
14624 /**
14625 * Returns a token that you can pass to the `config` script. The token expires after one hour.
14626 *
14627 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14628 *
14629 * #### Example using registration token
14630 *
14631 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
14632 *
14633 * ```
14634 * ./config.sh --url https://github.com/octo-org --token TOKEN
14635 * ```
14636 */
14637 "actions/create-registration-token-for-org": {
14638 parameters: {
14639 path: {
14640 org: components["parameters"]["org"];
14641 };
14642 };
14643 responses: {
14644 /** Response */
14645 201: {
14646 content: {
14647 "application/json": components["schemas"]["authentication-token"];
14648 };
14649 };
14650 };
14651 };
14652 /**
14653 * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.
14654 *
14655 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14656 *
14657 * #### Example using remove token
14658 *
14659 * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this
14660 * endpoint.
14661 *
14662 * ```
14663 * ./config.sh remove --token TOKEN
14664 * ```
14665 */
14666 "actions/create-remove-token-for-org": {
14667 parameters: {
14668 path: {
14669 org: components["parameters"]["org"];
14670 };
14671 };
14672 responses: {
14673 /** Response */
14674 201: {
14675 content: {
14676 "application/json": components["schemas"]["authentication-token"];
14677 };
14678 };
14679 };
14680 };
14681 /**
14682 * Gets a specific self-hosted runner configured in an organization.
14683 *
14684 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14685 */
14686 "actions/get-self-hosted-runner-for-org": {
14687 parameters: {
14688 path: {
14689 org: components["parameters"]["org"];
14690 /** Unique identifier of the self-hosted runner. */
14691 runner_id: components["parameters"]["runner_id"];
14692 };
14693 };
14694 responses: {
14695 /** Response */
14696 200: {
14697 content: {
14698 "application/json": components["schemas"]["runner"];
14699 };
14700 };
14701 };
14702 };
14703 /**
14704 * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
14705 *
14706 * You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14707 */
14708 "actions/delete-self-hosted-runner-from-org": {
14709 parameters: {
14710 path: {
14711 org: components["parameters"]["org"];
14712 /** Unique identifier of the self-hosted runner. */
14713 runner_id: components["parameters"]["runner_id"];
14714 };
14715 };
14716 responses: {
14717 /** Response */
14718 204: never;
14719 };
14720 };
14721 /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14722 "actions/list-org-secrets": {
14723 parameters: {
14724 path: {
14725 org: components["parameters"]["org"];
14726 };
14727 query: {
14728 /** Results per page (max 100). */
14729 per_page?: components["parameters"]["per_page"];
14730 /** Page number of the results to fetch. */
14731 page?: components["parameters"]["page"];
14732 };
14733 };
14734 responses: {
14735 /** Response */
14736 200: {
14737 headers: {};
14738 content: {
14739 "application/json": {
14740 total_count: number;
14741 secrets: components["schemas"]["organization-actions-secret"][];
14742 };
14743 };
14744 };
14745 };
14746 };
14747 /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14748 "actions/get-org-public-key": {
14749 parameters: {
14750 path: {
14751 org: components["parameters"]["org"];
14752 };
14753 };
14754 responses: {
14755 /** Response */
14756 200: {
14757 content: {
14758 "application/json": components["schemas"]["actions-public-key"];
14759 };
14760 };
14761 };
14762 };
14763 /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14764 "actions/get-org-secret": {
14765 parameters: {
14766 path: {
14767 org: components["parameters"]["org"];
14768 /** secret_name parameter */
14769 secret_name: components["parameters"]["secret_name"];
14770 };
14771 };
14772 responses: {
14773 /** Response */
14774 200: {
14775 content: {
14776 "application/json": components["schemas"]["organization-actions-secret"];
14777 };
14778 };
14779 };
14780 };
14781 /**
14782 * Creates or updates an organization secret with an encrypted value. Encrypt your secret using
14783 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
14784 * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to
14785 * use this endpoint.
14786 *
14787 * #### Example encrypting a secret using Node.js
14788 *
14789 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
14790 *
14791 * ```
14792 * const sodium = require('tweetsodium');
14793 *
14794 * const key = "base64-encoded-public-key";
14795 * const value = "plain-text-secret";
14796 *
14797 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
14798 * const messageBytes = Buffer.from(value);
14799 * const keyBytes = Buffer.from(key, 'base64');
14800 *
14801 * // Encrypt using LibSodium.
14802 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
14803 *
14804 * // Base64 the encrypted secret
14805 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
14806 *
14807 * console.log(encrypted);
14808 * ```
14809 *
14810 *
14811 * #### Example encrypting a secret using Python
14812 *
14813 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
14814 *
14815 * ```
14816 * from base64 import b64encode
14817 * from nacl import encoding, public
14818 *
14819 * def encrypt(public_key: str, secret_value: str) -> str:
14820 * """Encrypt a Unicode string using the public key."""
14821 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
14822 * sealed_box = public.SealedBox(public_key)
14823 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
14824 * return b64encode(encrypted).decode("utf-8")
14825 * ```
14826 *
14827 * #### Example encrypting a secret using C#
14828 *
14829 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
14830 *
14831 * ```
14832 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
14833 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
14834 *
14835 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
14836 *
14837 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
14838 * ```
14839 *
14840 * #### Example encrypting a secret using Ruby
14841 *
14842 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
14843 *
14844 * ```ruby
14845 * require "rbnacl"
14846 * require "base64"
14847 *
14848 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
14849 * public_key = RbNaCl::PublicKey.new(key)
14850 *
14851 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
14852 * encrypted_secret = box.encrypt("my_secret")
14853 *
14854 * # Print the base64 encoded secret
14855 * puts Base64.strict_encode64(encrypted_secret)
14856 * ```
14857 */
14858 "actions/create-or-update-org-secret": {
14859 parameters: {
14860 path: {
14861 org: components["parameters"]["org"];
14862 /** secret_name parameter */
14863 secret_name: components["parameters"]["secret_name"];
14864 };
14865 };
14866 responses: {
14867 /** Response when creating a secret */
14868 201: {
14869 content: {
14870 "application/json": components["schemas"]["empty-object"];
14871 };
14872 };
14873 /** Response when updating a secret */
14874 204: never;
14875 };
14876 requestBody: {
14877 content: {
14878 "application/json": {
14879 /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */
14880 encrypted_value?: string;
14881 /** ID of the key you used to encrypt the secret. */
14882 key_id?: string;
14883 /**
14884 * Configures the access that repositories have to the organization secret. Can be one of:
14885 * \- `all` - All repositories in an organization can access the secret.
14886 * \- `private` - Private repositories in an organization can access the secret.
14887 * \- `selected` - Only specific repositories can access the secret.
14888 */
14889 visibility: "all" | "private" | "selected";
14890 /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */
14891 selected_repository_ids?: string[];
14892 };
14893 };
14894 };
14895 };
14896 /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14897 "actions/delete-org-secret": {
14898 parameters: {
14899 path: {
14900 org: components["parameters"]["org"];
14901 /** secret_name parameter */
14902 secret_name: components["parameters"]["secret_name"];
14903 };
14904 };
14905 responses: {
14906 /** Response */
14907 204: never;
14908 };
14909 };
14910 /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14911 "actions/list-selected-repos-for-org-secret": {
14912 parameters: {
14913 path: {
14914 org: components["parameters"]["org"];
14915 /** secret_name parameter */
14916 secret_name: components["parameters"]["secret_name"];
14917 };
14918 query: {
14919 /** Page number of the results to fetch. */
14920 page?: components["parameters"]["page"];
14921 /** Results per page (max 100). */
14922 per_page?: components["parameters"]["per_page"];
14923 };
14924 };
14925 responses: {
14926 /** Response */
14927 200: {
14928 content: {
14929 "application/json": {
14930 total_count: number;
14931 repositories: components["schemas"]["minimal-repository"][];
14932 };
14933 };
14934 };
14935 };
14936 };
14937 /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14938 "actions/set-selected-repos-for-org-secret": {
14939 parameters: {
14940 path: {
14941 org: components["parameters"]["org"];
14942 /** secret_name parameter */
14943 secret_name: components["parameters"]["secret_name"];
14944 };
14945 };
14946 responses: {
14947 /** Response */
14948 204: never;
14949 };
14950 requestBody: {
14951 content: {
14952 "application/json": {
14953 /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */
14954 selected_repository_ids?: number[];
14955 };
14956 };
14957 };
14958 };
14959 /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14960 "actions/add-selected-repo-to-org-secret": {
14961 parameters: {
14962 path: {
14963 org: components["parameters"]["org"];
14964 /** secret_name parameter */
14965 secret_name: components["parameters"]["secret_name"];
14966 repository_id: number;
14967 };
14968 };
14969 responses: {
14970 /** No Content when repository was added to the selected list */
14971 204: never;
14972 /** Conflict when visibility type is not set to selected */
14973 409: unknown;
14974 };
14975 };
14976 /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */
14977 "actions/remove-selected-repo-from-org-secret": {
14978 parameters: {
14979 path: {
14980 org: components["parameters"]["org"];
14981 /** secret_name parameter */
14982 secret_name: components["parameters"]["secret_name"];
14983 repository_id: number;
14984 };
14985 };
14986 responses: {
14987 /** Response when repository was removed from the selected list */
14988 204: never;
14989 /** Conflict when visibility type not set to selected */
14990 409: unknown;
14991 };
14992 };
14993 /**
14994 * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
14995 *
14996 * To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.
14997 */
14998 "orgs/get-audit-log": {
14999 parameters: {
15000 path: {
15001 org: components["parameters"]["org"];
15002 };
15003 query: {
15004 /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */
15005 phrase?: components["parameters"]["audit-log-phrase"];
15006 /**
15007 * The event types to include:
15008 *
15009 * - `web` - returns web (non-Git) events
15010 * - `git` - returns Git events
15011 * - `all` - returns both web and Git events
15012 *
15013 * The default is `web`.
15014 */
15015 include?: components["parameters"]["audit-log-include"];
15016 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */
15017 after?: components["parameters"]["audit-log-after"];
15018 /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
15019 before?: components["parameters"]["audit-log-before"];
15020 /**
15021 * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
15022 *
15023 * The default is `desc`.
15024 */
15025 order?: components["parameters"]["audit-log-order"];
15026 /** Results per page (max 100). */
15027 per_page?: components["parameters"]["per_page"];
15028 /** Page number of the results to fetch. */
15029 page?: components["parameters"]["page"];
15030 };
15031 };
15032 responses: {
15033 /** Response */
15034 200: {
15035 content: {
15036 "application/json": components["schemas"]["audit-log-event"][];
15037 };
15038 };
15039 };
15040 };
15041 /** List the users blocked by an organization. */
15042 "orgs/list-blocked-users": {
15043 parameters: {
15044 path: {
15045 org: components["parameters"]["org"];
15046 };
15047 };
15048 responses: {
15049 /** Response */
15050 200: {
15051 content: {
15052 "application/json": components["schemas"]["simple-user"][];
15053 };
15054 };
15055 415: components["responses"]["preview_header_missing"];
15056 };
15057 };
15058 "orgs/check-blocked-user": {
15059 parameters: {
15060 path: {
15061 org: components["parameters"]["org"];
15062 username: components["parameters"]["username"];
15063 };
15064 };
15065 responses: {
15066 /** If the user is blocked: */
15067 204: never;
15068 /** If the user is not blocked: */
15069 404: {
15070 content: {
15071 "application/json": components["schemas"]["basic-error"];
15072 };
15073 };
15074 };
15075 };
15076 "orgs/block-user": {
15077 parameters: {
15078 path: {
15079 org: components["parameters"]["org"];
15080 username: components["parameters"]["username"];
15081 };
15082 };
15083 responses: {
15084 /** Response */
15085 204: never;
15086 422: components["responses"]["validation_failed"];
15087 };
15088 };
15089 "orgs/unblock-user": {
15090 parameters: {
15091 path: {
15092 org: components["parameters"]["org"];
15093 username: components["parameters"]["username"];
15094 };
15095 };
15096 responses: {
15097 /** Response */
15098 204: never;
15099 };
15100 };
15101 /**
15102 * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).
15103 *
15104 * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on).
15105 */
15106 "orgs/list-saml-sso-authorizations": {
15107 parameters: {
15108 path: {
15109 org: components["parameters"]["org"];
15110 };
15111 };
15112 responses: {
15113 /** Response */
15114 200: {
15115 content: {
15116 "application/json": components["schemas"]["credential-authorization"][];
15117 };
15118 };
15119 };
15120 };
15121 /**
15122 * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).
15123 *
15124 * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.
15125 */
15126 "orgs/remove-saml-sso-authorization": {
15127 parameters: {
15128 path: {
15129 org: components["parameters"]["org"];
15130 credential_id: number;
15131 };
15132 };
15133 responses: {
15134 /** Response */
15135 204: never;
15136 404: components["responses"]["not_found"];
15137 };
15138 };
15139 "activity/list-public-org-events": {
15140 parameters: {
15141 path: {
15142 org: components["parameters"]["org"];
15143 };
15144 query: {
15145 /** Results per page (max 100). */
15146 per_page?: components["parameters"]["per_page"];
15147 /** Page number of the results to fetch. */
15148 page?: components["parameters"]["page"];
15149 };
15150 };
15151 responses: {
15152 /** Response */
15153 200: {
15154 content: {
15155 "application/json": components["schemas"]["event"][];
15156 };
15157 };
15158 };
15159 };
15160 /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */
15161 "orgs/list-failed-invitations": {
15162 parameters: {
15163 path: {
15164 org: components["parameters"]["org"];
15165 };
15166 query: {
15167 /** Results per page (max 100). */
15168 per_page?: components["parameters"]["per_page"];
15169 /** Page number of the results to fetch. */
15170 page?: components["parameters"]["page"];
15171 };
15172 };
15173 responses: {
15174 /** Response */
15175 200: {
15176 headers: {};
15177 content: {
15178 "application/json": components["schemas"]["organization-invitation"][];
15179 };
15180 };
15181 404: components["responses"]["not_found"];
15182 };
15183 };
15184 "orgs/list-webhooks": {
15185 parameters: {
15186 path: {
15187 org: components["parameters"]["org"];
15188 };
15189 query: {
15190 /** Results per page (max 100). */
15191 per_page?: components["parameters"]["per_page"];
15192 /** Page number of the results to fetch. */
15193 page?: components["parameters"]["page"];
15194 };
15195 };
15196 responses: {
15197 /** Response */
15198 200: {
15199 headers: {};
15200 content: {
15201 "application/json": components["schemas"]["org-hook"][];
15202 };
15203 };
15204 404: components["responses"]["not_found"];
15205 };
15206 };
15207 /** Here's how you can create a hook that posts payloads in JSON format: */
15208 "orgs/create-webhook": {
15209 parameters: {
15210 path: {
15211 org: components["parameters"]["org"];
15212 };
15213 };
15214 responses: {
15215 /** Response */
15216 201: {
15217 headers: {
15218 Location?: string;
15219 };
15220 content: {
15221 "application/json": components["schemas"]["org-hook"];
15222 };
15223 };
15224 404: components["responses"]["not_found"];
15225 422: components["responses"]["validation_failed"];
15226 };
15227 requestBody: {
15228 content: {
15229 "application/json": {
15230 /** Must be passed as "web". */
15231 name: string;
15232 /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */
15233 config: {
15234 url: components["schemas"]["webhook-config-url"];
15235 content_type?: components["schemas"]["webhook-config-content-type"];
15236 secret?: components["schemas"]["webhook-config-secret"];
15237 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
15238 username?: string;
15239 password?: string;
15240 };
15241 /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */
15242 events?: string[];
15243 /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */
15244 active?: boolean;
15245 };
15246 };
15247 };
15248 };
15249 /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */
15250 "orgs/get-webhook": {
15251 parameters: {
15252 path: {
15253 org: components["parameters"]["org"];
15254 hook_id: components["parameters"]["hook-id"];
15255 };
15256 };
15257 responses: {
15258 /** Response */
15259 200: {
15260 content: {
15261 "application/json": components["schemas"]["org-hook"];
15262 };
15263 };
15264 404: components["responses"]["not_found"];
15265 };
15266 };
15267 "orgs/delete-webhook": {
15268 parameters: {
15269 path: {
15270 org: components["parameters"]["org"];
15271 hook_id: components["parameters"]["hook-id"];
15272 };
15273 };
15274 responses: {
15275 /** Response */
15276 204: never;
15277 404: components["responses"]["not_found"];
15278 };
15279 };
15280 /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. 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 an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */
15281 "orgs/update-webhook": {
15282 parameters: {
15283 path: {
15284 org: components["parameters"]["org"];
15285 hook_id: components["parameters"]["hook-id"];
15286 };
15287 };
15288 responses: {
15289 /** Response */
15290 200: {
15291 content: {
15292 "application/json": components["schemas"]["org-hook"];
15293 };
15294 };
15295 404: components["responses"]["not_found"];
15296 422: components["responses"]["validation_failed"];
15297 };
15298 requestBody: {
15299 content: {
15300 "application/json": {
15301 /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */
15302 config?: {
15303 url: components["schemas"]["webhook-config-url"];
15304 content_type?: components["schemas"]["webhook-config-content-type"];
15305 secret?: components["schemas"]["webhook-config-secret"];
15306 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
15307 };
15308 /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */
15309 events?: string[];
15310 /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */
15311 active?: boolean;
15312 name?: string;
15313 };
15314 };
15315 };
15316 };
15317 /**
15318 * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)."
15319 *
15320 * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission.
15321 */
15322 "orgs/get-webhook-config-for-org": {
15323 parameters: {
15324 path: {
15325 org: components["parameters"]["org"];
15326 hook_id: components["parameters"]["hook-id"];
15327 };
15328 };
15329 responses: {
15330 /** Response */
15331 200: {
15332 content: {
15333 "application/json": components["schemas"]["webhook-config"];
15334 };
15335 };
15336 };
15337 };
15338 /**
15339 * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)."
15340 *
15341 * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission.
15342 */
15343 "orgs/update-webhook-config-for-org": {
15344 parameters: {
15345 path: {
15346 org: components["parameters"]["org"];
15347 hook_id: components["parameters"]["hook-id"];
15348 };
15349 };
15350 responses: {
15351 /** Response */
15352 200: {
15353 content: {
15354 "application/json": components["schemas"]["webhook-config"];
15355 };
15356 };
15357 };
15358 requestBody: {
15359 content: {
15360 "application/json": {
15361 url?: components["schemas"]["webhook-config-url"];
15362 content_type?: components["schemas"]["webhook-config-content-type"];
15363 secret?: components["schemas"]["webhook-config-secret"];
15364 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
15365 };
15366 };
15367 };
15368 };
15369 /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */
15370 "orgs/ping-webhook": {
15371 parameters: {
15372 path: {
15373 org: components["parameters"]["org"];
15374 hook_id: components["parameters"]["hook-id"];
15375 };
15376 };
15377 responses: {
15378 /** Response */
15379 204: never;
15380 404: components["responses"]["not_found"];
15381 };
15382 };
15383 /**
15384 * Enables an authenticated GitHub App to find the organization's installation information.
15385 *
15386 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
15387 */
15388 "apps/get-org-installation": {
15389 parameters: {
15390 path: {
15391 org: components["parameters"]["org"];
15392 };
15393 };
15394 responses: {
15395 /** Response */
15396 200: {
15397 content: {
15398 "application/json": components["schemas"]["installation"];
15399 };
15400 };
15401 };
15402 };
15403 /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */
15404 "orgs/list-app-installations": {
15405 parameters: {
15406 path: {
15407 org: components["parameters"]["org"];
15408 };
15409 query: {
15410 /** Results per page (max 100). */
15411 per_page?: components["parameters"]["per_page"];
15412 /** Page number of the results to fetch. */
15413 page?: components["parameters"]["page"];
15414 };
15415 };
15416 responses: {
15417 /** Response */
15418 200: {
15419 headers: {};
15420 content: {
15421 "application/json": {
15422 total_count: number;
15423 installations: components["schemas"]["installation"][];
15424 };
15425 };
15426 };
15427 };
15428 };
15429 /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */
15430 "interactions/get-restrictions-for-org": {
15431 parameters: {
15432 path: {
15433 org: components["parameters"]["org"];
15434 };
15435 };
15436 responses: {
15437 /** Response */
15438 200: {
15439 content: {
15440 "application/json": Partial<
15441 components["schemas"]["interaction-limit-response"]
15442 > &
15443 Partial<{ [key: string]: any }>;
15444 };
15445 };
15446 };
15447 };
15448 /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */
15449 "interactions/set-restrictions-for-org": {
15450 parameters: {
15451 path: {
15452 org: components["parameters"]["org"];
15453 };
15454 };
15455 responses: {
15456 /** Response */
15457 200: {
15458 content: {
15459 "application/json": components["schemas"]["interaction-limit-response"];
15460 };
15461 };
15462 422: components["responses"]["validation_failed"];
15463 };
15464 requestBody: {
15465 content: {
15466 "application/json": components["schemas"]["interaction-limit"];
15467 };
15468 };
15469 };
15470 /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */
15471 "interactions/remove-restrictions-for-org": {
15472 parameters: {
15473 path: {
15474 org: components["parameters"]["org"];
15475 };
15476 };
15477 responses: {
15478 /** Response */
15479 204: never;
15480 };
15481 };
15482 /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */
15483 "orgs/list-pending-invitations": {
15484 parameters: {
15485 path: {
15486 org: components["parameters"]["org"];
15487 };
15488 query: {
15489 /** Results per page (max 100). */
15490 per_page?: components["parameters"]["per_page"];
15491 /** Page number of the results to fetch. */
15492 page?: components["parameters"]["page"];
15493 };
15494 };
15495 responses: {
15496 /** Response */
15497 200: {
15498 headers: {};
15499 content: {
15500 "application/json": components["schemas"]["organization-invitation"][];
15501 };
15502 };
15503 404: components["responses"]["not_found"];
15504 };
15505 };
15506 /**
15507 * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
15508 *
15509 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
15510 */
15511 "orgs/create-invitation": {
15512 parameters: {
15513 path: {
15514 org: components["parameters"]["org"];
15515 };
15516 };
15517 responses: {
15518 /** Response */
15519 201: {
15520 content: {
15521 "application/json": components["schemas"]["organization-invitation"];
15522 };
15523 };
15524 404: components["responses"]["not_found"];
15525 422: components["responses"]["validation_failed"];
15526 };
15527 requestBody: {
15528 content: {
15529 "application/json": {
15530 /** **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */
15531 invitee_id?: number;
15532 /** **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */
15533 email?: string;
15534 /**
15535 * Specify role for new member. Can be one of:
15536 * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams.
15537 * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation.
15538 * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization.
15539 */
15540 role?: "admin" | "direct_member" | "billing_manager";
15541 /** Specify IDs for the teams you want to invite new members to. */
15542 team_ids?: number[];
15543 };
15544 };
15545 };
15546 };
15547 /**
15548 * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.
15549 *
15550 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications).
15551 */
15552 "orgs/cancel-invitation": {
15553 parameters: {
15554 path: {
15555 org: components["parameters"]["org"];
15556 /** invitation_id parameter */
15557 invitation_id: components["parameters"]["invitation_id"];
15558 };
15559 };
15560 responses: {
15561 /** Response */
15562 204: never;
15563 404: components["responses"]["not_found"];
15564 422: components["responses"]["validation_failed"];
15565 };
15566 };
15567 /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */
15568 "orgs/list-invitation-teams": {
15569 parameters: {
15570 path: {
15571 org: components["parameters"]["org"];
15572 /** invitation_id parameter */
15573 invitation_id: components["parameters"]["invitation_id"];
15574 };
15575 query: {
15576 /** Results per page (max 100). */
15577 per_page?: components["parameters"]["per_page"];
15578 /** Page number of the results to fetch. */
15579 page?: components["parameters"]["page"];
15580 };
15581 };
15582 responses: {
15583 /** Response */
15584 200: {
15585 headers: {};
15586 content: {
15587 "application/json": components["schemas"]["team"][];
15588 };
15589 };
15590 404: components["responses"]["not_found"];
15591 };
15592 };
15593 /**
15594 * List issues in an organization assigned to the authenticated user.
15595 *
15596 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
15597 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
15598 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
15599 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
15600 */
15601 "issues/list-for-org": {
15602 parameters: {
15603 path: {
15604 org: components["parameters"]["org"];
15605 };
15606 query: {
15607 /**
15608 * Indicates which sorts of issues to return. Can be one of:
15609 * \* `assigned`: Issues assigned to you
15610 * \* `created`: Issues created by you
15611 * \* `mentioned`: Issues mentioning you
15612 * \* `subscribed`: Issues you're subscribed to updates for
15613 * \* `all`: All issues the authenticated user can see, regardless of participation or creation
15614 */
15615 filter?:
15616 | "assigned"
15617 | "created"
15618 | "mentioned"
15619 | "subscribed"
15620 | "repos"
15621 | "all";
15622 /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */
15623 state?: "open" | "closed" | "all";
15624 /** A list of comma separated label names. Example: `bug,ui,@high` */
15625 labels?: components["parameters"]["labels"];
15626 /** What to sort results by. Can be either `created`, `updated`, `comments`. */
15627 sort?: "created" | "updated" | "comments";
15628 /** One of `asc` (ascending) or `desc` (descending). */
15629 direction?: components["parameters"]["direction"];
15630 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
15631 since?: components["parameters"]["since"];
15632 /** Results per page (max 100). */
15633 per_page?: components["parameters"]["per_page"];
15634 /** Page number of the results to fetch. */
15635 page?: components["parameters"]["page"];
15636 };
15637 };
15638 responses: {
15639 /** Response */
15640 200: {
15641 headers: {};
15642 content: {
15643 "application/json": components["schemas"]["issue"][];
15644 };
15645 };
15646 404: components["responses"]["not_found"];
15647 };
15648 };
15649 /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */
15650 "orgs/list-members": {
15651 parameters: {
15652 path: {
15653 org: components["parameters"]["org"];
15654 };
15655 query: {
15656 /**
15657 * Filter members returned in the list. Can be one of:
15658 * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners.
15659 * \* `all` - All members the authenticated user can see.
15660 */
15661 filter?: "2fa_disabled" | "all";
15662 /**
15663 * Filter members returned by their role. Can be one of:
15664 * \* `all` - All members of the organization, regardless of role.
15665 * \* `admin` - Organization owners.
15666 * \* `member` - Non-owner organization members.
15667 */
15668 role?: "all" | "admin" | "member";
15669 /** Results per page (max 100). */
15670 per_page?: components["parameters"]["per_page"];
15671 /** Page number of the results to fetch. */
15672 page?: components["parameters"]["page"];
15673 };
15674 };
15675 responses: {
15676 /** Response */
15677 200: {
15678 headers: {};
15679 content: {
15680 "application/json": components["schemas"]["simple-user"][];
15681 };
15682 };
15683 /** Response if requester is not an organization member */
15684 302: never;
15685 422: components["responses"]["validation_failed"];
15686 };
15687 };
15688 /** Check if a user is, publicly or privately, a member of the organization. */
15689 "orgs/check-membership-for-user": {
15690 parameters: {
15691 path: {
15692 org: components["parameters"]["org"];
15693 username: components["parameters"]["username"];
15694 };
15695 };
15696 responses: {
15697 /** Response if requester is an organization member and user is a member */
15698 204: never;
15699 /** Response if requester is not an organization member */
15700 302: never;
15701 /** Not Found if requester is an organization member and user is not a member */
15702 404: unknown;
15703 };
15704 };
15705 /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */
15706 "orgs/remove-member": {
15707 parameters: {
15708 path: {
15709 org: components["parameters"]["org"];
15710 username: components["parameters"]["username"];
15711 };
15712 };
15713 responses: {
15714 /** Response */
15715 204: never;
15716 403: components["responses"]["forbidden"];
15717 };
15718 };
15719 /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */
15720 "orgs/get-membership-for-user": {
15721 parameters: {
15722 path: {
15723 org: components["parameters"]["org"];
15724 username: components["parameters"]["username"];
15725 };
15726 };
15727 responses: {
15728 /** Response */
15729 200: {
15730 content: {
15731 "application/json": components["schemas"]["org-membership"];
15732 };
15733 };
15734 403: components["responses"]["forbidden"];
15735 404: components["responses"]["not_found"];
15736 };
15737 };
15738 /**
15739 * Only authenticated organization owners can add a member to the organization or update the member's role.
15740 *
15741 * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.
15742 *
15743 * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.
15744 *
15745 * **Rate limits**
15746 *
15747 * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
15748 */
15749 "orgs/set-membership-for-user": {
15750 parameters: {
15751 path: {
15752 org: components["parameters"]["org"];
15753 username: components["parameters"]["username"];
15754 };
15755 };
15756 responses: {
15757 /** Response */
15758 200: {
15759 content: {
15760 "application/json": components["schemas"]["org-membership"];
15761 };
15762 };
15763 403: components["responses"]["forbidden"];
15764 422: components["responses"]["validation_failed"];
15765 };
15766 requestBody: {
15767 content: {
15768 "application/json": {
15769 /**
15770 * The role to give the user in the organization. Can be one of:
15771 * \* `admin` - The user will become an owner of the organization.
15772 * \* `member` - The user will become a non-owner member of the organization.
15773 */
15774 role?: "admin" | "member";
15775 };
15776 };
15777 };
15778 };
15779 /**
15780 * In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
15781 *
15782 * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
15783 */
15784 "orgs/remove-membership-for-user": {
15785 parameters: {
15786 path: {
15787 org: components["parameters"]["org"];
15788 username: components["parameters"]["username"];
15789 };
15790 };
15791 responses: {
15792 /** Response */
15793 204: never;
15794 403: components["responses"]["forbidden"];
15795 404: components["responses"]["not_found"];
15796 };
15797 };
15798 /** Lists the most recent migrations. */
15799 "migrations/list-for-org": {
15800 parameters: {
15801 path: {
15802 org: components["parameters"]["org"];
15803 };
15804 query: {
15805 /** Results per page (max 100). */
15806 per_page?: components["parameters"]["per_page"];
15807 /** Page number of the results to fetch. */
15808 page?: components["parameters"]["page"];
15809 /** Exclude attributes from the API response to improve performance */
15810 exclude?: "repositories"[];
15811 };
15812 };
15813 responses: {
15814 /** Response */
15815 200: {
15816 headers: {};
15817 content: {
15818 "application/json": components["schemas"]["migration"][];
15819 };
15820 };
15821 };
15822 };
15823 /** Initiates the generation of a migration archive. */
15824 "migrations/start-for-org": {
15825 parameters: {
15826 path: {
15827 org: components["parameters"]["org"];
15828 };
15829 };
15830 responses: {
15831 /** Response */
15832 201: {
15833 content: {
15834 "application/json": components["schemas"]["migration"];
15835 };
15836 };
15837 404: components["responses"]["not_found"];
15838 422: components["responses"]["validation_failed"];
15839 };
15840 requestBody: {
15841 content: {
15842 "application/json": {
15843 /** A list of arrays indicating which repositories should be migrated. */
15844 repositories: string[];
15845 /** Indicates whether repositories should be locked (to prevent manipulation) while migrating data. */
15846 lock_repositories?: boolean;
15847 /** Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). */
15848 exclude_attachments?: boolean;
15849 exclude?: "repositories"[];
15850 };
15851 };
15852 };
15853 };
15854 /**
15855 * Fetches the status of a migration.
15856 *
15857 * The `state` of a migration can be one of the following values:
15858 *
15859 * * `pending`, which means the migration hasn't started yet.
15860 * * `exporting`, which means the migration is in progress.
15861 * * `exported`, which means the migration finished successfully.
15862 * * `failed`, which means the migration failed.
15863 */
15864 "migrations/get-status-for-org": {
15865 parameters: {
15866 path: {
15867 org: components["parameters"]["org"];
15868 /** migration_id parameter */
15869 migration_id: components["parameters"]["migration_id"];
15870 };
15871 query: {
15872 /** Exclude attributes from the API response to improve performance */
15873 exclude?: "repositories"[];
15874 };
15875 };
15876 responses: {
15877 /**
15878 * * `pending`, which means the migration hasn't started yet.
15879 * * `exporting`, which means the migration is in progress.
15880 * * `exported`, which means the migration finished successfully.
15881 * * `failed`, which means the migration failed.
15882 */
15883 200: {
15884 content: {
15885 "application/json": components["schemas"]["migration"];
15886 };
15887 };
15888 404: components["responses"]["not_found"];
15889 };
15890 };
15891 /** Fetches the URL to a migration archive. */
15892 "migrations/download-archive-for-org": {
15893 parameters: {
15894 path: {
15895 org: components["parameters"]["org"];
15896 /** migration_id parameter */
15897 migration_id: components["parameters"]["migration_id"];
15898 };
15899 };
15900 responses: {
15901 /** Response */
15902 302: never;
15903 404: components["responses"]["not_found"];
15904 };
15905 };
15906 /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */
15907 "migrations/delete-archive-for-org": {
15908 parameters: {
15909 path: {
15910 org: components["parameters"]["org"];
15911 /** migration_id parameter */
15912 migration_id: components["parameters"]["migration_id"];
15913 };
15914 };
15915 responses: {
15916 /** Response */
15917 204: never;
15918 404: components["responses"]["not_found"];
15919 };
15920 };
15921 /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */
15922 "migrations/unlock-repo-for-org": {
15923 parameters: {
15924 path: {
15925 org: components["parameters"]["org"];
15926 /** migration_id parameter */
15927 migration_id: components["parameters"]["migration_id"];
15928 /** repo_name parameter */
15929 repo_name: components["parameters"]["repo_name"];
15930 };
15931 };
15932 responses: {
15933 /** Response */
15934 204: never;
15935 404: components["responses"]["not_found"];
15936 };
15937 };
15938 /** List all the repositories for this organization migration. */
15939 "migrations/list-repos-for-org": {
15940 parameters: {
15941 path: {
15942 org: components["parameters"]["org"];
15943 /** migration_id parameter */
15944 migration_id: components["parameters"]["migration_id"];
15945 };
15946 query: {
15947 /** Results per page (max 100). */
15948 per_page?: components["parameters"]["per_page"];
15949 /** Page number of the results to fetch. */
15950 page?: components["parameters"]["page"];
15951 };
15952 };
15953 responses: {
15954 /** Response */
15955 200: {
15956 headers: {};
15957 content: {
15958 "application/json": components["schemas"]["minimal-repository"][];
15959 };
15960 };
15961 404: components["responses"]["not_found"];
15962 };
15963 };
15964 /** List all users who are outside collaborators of an organization. */
15965 "orgs/list-outside-collaborators": {
15966 parameters: {
15967 path: {
15968 org: components["parameters"]["org"];
15969 };
15970 query: {
15971 /**
15972 * Filter the list of outside collaborators. Can be one of:
15973 * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled.
15974 * \* `all`: All outside collaborators.
15975 */
15976 filter?: "2fa_disabled" | "all";
15977 /** Results per page (max 100). */
15978 per_page?: components["parameters"]["per_page"];
15979 /** Page number of the results to fetch. */
15980 page?: components["parameters"]["page"];
15981 };
15982 };
15983 responses: {
15984 /** Response */
15985 200: {
15986 headers: {};
15987 content: {
15988 "application/json": components["schemas"]["simple-user"][];
15989 };
15990 };
15991 };
15992 };
15993 /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */
15994 "orgs/convert-member-to-outside-collaborator": {
15995 parameters: {
15996 path: {
15997 org: components["parameters"]["org"];
15998 username: components["parameters"]["username"];
15999 };
16000 };
16001 responses: {
16002 /** User is getting converted asynchronously */
16003 202: {
16004 content: {
16005 "application/json": { [key: string]: any };
16006 };
16007 };
16008 /** User was converted */
16009 204: never;
16010 /** Forbidden if user is the last owner of the organization or not a member of the organization */
16011 403: unknown;
16012 404: components["responses"]["not_found"];
16013 };
16014 };
16015 /** Removing a user from this list will remove them from all the organization's repositories. */
16016 "orgs/remove-outside-collaborator": {
16017 parameters: {
16018 path: {
16019 org: components["parameters"]["org"];
16020 username: components["parameters"]["username"];
16021 };
16022 };
16023 responses: {
16024 /** Response */
16025 204: never;
16026 /** Unprocessable Entity if user is a member of the organization */
16027 422: {
16028 content: {
16029 "application/json": {
16030 message?: string;
16031 documentation_url?: string;
16032 };
16033 };
16034 };
16035 };
16036 };
16037 /**
16038 * Gets a specific package in an organization.
16039 *
16040 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
16041 * If `package_type` is not `container`, your token must also include the `repo` scope.
16042 */
16043 "packages/get-package-for-organization": {
16044 parameters: {
16045 path: {
16046 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16047 package_type: components["parameters"]["package_type"];
16048 /** The name of the package. */
16049 package_name: components["parameters"]["package_name"];
16050 org: components["parameters"]["org"];
16051 };
16052 };
16053 responses: {
16054 /** Response */
16055 200: {
16056 content: {
16057 "application/json": components["schemas"]["package"];
16058 };
16059 };
16060 };
16061 };
16062 /**
16063 * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
16064 *
16065 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:
16066 * - If `package_type` is not `container`, your token must also include the `repo` scope.
16067 * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
16068 */
16069 "packages/delete-package-for-org": {
16070 parameters: {
16071 path: {
16072 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16073 package_type: components["parameters"]["package_type"];
16074 /** The name of the package. */
16075 package_name: components["parameters"]["package_name"];
16076 org: components["parameters"]["org"];
16077 };
16078 };
16079 responses: {
16080 /** Response */
16081 204: never;
16082 401: components["responses"]["requires_authentication"];
16083 403: components["responses"]["forbidden"];
16084 404: components["responses"]["not_found"];
16085 };
16086 };
16087 /**
16088 * Restores an entire package in an organization.
16089 *
16090 * You can restore a deleted package under the following conditions:
16091 * - The package was deleted within the last 30 days.
16092 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
16093 *
16094 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:
16095 * - If `package_type` is not `container`, your token must also include the `repo` scope.
16096 * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
16097 */
16098 "packages/restore-package-for-org": {
16099 parameters: {
16100 path: {
16101 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16102 package_type: components["parameters"]["package_type"];
16103 /** The name of the package. */
16104 package_name: components["parameters"]["package_name"];
16105 org: components["parameters"]["org"];
16106 };
16107 query: {
16108 /** package token */
16109 token?: string;
16110 };
16111 };
16112 responses: {
16113 /** Response */
16114 204: never;
16115 401: components["responses"]["requires_authentication"];
16116 403: components["responses"]["forbidden"];
16117 404: components["responses"]["not_found"];
16118 };
16119 };
16120 /**
16121 * Returns all package versions for a package owned by an organization.
16122 *
16123 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
16124 * If `package_type` is not `container`, your token must also include the `repo` scope.
16125 */
16126 "packages/get-all-package-versions-for-package-owned-by-org": {
16127 parameters: {
16128 path: {
16129 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16130 package_type: components["parameters"]["package_type"];
16131 /** The name of the package. */
16132 package_name: components["parameters"]["package_name"];
16133 org: components["parameters"]["org"];
16134 };
16135 query: {
16136 /** Page number of the results to fetch. */
16137 page?: components["parameters"]["page"];
16138 /** Results per page (max 100). */
16139 per_page?: components["parameters"]["per_page"];
16140 /** The state of the package, either active or deleted. */
16141 state?: "active" | "deleted";
16142 };
16143 };
16144 responses: {
16145 /** Response */
16146 200: {
16147 content: {
16148 "application/json": components["schemas"]["package-version"][];
16149 };
16150 };
16151 401: components["responses"]["requires_authentication"];
16152 403: components["responses"]["forbidden"];
16153 404: components["responses"]["not_found"];
16154 };
16155 };
16156 /**
16157 * Gets a specific package version in an organization.
16158 *
16159 * You must authenticate using an access token with the `packages:read` scope.
16160 * If `package_type` is not `container`, your token must also include the `repo` scope.
16161 */
16162 "packages/get-package-version-for-organization": {
16163 parameters: {
16164 path: {
16165 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16166 package_type: components["parameters"]["package_type"];
16167 /** The name of the package. */
16168 package_name: components["parameters"]["package_name"];
16169 org: components["parameters"]["org"];
16170 /** Unique identifier of the package version. */
16171 package_version_id: components["parameters"]["package_version_id"];
16172 };
16173 };
16174 responses: {
16175 /** Response */
16176 200: {
16177 content: {
16178 "application/json": components["schemas"]["package-version"];
16179 };
16180 };
16181 };
16182 };
16183 /**
16184 * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
16185 *
16186 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:
16187 * - If `package_type` is not `container`, your token must also include the `repo` scope.
16188 * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
16189 */
16190 "packages/delete-package-version-for-org": {
16191 parameters: {
16192 path: {
16193 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16194 package_type: components["parameters"]["package_type"];
16195 /** The name of the package. */
16196 package_name: components["parameters"]["package_name"];
16197 org: components["parameters"]["org"];
16198 /** Unique identifier of the package version. */
16199 package_version_id: components["parameters"]["package_version_id"];
16200 };
16201 };
16202 responses: {
16203 /** Response */
16204 204: never;
16205 401: components["responses"]["requires_authentication"];
16206 403: components["responses"]["forbidden"];
16207 404: components["responses"]["not_found"];
16208 };
16209 };
16210 /**
16211 * Restores a specific package version in an organization.
16212 *
16213 * You can restore a deleted package under the following conditions:
16214 * - The package was deleted within the last 30 days.
16215 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
16216 *
16217 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:
16218 * - If `package_type` is not `container`, your token must also include the `repo` scope.
16219 * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
16220 */
16221 "packages/restore-package-version-for-org": {
16222 parameters: {
16223 path: {
16224 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
16225 package_type: components["parameters"]["package_type"];
16226 /** The name of the package. */
16227 package_name: components["parameters"]["package_name"];
16228 org: components["parameters"]["org"];
16229 /** Unique identifier of the package version. */
16230 package_version_id: components["parameters"]["package_version_id"];
16231 };
16232 };
16233 responses: {
16234 /** Response */
16235 204: never;
16236 401: components["responses"]["requires_authentication"];
16237 403: components["responses"]["forbidden"];
16238 404: components["responses"]["not_found"];
16239 };
16240 };
16241 /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
16242 "projects/list-for-org": {
16243 parameters: {
16244 path: {
16245 org: components["parameters"]["org"];
16246 };
16247 query: {
16248 /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */
16249 state?: "open" | "closed" | "all";
16250 /** Results per page (max 100). */
16251 per_page?: components["parameters"]["per_page"];
16252 /** Page number of the results to fetch. */
16253 page?: components["parameters"]["page"];
16254 };
16255 };
16256 responses: {
16257 /** Response */
16258 200: {
16259 headers: {};
16260 content: {
16261 "application/json": components["schemas"]["project"][];
16262 };
16263 };
16264 422: components["responses"]["validation_failed_simple"];
16265 };
16266 };
16267 /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
16268 "projects/create-for-org": {
16269 parameters: {
16270 path: {
16271 org: components["parameters"]["org"];
16272 };
16273 };
16274 responses: {
16275 /** Response */
16276 201: {
16277 content: {
16278 "application/json": components["schemas"]["project"];
16279 };
16280 };
16281 401: components["responses"]["requires_authentication"];
16282 403: components["responses"]["forbidden"];
16283 404: components["responses"]["not_found"];
16284 410: components["responses"]["gone"];
16285 422: components["responses"]["validation_failed_simple"];
16286 };
16287 requestBody: {
16288 content: {
16289 "application/json": {
16290 /** The name of the project. */
16291 name: string;
16292 /** The description of the project. */
16293 body?: string;
16294 };
16295 };
16296 };
16297 };
16298 /** Members of an organization can choose to have their membership publicized or not. */
16299 "orgs/list-public-members": {
16300 parameters: {
16301 path: {
16302 org: components["parameters"]["org"];
16303 };
16304 query: {
16305 /** Results per page (max 100). */
16306 per_page?: components["parameters"]["per_page"];
16307 /** Page number of the results to fetch. */
16308 page?: components["parameters"]["page"];
16309 };
16310 };
16311 responses: {
16312 /** Response */
16313 200: {
16314 headers: {};
16315 content: {
16316 "application/json": components["schemas"]["simple-user"][];
16317 };
16318 };
16319 };
16320 };
16321 "orgs/check-public-membership-for-user": {
16322 parameters: {
16323 path: {
16324 org: components["parameters"]["org"];
16325 username: components["parameters"]["username"];
16326 };
16327 };
16328 responses: {
16329 /** Response if user is a public member */
16330 204: never;
16331 /** Not Found if user is not a public member */
16332 404: unknown;
16333 };
16334 };
16335 /**
16336 * The user can publicize their own membership. (A user cannot publicize the membership for another user.)
16337 *
16338 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
16339 */
16340 "orgs/set-public-membership-for-authenticated-user": {
16341 parameters: {
16342 path: {
16343 org: components["parameters"]["org"];
16344 username: components["parameters"]["username"];
16345 };
16346 };
16347 responses: {
16348 /** Response */
16349 204: never;
16350 403: components["responses"]["forbidden"];
16351 };
16352 };
16353 "orgs/remove-public-membership-for-authenticated-user": {
16354 parameters: {
16355 path: {
16356 org: components["parameters"]["org"];
16357 username: components["parameters"]["username"];
16358 };
16359 };
16360 responses: {
16361 /** Response */
16362 204: never;
16363 };
16364 };
16365 /** Lists repositories for the specified organization. */
16366 "repos/list-for-org": {
16367 parameters: {
16368 path: {
16369 org: components["parameters"]["org"];
16370 };
16371 query: {
16372 /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */
16373 type?:
16374 | "all"
16375 | "public"
16376 | "private"
16377 | "forks"
16378 | "sources"
16379 | "member"
16380 | "internal";
16381 /** Can be one of `created`, `updated`, `pushed`, `full_name`. */
16382 sort?: "created" | "updated" | "pushed" | "full_name";
16383 /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */
16384 direction?: "asc" | "desc";
16385 /** Results per page (max 100). */
16386 per_page?: components["parameters"]["per_page"];
16387 /** Page number of the results to fetch. */
16388 page?: components["parameters"]["page"];
16389 };
16390 };
16391 responses: {
16392 /** Response */
16393 200: {
16394 headers: {};
16395 content: {
16396 "application/json": components["schemas"]["minimal-repository"][];
16397 };
16398 };
16399 };
16400 };
16401 /**
16402 * Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
16403 *
16404 * **OAuth scope requirements**
16405 *
16406 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
16407 *
16408 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
16409 * * `repo` scope to create a private repository
16410 */
16411 "repos/create-in-org": {
16412 parameters: {
16413 path: {
16414 org: components["parameters"]["org"];
16415 };
16416 };
16417 responses: {
16418 /** Response */
16419 201: {
16420 headers: {
16421 Location?: string;
16422 };
16423 content: {
16424 "application/json": components["schemas"]["repository"];
16425 };
16426 };
16427 403: components["responses"]["forbidden"];
16428 422: components["responses"]["validation_failed"];
16429 };
16430 requestBody: {
16431 content: {
16432 "application/json": {
16433 /** The name of the repository. */
16434 name: string;
16435 /** A short description of the repository. */
16436 description?: string;
16437 /** A URL with more information about the repository. */
16438 homepage?: string;
16439 /** Whether the repository is private. */
16440 private?: boolean;
16441 /**
16442 * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation.
16443 * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header.
16444 */
16445 visibility?: "public" | "private" | "visibility" | "internal";
16446 /** Either `true` to enable issues for this repository or `false` to disable them. */
16447 has_issues?: boolean;
16448 /** Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. */
16449 has_projects?: boolean;
16450 /** Either `true` to enable the wiki for this repository or `false` to disable it. */
16451 has_wiki?: boolean;
16452 /** Either `true` to make this repo available as a template repository or `false` to prevent it. */
16453 is_template?: boolean;
16454 /** The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */
16455 team_id?: number;
16456 /** Pass `true` to create an initial commit with empty README. */
16457 auto_init?: boolean;
16458 /** Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */
16459 gitignore_template?: string;
16460 /** Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */
16461 license_template?: string;
16462 /** Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */
16463 allow_squash_merge?: boolean;
16464 /** Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */
16465 allow_merge_commit?: boolean;
16466 /** Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */
16467 allow_rebase_merge?: boolean;
16468 /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */
16469 delete_branch_on_merge?: boolean;
16470 };
16471 };
16472 };
16473 };
16474 /**
16475 * Gets the summary of the free and paid GitHub Actions minutes used.
16476 *
16477 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
16478 *
16479 * Access tokens must have the `repo` or `admin:org` scope.
16480 */
16481 "billing/get-github-actions-billing-org": {
16482 parameters: {
16483 path: {
16484 org: components["parameters"]["org"];
16485 };
16486 };
16487 responses: {
16488 /** Response */
16489 200: {
16490 content: {
16491 "application/json": components["schemas"]["actions-billing-usage"];
16492 };
16493 };
16494 };
16495 };
16496 /**
16497 * Gets the free and paid storage used for GitHub Packages in gigabytes.
16498 *
16499 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
16500 *
16501 * Access tokens must have the `repo` or `admin:org` scope.
16502 */
16503 "billing/get-github-packages-billing-org": {
16504 parameters: {
16505 path: {
16506 org: components["parameters"]["org"];
16507 };
16508 };
16509 responses: {
16510 /** Response */
16511 200: {
16512 content: {
16513 "application/json": components["schemas"]["packages-billing-usage"];
16514 };
16515 };
16516 };
16517 };
16518 /**
16519 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
16520 *
16521 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
16522 *
16523 * Access tokens must have the `repo` or `admin:org` scope.
16524 */
16525 "billing/get-shared-storage-billing-org": {
16526 parameters: {
16527 path: {
16528 org: components["parameters"]["org"];
16529 };
16530 };
16531 responses: {
16532 /** Response */
16533 200: {
16534 content: {
16535 "application/json": components["schemas"]["combined-billing-usage"];
16536 };
16537 };
16538 };
16539 };
16540 /**
16541 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
16542 *
16543 * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."
16544 *
16545 * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this:
16546 */
16547 "teams/list-idp-groups-for-org": {
16548 parameters: {
16549 path: {
16550 org: components["parameters"]["org"];
16551 };
16552 query: {
16553 /** Results per page (max 100). */
16554 per_page?: components["parameters"]["per_page"];
16555 /** Page token */
16556 page?: string;
16557 };
16558 };
16559 responses: {
16560 /** Response */
16561 200: {
16562 headers: {
16563 Link?: string;
16564 };
16565 content: {
16566 "application/json": components["schemas"]["group-mapping"];
16567 };
16568 };
16569 };
16570 };
16571 /** Lists all teams in an organization that are visible to the authenticated user. */
16572 "teams/list": {
16573 parameters: {
16574 path: {
16575 org: components["parameters"]["org"];
16576 };
16577 query: {
16578 /** Results per page (max 100). */
16579 per_page?: components["parameters"]["per_page"];
16580 /** Page number of the results to fetch. */
16581 page?: components["parameters"]["page"];
16582 };
16583 };
16584 responses: {
16585 /** Response */
16586 200: {
16587 headers: {};
16588 content: {
16589 "application/json": components["schemas"]["team"][];
16590 };
16591 };
16592 403: components["responses"]["forbidden"];
16593 };
16594 };
16595 /**
16596 * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)."
16597 *
16598 * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)".
16599 */
16600 "teams/create": {
16601 parameters: {
16602 path: {
16603 org: components["parameters"]["org"];
16604 };
16605 };
16606 responses: {
16607 /** Response */
16608 201: {
16609 content: {
16610 "application/json": components["schemas"]["team-full"];
16611 };
16612 };
16613 403: components["responses"]["forbidden"];
16614 422: components["responses"]["validation_failed"];
16615 };
16616 requestBody: {
16617 content: {
16618 "application/json": {
16619 /** The name of the team. */
16620 name: string;
16621 /** The description of the team. */
16622 description?: string;
16623 /** List GitHub IDs for organization members who will become team maintainers. */
16624 maintainers?: string[];
16625 /** The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */
16626 repo_names?: string[];
16627 /**
16628 * The level of privacy this team should have. The options are:
16629 * **For a non-nested team:**
16630 * \* `secret` - only visible to organization owners and members of this team.
16631 * \* `closed` - visible to all members of this organization.
16632 * Default: `secret`
16633 * **For a parent or child team:**
16634 * \* `closed` - visible to all members of this organization.
16635 * Default for child team: `closed`
16636 */
16637 privacy?: "secret" | "closed";
16638 /**
16639 * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:
16640 * \* `pull` - team members can pull, but not push to or administer newly-added repositories.
16641 * \* `push` - team members can pull and push, but not administer newly-added repositories.
16642 * \* `admin` - team members can pull, push and administer newly-added repositories.
16643 */
16644 permission?: "pull" | "push" | "admin";
16645 /** The ID of a team to set as the parent team. */
16646 parent_team_id?: number;
16647 };
16648 };
16649 };
16650 };
16651 /**
16652 * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.
16653 *
16654 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.
16655 */
16656 "teams/get-by-name": {
16657 parameters: {
16658 path: {
16659 org: components["parameters"]["org"];
16660 /** team_slug parameter */
16661 team_slug: components["parameters"]["team_slug"];
16662 };
16663 };
16664 responses: {
16665 /** Response */
16666 200: {
16667 content: {
16668 "application/json": components["schemas"]["team-full"];
16669 };
16670 };
16671 404: components["responses"]["not_found"];
16672 };
16673 };
16674 /**
16675 * To delete a team, the authenticated user must be an organization owner or team maintainer.
16676 *
16677 * If you are an organization owner, deleting a parent team will delete all of its child teams as well.
16678 *
16679 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.
16680 */
16681 "teams/delete-in-org": {
16682 parameters: {
16683 path: {
16684 org: components["parameters"]["org"];
16685 /** team_slug parameter */
16686 team_slug: components["parameters"]["team_slug"];
16687 };
16688 };
16689 responses: {
16690 /** Response */
16691 204: never;
16692 };
16693 };
16694 /**
16695 * To edit a team, the authenticated user must either be an organization owner or a team maintainer.
16696 *
16697 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.
16698 */
16699 "teams/update-in-org": {
16700 parameters: {
16701 path: {
16702 org: components["parameters"]["org"];
16703 /** team_slug parameter */
16704 team_slug: components["parameters"]["team_slug"];
16705 };
16706 };
16707 responses: {
16708 /** Response */
16709 201: {
16710 content: {
16711 "application/json": components["schemas"]["team-full"];
16712 };
16713 };
16714 };
16715 requestBody: {
16716 content: {
16717 "application/json": {
16718 /** The name of the team. */
16719 name?: string;
16720 /** The description of the team. */
16721 description?: string;
16722 /**
16723 * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are:
16724 * **For a non-nested team:**
16725 * \* `secret` - only visible to organization owners and members of this team.
16726 * \* `closed` - visible to all members of this organization.
16727 * **For a parent or child team:**
16728 * \* `closed` - visible to all members of this organization.
16729 */
16730 privacy?: "secret" | "closed";
16731 /**
16732 * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:
16733 * \* `pull` - team members can pull, but not push to or administer newly-added repositories.
16734 * \* `push` - team members can pull and push, but not administer newly-added repositories.
16735 * \* `admin` - team members can pull, push and administer newly-added repositories.
16736 */
16737 permission?: "pull" | "push" | "admin";
16738 /** The ID of a team to set as the parent team. */
16739 parent_team_id?: number | null;
16740 };
16741 };
16742 };
16743 };
16744 /**
16745 * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16746 *
16747 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.
16748 */
16749 "teams/list-discussions-in-org": {
16750 parameters: {
16751 path: {
16752 org: components["parameters"]["org"];
16753 /** team_slug parameter */
16754 team_slug: components["parameters"]["team_slug"];
16755 };
16756 query: {
16757 /** One of `asc` (ascending) or `desc` (descending). */
16758 direction?: components["parameters"]["direction"];
16759 /** Results per page (max 100). */
16760 per_page?: components["parameters"]["per_page"];
16761 /** Page number of the results to fetch. */
16762 page?: components["parameters"]["page"];
16763 /** Pinned discussions only filter */
16764 pinned?: string;
16765 };
16766 };
16767 responses: {
16768 /** Response */
16769 200: {
16770 headers: {};
16771 content: {
16772 "application/json": components["schemas"]["team-discussion"][];
16773 };
16774 };
16775 };
16776 };
16777 /**
16778 * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16779 *
16780 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
16781 *
16782 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.
16783 */
16784 "teams/create-discussion-in-org": {
16785 parameters: {
16786 path: {
16787 org: components["parameters"]["org"];
16788 /** team_slug parameter */
16789 team_slug: components["parameters"]["team_slug"];
16790 };
16791 };
16792 responses: {
16793 /** Response */
16794 201: {
16795 content: {
16796 "application/json": components["schemas"]["team-discussion"];
16797 };
16798 };
16799 };
16800 requestBody: {
16801 content: {
16802 "application/json": {
16803 /** The discussion post's title. */
16804 title: string;
16805 /** The discussion post's body text. */
16806 body: string;
16807 /** Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. */
16808 private?: boolean;
16809 };
16810 };
16811 };
16812 };
16813 /**
16814 * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16815 *
16816 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
16817 */
16818 "teams/get-discussion-in-org": {
16819 parameters: {
16820 path: {
16821 org: components["parameters"]["org"];
16822 /** team_slug parameter */
16823 team_slug: components["parameters"]["team_slug"];
16824 discussion_number: components["parameters"]["discussion-number"];
16825 };
16826 };
16827 responses: {
16828 /** Response */
16829 200: {
16830 content: {
16831 "application/json": components["schemas"]["team-discussion"];
16832 };
16833 };
16834 };
16835 };
16836 /**
16837 * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16838 *
16839 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
16840 */
16841 "teams/delete-discussion-in-org": {
16842 parameters: {
16843 path: {
16844 org: components["parameters"]["org"];
16845 /** team_slug parameter */
16846 team_slug: components["parameters"]["team_slug"];
16847 discussion_number: components["parameters"]["discussion-number"];
16848 };
16849 };
16850 responses: {
16851 /** Response */
16852 204: never;
16853 };
16854 };
16855 /**
16856 * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16857 *
16858 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
16859 */
16860 "teams/update-discussion-in-org": {
16861 parameters: {
16862 path: {
16863 org: components["parameters"]["org"];
16864 /** team_slug parameter */
16865 team_slug: components["parameters"]["team_slug"];
16866 discussion_number: components["parameters"]["discussion-number"];
16867 };
16868 };
16869 responses: {
16870 /** Response */
16871 200: {
16872 content: {
16873 "application/json": components["schemas"]["team-discussion"];
16874 };
16875 };
16876 };
16877 requestBody: {
16878 content: {
16879 "application/json": {
16880 /** The discussion post's title. */
16881 title?: string;
16882 /** The discussion post's body text. */
16883 body?: string;
16884 };
16885 };
16886 };
16887 };
16888 /**
16889 * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16890 *
16891 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
16892 */
16893 "teams/list-discussion-comments-in-org": {
16894 parameters: {
16895 path: {
16896 org: components["parameters"]["org"];
16897 /** team_slug parameter */
16898 team_slug: components["parameters"]["team_slug"];
16899 discussion_number: components["parameters"]["discussion-number"];
16900 };
16901 query: {
16902 /** One of `asc` (ascending) or `desc` (descending). */
16903 direction?: components["parameters"]["direction"];
16904 /** Results per page (max 100). */
16905 per_page?: components["parameters"]["per_page"];
16906 /** Page number of the results to fetch. */
16907 page?: components["parameters"]["page"];
16908 };
16909 };
16910 responses: {
16911 /** Response */
16912 200: {
16913 headers: {};
16914 content: {
16915 "application/json": components["schemas"]["team-discussion-comment"][];
16916 };
16917 };
16918 };
16919 };
16920 /**
16921 * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16922 *
16923 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
16924 *
16925 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
16926 */
16927 "teams/create-discussion-comment-in-org": {
16928 parameters: {
16929 path: {
16930 org: components["parameters"]["org"];
16931 /** team_slug parameter */
16932 team_slug: components["parameters"]["team_slug"];
16933 discussion_number: components["parameters"]["discussion-number"];
16934 };
16935 };
16936 responses: {
16937 /** Response */
16938 201: {
16939 content: {
16940 "application/json": components["schemas"]["team-discussion-comment"];
16941 };
16942 };
16943 };
16944 requestBody: {
16945 content: {
16946 "application/json": {
16947 /** The discussion comment's body text. */
16948 body: string;
16949 };
16950 };
16951 };
16952 };
16953 /**
16954 * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16955 *
16956 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
16957 */
16958 "teams/get-discussion-comment-in-org": {
16959 parameters: {
16960 path: {
16961 org: components["parameters"]["org"];
16962 /** team_slug parameter */
16963 team_slug: components["parameters"]["team_slug"];
16964 discussion_number: components["parameters"]["discussion-number"];
16965 comment_number: components["parameters"]["comment-number"];
16966 };
16967 };
16968 responses: {
16969 /** Response */
16970 200: {
16971 content: {
16972 "application/json": components["schemas"]["team-discussion-comment"];
16973 };
16974 };
16975 };
16976 };
16977 /**
16978 * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16979 *
16980 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
16981 */
16982 "teams/delete-discussion-comment-in-org": {
16983 parameters: {
16984 path: {
16985 org: components["parameters"]["org"];
16986 /** team_slug parameter */
16987 team_slug: components["parameters"]["team_slug"];
16988 discussion_number: components["parameters"]["discussion-number"];
16989 comment_number: components["parameters"]["comment-number"];
16990 };
16991 };
16992 responses: {
16993 /** Response */
16994 204: never;
16995 };
16996 };
16997 /**
16998 * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
16999 *
17000 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
17001 */
17002 "teams/update-discussion-comment-in-org": {
17003 parameters: {
17004 path: {
17005 org: components["parameters"]["org"];
17006 /** team_slug parameter */
17007 team_slug: components["parameters"]["team_slug"];
17008 discussion_number: components["parameters"]["discussion-number"];
17009 comment_number: components["parameters"]["comment-number"];
17010 };
17011 };
17012 responses: {
17013 /** Response */
17014 200: {
17015 content: {
17016 "application/json": components["schemas"]["team-discussion-comment"];
17017 };
17018 };
17019 };
17020 requestBody: {
17021 content: {
17022 "application/json": {
17023 /** The discussion comment's body text. */
17024 body: string;
17025 };
17026 };
17027 };
17028 };
17029 /**
17030 * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
17031 *
17032 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
17033 */
17034 "reactions/list-for-team-discussion-comment-in-org": {
17035 parameters: {
17036 path: {
17037 org: components["parameters"]["org"];
17038 /** team_slug parameter */
17039 team_slug: components["parameters"]["team_slug"];
17040 discussion_number: components["parameters"]["discussion-number"];
17041 comment_number: components["parameters"]["comment-number"];
17042 };
17043 query: {
17044 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */
17045 content?:
17046 | "+1"
17047 | "-1"
17048 | "laugh"
17049 | "confused"
17050 | "heart"
17051 | "hooray"
17052 | "rocket"
17053 | "eyes";
17054 /** Results per page (max 100). */
17055 per_page?: components["parameters"]["per_page"];
17056 /** Page number of the results to fetch. */
17057 page?: components["parameters"]["page"];
17058 };
17059 };
17060 responses: {
17061 /** Response */
17062 200: {
17063 headers: {};
17064 content: {
17065 "application/json": components["schemas"]["reaction"][];
17066 };
17067 };
17068 };
17069 };
17070 /**
17071 * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
17072 *
17073 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
17074 */
17075 "reactions/create-for-team-discussion-comment-in-org": {
17076 parameters: {
17077 path: {
17078 org: components["parameters"]["org"];
17079 /** team_slug parameter */
17080 team_slug: components["parameters"]["team_slug"];
17081 discussion_number: components["parameters"]["discussion-number"];
17082 comment_number: components["parameters"]["comment-number"];
17083 };
17084 };
17085 responses: {
17086 /** Response */
17087 200: {
17088 content: {
17089 "application/json": components["schemas"]["reaction"];
17090 };
17091 };
17092 /** Response */
17093 201: {
17094 content: {
17095 "application/json": components["schemas"]["reaction"];
17096 };
17097 };
17098 };
17099 requestBody: {
17100 content: {
17101 "application/json": {
17102 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */
17103 content:
17104 | "+1"
17105 | "-1"
17106 | "laugh"
17107 | "confused"
17108 | "heart"
17109 | "hooray"
17110 | "rocket"
17111 | "eyes";
17112 };
17113 };
17114 };
17115 };
17116 /**
17117 * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.
17118 *
17119 * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
17120 */
17121 "reactions/delete-for-team-discussion-comment": {
17122 parameters: {
17123 path: {
17124 org: components["parameters"]["org"];
17125 /** team_slug parameter */
17126 team_slug: components["parameters"]["team_slug"];
17127 discussion_number: components["parameters"]["discussion-number"];
17128 comment_number: components["parameters"]["comment-number"];
17129 reaction_id: components["parameters"]["reaction-id"];
17130 };
17131 };
17132 responses: {
17133 /** Response */
17134 204: never;
17135 };
17136 };
17137 /**
17138 * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
17139 *
17140 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
17141 */
17142 "reactions/list-for-team-discussion-in-org": {
17143 parameters: {
17144 path: {
17145 org: components["parameters"]["org"];
17146 /** team_slug parameter */
17147 team_slug: components["parameters"]["team_slug"];
17148 discussion_number: components["parameters"]["discussion-number"];
17149 };
17150 query: {
17151 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */
17152 content?:
17153 | "+1"
17154 | "-1"
17155 | "laugh"
17156 | "confused"
17157 | "heart"
17158 | "hooray"
17159 | "rocket"
17160 | "eyes";
17161 /** Results per page (max 100). */
17162 per_page?: components["parameters"]["per_page"];
17163 /** Page number of the results to fetch. */
17164 page?: components["parameters"]["page"];
17165 };
17166 };
17167 responses: {
17168 /** Response */
17169 200: {
17170 headers: {};
17171 content: {
17172 "application/json": components["schemas"]["reaction"][];
17173 };
17174 };
17175 };
17176 };
17177 /**
17178 * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
17179 *
17180 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
17181 */
17182 "reactions/create-for-team-discussion-in-org": {
17183 parameters: {
17184 path: {
17185 org: components["parameters"]["org"];
17186 /** team_slug parameter */
17187 team_slug: components["parameters"]["team_slug"];
17188 discussion_number: components["parameters"]["discussion-number"];
17189 };
17190 };
17191 responses: {
17192 /** Response */
17193 200: {
17194 content: {
17195 "application/json": components["schemas"]["reaction"];
17196 };
17197 };
17198 /** Response */
17199 201: {
17200 content: {
17201 "application/json": components["schemas"]["reaction"];
17202 };
17203 };
17204 };
17205 requestBody: {
17206 content: {
17207 "application/json": {
17208 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */
17209 content:
17210 | "+1"
17211 | "-1"
17212 | "laugh"
17213 | "confused"
17214 | "heart"
17215 | "hooray"
17216 | "rocket"
17217 | "eyes";
17218 };
17219 };
17220 };
17221 };
17222 /**
17223 * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.
17224 *
17225 * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
17226 */
17227 "reactions/delete-for-team-discussion": {
17228 parameters: {
17229 path: {
17230 org: components["parameters"]["org"];
17231 /** team_slug parameter */
17232 team_slug: components["parameters"]["team_slug"];
17233 discussion_number: components["parameters"]["discussion-number"];
17234 reaction_id: components["parameters"]["reaction-id"];
17235 };
17236 };
17237 responses: {
17238 /** Response */
17239 204: never;
17240 };
17241 };
17242 /**
17243 * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
17244 *
17245 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.
17246 */
17247 "teams/list-pending-invitations-in-org": {
17248 parameters: {
17249 path: {
17250 org: components["parameters"]["org"];
17251 /** team_slug parameter */
17252 team_slug: components["parameters"]["team_slug"];
17253 };
17254 query: {
17255 /** Results per page (max 100). */
17256 per_page?: components["parameters"]["per_page"];
17257 /** Page number of the results to fetch. */
17258 page?: components["parameters"]["page"];
17259 };
17260 };
17261 responses: {
17262 /** Response */
17263 200: {
17264 headers: {};
17265 content: {
17266 "application/json": components["schemas"]["organization-invitation"][];
17267 };
17268 };
17269 };
17270 };
17271 /**
17272 * Team members will include the members of child teams.
17273 *
17274 * To list members in a team, the team must be visible to the authenticated user.
17275 */
17276 "teams/list-members-in-org": {
17277 parameters: {
17278 path: {
17279 org: components["parameters"]["org"];
17280 /** team_slug parameter */
17281 team_slug: components["parameters"]["team_slug"];
17282 };
17283 query: {
17284 /**
17285 * Filters members returned by their role in the team. Can be one of:
17286 * \* `member` - normal members of the team.
17287 * \* `maintainer` - team maintainers.
17288 * \* `all` - all members of the team.
17289 */
17290 role?: "member" | "maintainer" | "all";
17291 /** Results per page (max 100). */
17292 per_page?: components["parameters"]["per_page"];
17293 /** Page number of the results to fetch. */
17294 page?: components["parameters"]["page"];
17295 };
17296 };
17297 responses: {
17298 /** Response */
17299 200: {
17300 headers: {};
17301 content: {
17302 "application/json": components["schemas"]["simple-user"][];
17303 };
17304 };
17305 };
17306 };
17307 /**
17308 * Team members will include the members of child teams.
17309 *
17310 * To get a user's membership with a team, the team must be visible to the authenticated user.
17311 *
17312 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.
17313 *
17314 * **Note:**
17315 * The response contains the `state` of the membership and the member's `role`.
17316 *
17317 * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
17318 */
17319 "teams/get-membership-for-user-in-org": {
17320 parameters: {
17321 path: {
17322 org: components["parameters"]["org"];
17323 /** team_slug parameter */
17324 team_slug: components["parameters"]["team_slug"];
17325 username: components["parameters"]["username"];
17326 };
17327 };
17328 responses: {
17329 /** Response */
17330 200: {
17331 content: {
17332 "application/json": components["schemas"]["team-membership"];
17333 };
17334 };
17335 /** if user has no team membership */
17336 404: unknown;
17337 };
17338 };
17339 /**
17340 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
17341 *
17342 * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
17343 *
17344 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
17345 *
17346 * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.
17347 *
17348 * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
17349 *
17350 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.
17351 */
17352 "teams/add-or-update-membership-for-user-in-org": {
17353 parameters: {
17354 path: {
17355 org: components["parameters"]["org"];
17356 /** team_slug parameter */
17357 team_slug: components["parameters"]["team_slug"];
17358 username: components["parameters"]["username"];
17359 };
17360 };
17361 responses: {
17362 /** Response */
17363 200: {
17364 content: {
17365 "application/json": components["schemas"]["team-membership"];
17366 };
17367 };
17368 /** Forbidden if team synchronization is set up */
17369 403: unknown;
17370 /** Unprocessable Entity if you attempt to add an organization to a team */
17371 422: unknown;
17372 };
17373 requestBody: {
17374 content: {
17375 "application/json": {
17376 /**
17377 * The role that this user should have in the team. Can be one of:
17378 * \* `member` - a normal member of the team.
17379 * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
17380 */
17381 role?: "member" | "maintainer";
17382 };
17383 };
17384 };
17385 };
17386 /**
17387 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
17388 *
17389 * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
17390 *
17391 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
17392 *
17393 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.
17394 */
17395 "teams/remove-membership-for-user-in-org": {
17396 parameters: {
17397 path: {
17398 org: components["parameters"]["org"];
17399 /** team_slug parameter */
17400 team_slug: components["parameters"]["team_slug"];
17401 username: components["parameters"]["username"];
17402 };
17403 };
17404 responses: {
17405 /** Response */
17406 204: never;
17407 /** Forbidden if team synchronization is set up */
17408 403: unknown;
17409 };
17410 };
17411 /**
17412 * Lists the organization projects for a team.
17413 *
17414 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.
17415 */
17416 "teams/list-projects-in-org": {
17417 parameters: {
17418 path: {
17419 org: components["parameters"]["org"];
17420 /** team_slug parameter */
17421 team_slug: components["parameters"]["team_slug"];
17422 };
17423 query: {
17424 /** Results per page (max 100). */
17425 per_page?: components["parameters"]["per_page"];
17426 /** Page number of the results to fetch. */
17427 page?: components["parameters"]["page"];
17428 };
17429 };
17430 responses: {
17431 /** Response */
17432 200: {
17433 headers: {};
17434 content: {
17435 "application/json": components["schemas"]["team-project"][];
17436 };
17437 };
17438 };
17439 };
17440 /**
17441 * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
17442 *
17443 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
17444 */
17445 "teams/check-permissions-for-project-in-org": {
17446 parameters: {
17447 path: {
17448 org: components["parameters"]["org"];
17449 /** team_slug parameter */
17450 team_slug: components["parameters"]["team_slug"];
17451 project_id: components["parameters"]["project-id"];
17452 };
17453 };
17454 responses: {
17455 /** Response */
17456 200: {
17457 content: {
17458 "application/json": components["schemas"]["team-project"];
17459 };
17460 };
17461 /** Not Found if project is not managed by this team */
17462 404: unknown;
17463 };
17464 };
17465 /**
17466 * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
17467 *
17468 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
17469 */
17470 "teams/add-or-update-project-permissions-in-org": {
17471 parameters: {
17472 path: {
17473 org: components["parameters"]["org"];
17474 /** team_slug parameter */
17475 team_slug: components["parameters"]["team_slug"];
17476 project_id: components["parameters"]["project-id"];
17477 };
17478 };
17479 responses: {
17480 /** Response */
17481 204: never;
17482 /** Forbidden if the project is not owned by the organization */
17483 403: {
17484 content: {
17485 "application/json": {
17486 message?: string;
17487 documentation_url?: string;
17488 };
17489 };
17490 };
17491 };
17492 requestBody: {
17493 content: {
17494 "application/json": {
17495 /**
17496 * The permission to grant to the team for this project. Can be one of:
17497 * \* `read` - team members can read, but not write to or administer this project.
17498 * \* `write` - team members can read and write, but not administer this project.
17499 * \* `admin` - team members can read, write and administer this project.
17500 * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
17501 */
17502 permission?: "read" | "write" | "admin";
17503 } | null;
17504 };
17505 };
17506 };
17507 /**
17508 * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.
17509 *
17510 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
17511 */
17512 "teams/remove-project-in-org": {
17513 parameters: {
17514 path: {
17515 org: components["parameters"]["org"];
17516 /** team_slug parameter */
17517 team_slug: components["parameters"]["team_slug"];
17518 project_id: components["parameters"]["project-id"];
17519 };
17520 };
17521 responses: {
17522 /** Response */
17523 204: never;
17524 };
17525 };
17526 /**
17527 * Lists a team's repositories visible to the authenticated user.
17528 *
17529 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.
17530 */
17531 "teams/list-repos-in-org": {
17532 parameters: {
17533 path: {
17534 org: components["parameters"]["org"];
17535 /** team_slug parameter */
17536 team_slug: components["parameters"]["team_slug"];
17537 };
17538 query: {
17539 /** Results per page (max 100). */
17540 per_page?: components["parameters"]["per_page"];
17541 /** Page number of the results to fetch. */
17542 page?: components["parameters"]["page"];
17543 };
17544 };
17545 responses: {
17546 /** Response */
17547 200: {
17548 headers: {};
17549 content: {
17550 "application/json": components["schemas"]["minimal-repository"][];
17551 };
17552 };
17553 };
17554 };
17555 /**
17556 * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.
17557 *
17558 * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.
17559 *
17560 * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.
17561 *
17562 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
17563 */
17564 "teams/check-permissions-for-repo-in-org": {
17565 parameters: {
17566 path: {
17567 org: components["parameters"]["org"];
17568 /** team_slug parameter */
17569 team_slug: components["parameters"]["team_slug"];
17570 owner: components["parameters"]["owner"];
17571 repo: components["parameters"]["repo"];
17572 };
17573 };
17574 responses: {
17575 /** Alternative response with repository permissions */
17576 200: {
17577 content: {
17578 "application/json": components["schemas"]["team-repository"];
17579 };
17580 };
17581 /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */
17582 204: never;
17583 /** Not Found if team does not have permission for the repository */
17584 404: unknown;
17585 };
17586 };
17587 /**
17588 * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
17589 *
17590 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
17591 *
17592 * For more information about the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".
17593 */
17594 "teams/add-or-update-repo-permissions-in-org": {
17595 parameters: {
17596 path: {
17597 org: components["parameters"]["org"];
17598 /** team_slug parameter */
17599 team_slug: components["parameters"]["team_slug"];
17600 owner: components["parameters"]["owner"];
17601 repo: components["parameters"]["repo"];
17602 };
17603 };
17604 responses: {
17605 /** Response */
17606 204: never;
17607 };
17608 requestBody: {
17609 content: {
17610 "application/json": {
17611 /**
17612 * The permission to grant the team on this repository. Can be one of:
17613 * \* `pull` - team members can pull, but not push to or administer this repository.
17614 * \* `push` - team members can pull and push, but not administer this repository.
17615 * \* `admin` - team members can pull, push and administer this repository.
17616 * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations.
17617 * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations.
17618 *
17619 * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.
17620 */
17621 permission?: "pull" | "push" | "admin" | "maintain" | "triage";
17622 };
17623 };
17624 };
17625 };
17626 /**
17627 * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
17628 *
17629 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
17630 */
17631 "teams/remove-repo-in-org": {
17632 parameters: {
17633 path: {
17634 org: components["parameters"]["org"];
17635 /** team_slug parameter */
17636 team_slug: components["parameters"]["team_slug"];
17637 owner: components["parameters"]["owner"];
17638 repo: components["parameters"]["repo"];
17639 };
17640 };
17641 responses: {
17642 /** Response */
17643 204: never;
17644 };
17645 };
17646 /**
17647 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
17648 *
17649 * List IdP groups connected to a team on GitHub.
17650 *
17651 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
17652 */
17653 "teams/list-idp-groups-in-org": {
17654 parameters: {
17655 path: {
17656 org: components["parameters"]["org"];
17657 /** team_slug parameter */
17658 team_slug: components["parameters"]["team_slug"];
17659 };
17660 };
17661 responses: {
17662 /** Response */
17663 200: {
17664 content: {
17665 "application/json": components["schemas"]["group-mapping"];
17666 };
17667 };
17668 };
17669 };
17670 /**
17671 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
17672 *
17673 * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
17674 *
17675 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
17676 */
17677 "teams/create-or-update-idp-group-connections-in-org": {
17678 parameters: {
17679 path: {
17680 org: components["parameters"]["org"];
17681 /** team_slug parameter */
17682 team_slug: components["parameters"]["team_slug"];
17683 };
17684 };
17685 responses: {
17686 /** Response */
17687 200: {
17688 content: {
17689 "application/json": components["schemas"]["group-mapping"];
17690 };
17691 };
17692 };
17693 requestBody: {
17694 content: {
17695 "application/json": {
17696 /** The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */
17697 groups?: {
17698 /** ID of the IdP group. */
17699 group_id: string;
17700 /** Name of the IdP group. */
17701 group_name: string;
17702 /** Description of the IdP group. */
17703 group_description: string;
17704 }[];
17705 };
17706 };
17707 };
17708 };
17709 /**
17710 * Lists the child teams of the team specified by `{team_slug}`.
17711 *
17712 * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.
17713 */
17714 "teams/list-child-in-org": {
17715 parameters: {
17716 path: {
17717 org: components["parameters"]["org"];
17718 /** team_slug parameter */
17719 team_slug: components["parameters"]["team_slug"];
17720 };
17721 query: {
17722 /** Results per page (max 100). */
17723 per_page?: components["parameters"]["per_page"];
17724 /** Page number of the results to fetch. */
17725 page?: components["parameters"]["page"];
17726 };
17727 };
17728 responses: {
17729 /** if child teams exist */
17730 200: {
17731 headers: {};
17732 content: {
17733 "application/json": components["schemas"]["team"][];
17734 };
17735 };
17736 };
17737 };
17738 "projects/get-card": {
17739 parameters: {
17740 path: {
17741 /** card_id parameter */
17742 card_id: components["parameters"]["card_id"];
17743 };
17744 };
17745 responses: {
17746 /** Response */
17747 200: {
17748 content: {
17749 "application/json": components["schemas"]["project-card"];
17750 };
17751 };
17752 304: components["responses"]["not_modified"];
17753 401: components["responses"]["requires_authentication"];
17754 403: components["responses"]["forbidden"];
17755 404: components["responses"]["not_found"];
17756 };
17757 };
17758 "projects/delete-card": {
17759 parameters: {
17760 path: {
17761 /** card_id parameter */
17762 card_id: components["parameters"]["card_id"];
17763 };
17764 };
17765 responses: {
17766 /** Response */
17767 204: never;
17768 304: components["responses"]["not_modified"];
17769 401: components["responses"]["requires_authentication"];
17770 /** Forbidden */
17771 403: {
17772 content: {
17773 "application/json": {
17774 message?: string;
17775 documentation_url?: string;
17776 errors?: string[];
17777 };
17778 };
17779 };
17780 404: components["responses"]["not_found"];
17781 };
17782 };
17783 "projects/update-card": {
17784 parameters: {
17785 path: {
17786 /** card_id parameter */
17787 card_id: components["parameters"]["card_id"];
17788 };
17789 };
17790 responses: {
17791 /** Response */
17792 200: {
17793 content: {
17794 "application/json": components["schemas"]["project-card"];
17795 };
17796 };
17797 304: components["responses"]["not_modified"];
17798 401: components["responses"]["requires_authentication"];
17799 403: components["responses"]["forbidden"];
17800 404: components["responses"]["not_found"];
17801 422: components["responses"]["validation_failed_simple"];
17802 };
17803 requestBody: {
17804 content: {
17805 "application/json": {
17806 /** The project card's note */
17807 note?: string | null;
17808 /** Whether or not the card is archived */
17809 archived?: boolean;
17810 };
17811 };
17812 };
17813 };
17814 "projects/move-card": {
17815 parameters: {
17816 path: {
17817 /** card_id parameter */
17818 card_id: components["parameters"]["card_id"];
17819 };
17820 };
17821 responses: {
17822 /** Response */
17823 201: {
17824 content: {
17825 "application/json": { [key: string]: any };
17826 };
17827 };
17828 304: components["responses"]["not_modified"];
17829 401: components["responses"]["requires_authentication"];
17830 /** Forbidden */
17831 403: {
17832 content: {
17833 "application/json": {
17834 message?: string;
17835 documentation_url?: string;
17836 errors?: {
17837 code?: string;
17838 message?: string;
17839 resource?: string;
17840 field?: string;
17841 }[];
17842 };
17843 };
17844 };
17845 422: components["responses"]["validation_failed"];
17846 /** Response */
17847 503: {
17848 content: {
17849 "application/json": {
17850 code?: string;
17851 message?: string;
17852 documentation_url?: string;
17853 errors?: {
17854 code?: string;
17855 message?: string;
17856 }[];
17857 };
17858 };
17859 };
17860 };
17861 requestBody: {
17862 content: {
17863 "application/json": {
17864 /** The position of the card in a column. Can be one of: `top`, `bottom`, or `after:<card_id>` to place after the specified card. */
17865 position: string;
17866 /** The unique identifier of the column the card should be moved to */
17867 column_id?: number;
17868 };
17869 };
17870 };
17871 };
17872 "projects/get-column": {
17873 parameters: {
17874 path: {
17875 /** column_id parameter */
17876 column_id: components["parameters"]["column_id"];
17877 };
17878 };
17879 responses: {
17880 /** Response */
17881 200: {
17882 content: {
17883 "application/json": components["schemas"]["project-column"];
17884 };
17885 };
17886 304: components["responses"]["not_modified"];
17887 401: components["responses"]["requires_authentication"];
17888 403: components["responses"]["forbidden"];
17889 404: components["responses"]["not_found"];
17890 };
17891 };
17892 "projects/delete-column": {
17893 parameters: {
17894 path: {
17895 /** column_id parameter */
17896 column_id: components["parameters"]["column_id"];
17897 };
17898 };
17899 responses: {
17900 /** Response */
17901 204: never;
17902 304: components["responses"]["not_modified"];
17903 401: components["responses"]["requires_authentication"];
17904 403: components["responses"]["forbidden"];
17905 };
17906 };
17907 "projects/update-column": {
17908 parameters: {
17909 path: {
17910 /** column_id parameter */
17911 column_id: components["parameters"]["column_id"];
17912 };
17913 };
17914 responses: {
17915 /** Response */
17916 200: {
17917 content: {
17918 "application/json": components["schemas"]["project-column"];
17919 };
17920 };
17921 304: components["responses"]["not_modified"];
17922 401: components["responses"]["requires_authentication"];
17923 403: components["responses"]["forbidden"];
17924 };
17925 requestBody: {
17926 content: {
17927 "application/json": {
17928 /** Name of the project column */
17929 name: string;
17930 };
17931 };
17932 };
17933 };
17934 "projects/list-cards": {
17935 parameters: {
17936 path: {
17937 /** column_id parameter */
17938 column_id: components["parameters"]["column_id"];
17939 };
17940 query: {
17941 /** Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. */
17942 archived_state?: "all" | "archived" | "not_archived";
17943 /** Results per page (max 100). */
17944 per_page?: components["parameters"]["per_page"];
17945 /** Page number of the results to fetch. */
17946 page?: components["parameters"]["page"];
17947 };
17948 };
17949 responses: {
17950 /** Response */
17951 200: {
17952 headers: {};
17953 content: {
17954 "application/json": components["schemas"]["project-card"][];
17955 };
17956 };
17957 304: components["responses"]["not_modified"];
17958 401: components["responses"]["requires_authentication"];
17959 403: components["responses"]["forbidden"];
17960 };
17961 };
17962 "projects/create-card": {
17963 parameters: {
17964 path: {
17965 /** column_id parameter */
17966 column_id: components["parameters"]["column_id"];
17967 };
17968 };
17969 responses: {
17970 /** Response */
17971 201: {
17972 content: {
17973 "application/json": components["schemas"]["project-card"];
17974 };
17975 };
17976 304: components["responses"]["not_modified"];
17977 401: components["responses"]["requires_authentication"];
17978 403: components["responses"]["forbidden"];
17979 /** Validation failed */
17980 422: {
17981 content: {
17982 "application/json":
17983 | components["schemas"]["validation-error"]
17984 | components["schemas"]["validation-error-simple"];
17985 };
17986 };
17987 /** Response */
17988 503: {
17989 content: {
17990 "application/json": {
17991 code?: string;
17992 message?: string;
17993 documentation_url?: string;
17994 errors?: {
17995 code?: string;
17996 message?: string;
17997 }[];
17998 };
17999 };
18000 };
18001 };
18002 requestBody: {
18003 content: {
18004 "application/json":
18005 | {
18006 /** The project card's note */
18007 note: string | null;
18008 }
18009 | {
18010 /** The unique identifier of the content associated with the card */
18011 content_id: number;
18012 /** The piece of content associated with the card */
18013 content_type: string;
18014 };
18015 };
18016 };
18017 };
18018 "projects/move-column": {
18019 parameters: {
18020 path: {
18021 /** column_id parameter */
18022 column_id: components["parameters"]["column_id"];
18023 };
18024 };
18025 responses: {
18026 /** Response */
18027 201: {
18028 content: {
18029 "application/json": { [key: string]: any };
18030 };
18031 };
18032 304: components["responses"]["not_modified"];
18033 401: components["responses"]["requires_authentication"];
18034 403: components["responses"]["forbidden"];
18035 422: components["responses"]["validation_failed_simple"];
18036 };
18037 requestBody: {
18038 content: {
18039 "application/json": {
18040 /** The position of the column in a project. Can be one of: `first`, `last`, or `after:<column_id>` to place after the specified column. */
18041 position: string;
18042 };
18043 };
18044 };
18045 };
18046 /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
18047 "projects/get": {
18048 parameters: {
18049 path: {
18050 project_id: components["parameters"]["project-id"];
18051 };
18052 };
18053 responses: {
18054 /** Response */
18055 200: {
18056 content: {
18057 "application/json": components["schemas"]["project"];
18058 };
18059 };
18060 304: components["responses"]["not_modified"];
18061 401: components["responses"]["requires_authentication"];
18062 403: components["responses"]["forbidden"];
18063 };
18064 };
18065 /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */
18066 "projects/delete": {
18067 parameters: {
18068 path: {
18069 project_id: components["parameters"]["project-id"];
18070 };
18071 };
18072 responses: {
18073 /** Delete Success */
18074 204: never;
18075 304: components["responses"]["not_modified"];
18076 401: components["responses"]["requires_authentication"];
18077 /** Forbidden */
18078 403: {
18079 content: {
18080 "application/json": {
18081 message?: string;
18082 documentation_url?: string;
18083 errors?: string[];
18084 };
18085 };
18086 };
18087 404: components["responses"]["not_found"];
18088 410: components["responses"]["gone"];
18089 };
18090 };
18091 /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
18092 "projects/update": {
18093 parameters: {
18094 path: {
18095 project_id: components["parameters"]["project-id"];
18096 };
18097 };
18098 responses: {
18099 /** Response */
18100 200: {
18101 content: {
18102 "application/json": components["schemas"]["project"];
18103 };
18104 };
18105 304: components["responses"]["not_modified"];
18106 401: components["responses"]["requires_authentication"];
18107 /** Forbidden */
18108 403: {
18109 content: {
18110 "application/json": {
18111 message?: string;
18112 documentation_url?: string;
18113 errors?: string[];
18114 };
18115 };
18116 };
18117 /** Not Found if the authenticated user does not have access to the project */
18118 404: unknown;
18119 410: components["responses"]["gone"];
18120 422: components["responses"]["validation_failed_simple"];
18121 };
18122 requestBody: {
18123 content: {
18124 "application/json": {
18125 /** Name of the project */
18126 name?: string;
18127 /** Body of the project */
18128 body?: string | null;
18129 /** State of the project; either 'open' or 'closed' */
18130 state?: string;
18131 /** The baseline permission that all organization members have on this project */
18132 organization_permission?: "read" | "write" | "admin" | "none";
18133 /** Whether or not this project can be seen by everyone. */
18134 private?: boolean;
18135 };
18136 };
18137 };
18138 };
18139 /** Lists the collaborators for an organization project. For a project, 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. You must be an organization owner or a project `admin` to list collaborators. */
18140 "projects/list-collaborators": {
18141 parameters: {
18142 path: {
18143 project_id: components["parameters"]["project-id"];
18144 };
18145 query: {
18146 /**
18147 * Filters the collaborators by their affiliation. Can be one of:
18148 * \* `outside`: Outside collaborators of a project that are not a member of the project's organization.
18149 * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status.
18150 * \* `all`: All collaborators the authenticated user can see.
18151 */
18152 affiliation?: "outside" | "direct" | "all";
18153 /** Results per page (max 100). */
18154 per_page?: components["parameters"]["per_page"];
18155 /** Page number of the results to fetch. */
18156 page?: components["parameters"]["page"];
18157 };
18158 };
18159 responses: {
18160 /** Response */
18161 200: {
18162 headers: {};
18163 content: {
18164 "application/json": components["schemas"]["simple-user"][];
18165 };
18166 };
18167 304: components["responses"]["not_modified"];
18168 401: components["responses"]["requires_authentication"];
18169 403: components["responses"]["forbidden"];
18170 404: components["responses"]["not_found"];
18171 415: components["responses"]["preview_header_missing"];
18172 422: components["responses"]["validation_failed"];
18173 };
18174 };
18175 /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */
18176 "projects/add-collaborator": {
18177 parameters: {
18178 path: {
18179 project_id: components["parameters"]["project-id"];
18180 username: components["parameters"]["username"];
18181 };
18182 };
18183 responses: {
18184 /** Response */
18185 204: never;
18186 304: components["responses"]["not_modified"];
18187 401: components["responses"]["requires_authentication"];
18188 403: components["responses"]["forbidden"];
18189 404: components["responses"]["not_found"];
18190 415: components["responses"]["preview_header_missing"];
18191 422: components["responses"]["validation_failed"];
18192 };
18193 requestBody: {
18194 content: {
18195 "application/json": {
18196 /** The permission to grant the collaborator. */
18197 permission?: "read" | "write" | "admin";
18198 } | null;
18199 };
18200 };
18201 };
18202 /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */
18203 "projects/remove-collaborator": {
18204 parameters: {
18205 path: {
18206 project_id: components["parameters"]["project-id"];
18207 username: components["parameters"]["username"];
18208 };
18209 };
18210 responses: {
18211 /** Response */
18212 204: never;
18213 304: components["responses"]["not_modified"];
18214 401: components["responses"]["requires_authentication"];
18215 403: components["responses"]["forbidden"];
18216 404: components["responses"]["not_found"];
18217 415: components["responses"]["preview_header_missing"];
18218 422: components["responses"]["validation_failed"];
18219 };
18220 };
18221 /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */
18222 "projects/get-permission-for-user": {
18223 parameters: {
18224 path: {
18225 project_id: components["parameters"]["project-id"];
18226 username: components["parameters"]["username"];
18227 };
18228 };
18229 responses: {
18230 /** Response */
18231 200: {
18232 content: {
18233 "application/json": components["schemas"]["repository-collaborator-permission"];
18234 };
18235 };
18236 304: components["responses"]["not_modified"];
18237 401: components["responses"]["requires_authentication"];
18238 403: components["responses"]["forbidden"];
18239 404: components["responses"]["not_found"];
18240 415: components["responses"]["preview_header_missing"];
18241 422: components["responses"]["validation_failed"];
18242 };
18243 };
18244 "projects/list-columns": {
18245 parameters: {
18246 path: {
18247 project_id: components["parameters"]["project-id"];
18248 };
18249 query: {
18250 /** Results per page (max 100). */
18251 per_page?: components["parameters"]["per_page"];
18252 /** Page number of the results to fetch. */
18253 page?: components["parameters"]["page"];
18254 };
18255 };
18256 responses: {
18257 /** Response */
18258 200: {
18259 headers: {};
18260 content: {
18261 "application/json": components["schemas"]["project-column"][];
18262 };
18263 };
18264 304: components["responses"]["not_modified"];
18265 401: components["responses"]["requires_authentication"];
18266 403: components["responses"]["forbidden"];
18267 };
18268 };
18269 "projects/create-column": {
18270 parameters: {
18271 path: {
18272 project_id: components["parameters"]["project-id"];
18273 };
18274 };
18275 responses: {
18276 /** Response */
18277 201: {
18278 content: {
18279 "application/json": components["schemas"]["project-column"];
18280 };
18281 };
18282 304: components["responses"]["not_modified"];
18283 401: components["responses"]["requires_authentication"];
18284 403: components["responses"]["forbidden"];
18285 422: components["responses"]["validation_failed_simple"];
18286 };
18287 requestBody: {
18288 content: {
18289 "application/json": {
18290 /** Name of the project column */
18291 name: string;
18292 };
18293 };
18294 };
18295 };
18296 /**
18297 * **Note:** Accessing this endpoint does not count against your REST API rate limit.
18298 *
18299 * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.
18300 */
18301 "rate-limit/get": {
18302 parameters: {};
18303 responses: {
18304 /** Response */
18305 200: {
18306 headers: {};
18307 content: {
18308 "application/json": components["schemas"]["rate-limit-overview"];
18309 };
18310 };
18311 304: components["responses"]["not_modified"];
18312 404: components["responses"]["not_found"];
18313 };
18314 };
18315 /**
18316 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/).
18317 *
18318 * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments).
18319 */
18320 "reactions/delete-legacy": {
18321 parameters: {
18322 path: {
18323 reaction_id: components["parameters"]["reaction-id"];
18324 };
18325 };
18326 responses: {
18327 /** Response */
18328 204: never;
18329 304: components["responses"]["not_modified"];
18330 401: components["responses"]["requires_authentication"];
18331 403: components["responses"]["forbidden"];
18332 410: components["responses"]["gone"];
18333 415: components["responses"]["preview_header_missing"];
18334 };
18335 };
18336 /**
18337 * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.
18338 *
18339 * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
18340 */
18341 "repos/get": {
18342 parameters: {
18343 path: {
18344 owner: components["parameters"]["owner"];
18345 repo: components["parameters"]["repo"];
18346 };
18347 };
18348 responses: {
18349 /** Response */
18350 200: {
18351 content: {
18352 "application/json": components["schemas"]["full-repository"];
18353 };
18354 };
18355 301: components["responses"]["moved_permanently"];
18356 403: components["responses"]["forbidden"];
18357 404: components["responses"]["not_found"];
18358 };
18359 };
18360 /**
18361 * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.
18362 *
18363 * If an organization owner has configured the organization to prevent members from deleting organization-owned
18364 * repositories, you will get a `403 Forbidden` response.
18365 */
18366 "repos/delete": {
18367 parameters: {
18368 path: {
18369 owner: components["parameters"]["owner"];
18370 repo: components["parameters"]["repo"];
18371 };
18372 };
18373 responses: {
18374 /** Response */
18375 204: never;
18376 307: components["responses"]["temporary_redirect"];
18377 /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */
18378 403: {
18379 content: {
18380 "application/json": {
18381 message?: string;
18382 documentation_url?: string;
18383 };
18384 };
18385 };
18386 404: components["responses"]["not_found"];
18387 };
18388 };
18389 /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */
18390 "repos/update": {
18391 parameters: {
18392 path: {
18393 owner: components["parameters"]["owner"];
18394 repo: components["parameters"]["repo"];
18395 };
18396 };
18397 responses: {
18398 /** Response */
18399 200: {
18400 content: {
18401 "application/json": components["schemas"]["full-repository"];
18402 };
18403 };
18404 307: components["responses"]["temporary_redirect"];
18405 403: components["responses"]["forbidden"];
18406 404: components["responses"]["not_found"];
18407 422: components["responses"]["validation_failed"];
18408 };
18409 requestBody: {
18410 content: {
18411 "application/json": {
18412 /** The name of the repository. */
18413 name?: string;
18414 /** A short description of the repository. */
18415 description?: string;
18416 /** A URL with more information about the repository. */
18417 homepage?: string;
18418 /**
18419 * Either `true` to make the repository private or `false` to make it public. Default: `false`.
18420 * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private.
18421 */
18422 private?: boolean;
18423 /** Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. */
18424 visibility?: "public" | "private" | "visibility" | "internal";
18425 /** Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */
18426 security_and_analysis?: {
18427 /** Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */
18428 advanced_security?: {
18429 /** Can be `enabled` or `disabled`. */
18430 status?: string;
18431 };
18432 /** Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */
18433 secret_scanning?: {
18434 /** Can be `enabled` or `disabled`. */
18435 status?: string;
18436 };
18437 } | null;
18438 /** Either `true` to enable issues for this repository or `false` to disable them. */
18439 has_issues?: boolean;
18440 /** Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. */
18441 has_projects?: boolean;
18442 /** Either `true` to enable the wiki for this repository or `false` to disable it. */
18443 has_wiki?: boolean;
18444 /** Either `true` to make this repo available as a template repository or `false` to prevent it. */
18445 is_template?: boolean;
18446 /** Updates the default branch for this repository. */
18447 default_branch?: string;
18448 /** Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */
18449 allow_squash_merge?: boolean;
18450 /** Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */
18451 allow_merge_commit?: boolean;
18452 /** Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */
18453 allow_rebase_merge?: boolean;
18454 /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */
18455 delete_branch_on_merge?: boolean;
18456 /** `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. */
18457 archived?: boolean;
18458 };
18459 };
18460 };
18461 };
18462 /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18463 "actions/list-artifacts-for-repo": {
18464 parameters: {
18465 path: {
18466 owner: components["parameters"]["owner"];
18467 repo: components["parameters"]["repo"];
18468 };
18469 query: {
18470 /** Results per page (max 100). */
18471 per_page?: components["parameters"]["per_page"];
18472 /** Page number of the results to fetch. */
18473 page?: components["parameters"]["page"];
18474 };
18475 };
18476 responses: {
18477 /** Response */
18478 200: {
18479 headers: {};
18480 content: {
18481 "application/json": {
18482 total_count: number;
18483 artifacts: components["schemas"]["artifact"][];
18484 };
18485 };
18486 };
18487 };
18488 };
18489 /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18490 "actions/get-artifact": {
18491 parameters: {
18492 path: {
18493 owner: components["parameters"]["owner"];
18494 repo: components["parameters"]["repo"];
18495 /** artifact_id parameter */
18496 artifact_id: components["parameters"]["artifact_id"];
18497 };
18498 };
18499 responses: {
18500 /** Response */
18501 200: {
18502 content: {
18503 "application/json": components["schemas"]["artifact"];
18504 };
18505 };
18506 };
18507 };
18508 /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
18509 "actions/delete-artifact": {
18510 parameters: {
18511 path: {
18512 owner: components["parameters"]["owner"];
18513 repo: components["parameters"]["repo"];
18514 /** artifact_id parameter */
18515 artifact_id: components["parameters"]["artifact_id"];
18516 };
18517 };
18518 responses: {
18519 /** Response */
18520 204: never;
18521 };
18522 };
18523 /**
18524 * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in
18525 * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to
18526 * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
18527 * GitHub Apps must have the `actions:read` permission to use this endpoint.
18528 */
18529 "actions/download-artifact": {
18530 parameters: {
18531 path: {
18532 owner: components["parameters"]["owner"];
18533 repo: components["parameters"]["repo"];
18534 /** artifact_id parameter */
18535 artifact_id: components["parameters"]["artifact_id"];
18536 archive_format: string;
18537 };
18538 };
18539 responses: {
18540 /** Response */
18541 302: never;
18542 };
18543 };
18544 /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18545 "actions/get-job-for-workflow-run": {
18546 parameters: {
18547 path: {
18548 owner: components["parameters"]["owner"];
18549 repo: components["parameters"]["repo"];
18550 /** job_id parameter */
18551 job_id: components["parameters"]["job_id"];
18552 };
18553 };
18554 responses: {
18555 /** Response */
18556 200: {
18557 content: {
18558 "application/json": components["schemas"]["job"];
18559 };
18560 };
18561 };
18562 };
18563 /**
18564 * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look
18565 * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can
18566 * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must
18567 * have the `actions:read` permission to use this endpoint.
18568 */
18569 "actions/download-job-logs-for-workflow-run": {
18570 parameters: {
18571 path: {
18572 owner: components["parameters"]["owner"];
18573 repo: components["parameters"]["repo"];
18574 /** job_id parameter */
18575 job_id: components["parameters"]["job_id"];
18576 };
18577 };
18578 responses: {
18579 /** Response */
18580 302: never;
18581 };
18582 };
18583 /**
18584 * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.
18585 *
18586 * You must authenticate using an access token with the `repo` scope to use this
18587 * endpoint. GitHub Apps must have the `administration` repository permission to use this API.
18588 */
18589 "actions/get-github-actions-permissions-repository": {
18590 parameters: {
18591 path: {
18592 owner: components["parameters"]["owner"];
18593 repo: components["parameters"]["repo"];
18594 };
18595 };
18596 responses: {
18597 /** Response */
18598 200: {
18599 content: {
18600 "application/json": components["schemas"]["actions-repository-permissions"];
18601 };
18602 };
18603 };
18604 };
18605 /**
18606 * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.
18607 *
18608 * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.
18609 *
18610 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
18611 */
18612 "actions/set-github-actions-permissions-repository": {
18613 parameters: {
18614 path: {
18615 owner: components["parameters"]["owner"];
18616 repo: components["parameters"]["repo"];
18617 };
18618 };
18619 responses: {
18620 /** Response */
18621 204: never;
18622 };
18623 requestBody: {
18624 content: {
18625 "application/json": {
18626 enabled: components["schemas"]["actions-enabled"];
18627 allowed_actions?: components["schemas"]["allowed-actions"];
18628 };
18629 };
18630 };
18631 };
18632 /**
18633 * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
18634 *
18635 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
18636 */
18637 "actions/get-allowed-actions-repository": {
18638 parameters: {
18639 path: {
18640 owner: components["parameters"]["owner"];
18641 repo: components["parameters"]["repo"];
18642 };
18643 };
18644 responses: {
18645 /** Response */
18646 200: {
18647 content: {
18648 "application/json": components["schemas"]["selected-actions"];
18649 };
18650 };
18651 };
18652 };
18653 /**
18654 * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
18655 *
18656 * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.
18657 *
18658 * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.
18659 *
18660 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
18661 */
18662 "actions/set-allowed-actions-repository": {
18663 parameters: {
18664 path: {
18665 owner: components["parameters"]["owner"];
18666 repo: components["parameters"]["repo"];
18667 };
18668 };
18669 responses: {
18670 /** Response */
18671 204: never;
18672 };
18673 requestBody: {
18674 content: {
18675 "application/json": components["schemas"]["selected-actions"];
18676 };
18677 };
18678 };
18679 /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */
18680 "actions/list-self-hosted-runners-for-repo": {
18681 parameters: {
18682 path: {
18683 owner: components["parameters"]["owner"];
18684 repo: components["parameters"]["repo"];
18685 };
18686 query: {
18687 /** Results per page (max 100). */
18688 per_page?: components["parameters"]["per_page"];
18689 /** Page number of the results to fetch. */
18690 page?: components["parameters"]["page"];
18691 };
18692 };
18693 responses: {
18694 /** Response */
18695 200: {
18696 headers: {};
18697 content: {
18698 "application/json": {
18699 total_count: number;
18700 runners: components["schemas"]["runner"][];
18701 };
18702 };
18703 };
18704 };
18705 };
18706 /**
18707 * Lists binaries for the runner application that you can download and run.
18708 *
18709 * You must authenticate using an access token with the `repo` scope to use this endpoint.
18710 */
18711 "actions/list-runner-applications-for-repo": {
18712 parameters: {
18713 path: {
18714 owner: components["parameters"]["owner"];
18715 repo: components["parameters"]["repo"];
18716 };
18717 };
18718 responses: {
18719 /** Response */
18720 200: {
18721 content: {
18722 "application/json": components["schemas"]["runner-application"][];
18723 };
18724 };
18725 };
18726 };
18727 /**
18728 * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate
18729 * using an access token with the `repo` scope to use this endpoint.
18730 *
18731 * #### Example using registration token
18732 *
18733 * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
18734 *
18735 * ```
18736 * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
18737 * ```
18738 */
18739 "actions/create-registration-token-for-repo": {
18740 parameters: {
18741 path: {
18742 owner: components["parameters"]["owner"];
18743 repo: components["parameters"]["repo"];
18744 };
18745 };
18746 responses: {
18747 /** Response */
18748 201: {
18749 content: {
18750 "application/json": components["schemas"]["authentication-token"];
18751 };
18752 };
18753 };
18754 };
18755 /**
18756 * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
18757 * You must authenticate using an access token with the `repo` scope to use this endpoint.
18758 *
18759 * #### Example using remove token
18760 *
18761 * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
18762 *
18763 * ```
18764 * ./config.sh remove --token TOKEN
18765 * ```
18766 */
18767 "actions/create-remove-token-for-repo": {
18768 parameters: {
18769 path: {
18770 owner: components["parameters"]["owner"];
18771 repo: components["parameters"]["repo"];
18772 };
18773 };
18774 responses: {
18775 /** Response */
18776 201: {
18777 content: {
18778 "application/json": components["schemas"]["authentication-token"];
18779 };
18780 };
18781 };
18782 };
18783 /**
18784 * Gets a specific self-hosted runner configured in a repository.
18785 *
18786 * You must authenticate using an access token with the `repo` scope to use this
18787 * endpoint.
18788 */
18789 "actions/get-self-hosted-runner-for-repo": {
18790 parameters: {
18791 path: {
18792 owner: components["parameters"]["owner"];
18793 repo: components["parameters"]["repo"];
18794 /** Unique identifier of the self-hosted runner. */
18795 runner_id: components["parameters"]["runner_id"];
18796 };
18797 };
18798 responses: {
18799 /** Response */
18800 200: {
18801 content: {
18802 "application/json": components["schemas"]["runner"];
18803 };
18804 };
18805 };
18806 };
18807 /**
18808 * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
18809 *
18810 * You must authenticate using an access token with the `repo`
18811 * scope to use this endpoint.
18812 */
18813 "actions/delete-self-hosted-runner-from-repo": {
18814 parameters: {
18815 path: {
18816 owner: components["parameters"]["owner"];
18817 repo: components["parameters"]["repo"];
18818 /** Unique identifier of the self-hosted runner. */
18819 runner_id: components["parameters"]["runner_id"];
18820 };
18821 };
18822 responses: {
18823 /** Response */
18824 204: never;
18825 };
18826 };
18827 /**
18828 * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
18829 *
18830 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
18831 */
18832 "actions/list-workflow-runs-for-repo": {
18833 parameters: {
18834 path: {
18835 owner: components["parameters"]["owner"];
18836 repo: components["parameters"]["repo"];
18837 };
18838 query: {
18839 /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */
18840 actor?: components["parameters"]["actor"];
18841 /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */
18842 branch?: components["parameters"]["workflow-run-branch"];
18843 /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */
18844 event?: components["parameters"]["event"];
18845 /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */
18846 status?: components["parameters"]["workflow-run-status"];
18847 /** Results per page (max 100). */
18848 per_page?: components["parameters"]["per_page"];
18849 /** Page number of the results to fetch. */
18850 page?: components["parameters"]["page"];
18851 };
18852 };
18853 responses: {
18854 /** Response */
18855 200: {
18856 headers: {};
18857 content: {
18858 "application/json": {
18859 total_count: number;
18860 workflow_runs: components["schemas"]["workflow-run"][];
18861 };
18862 };
18863 };
18864 };
18865 };
18866 /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18867 "actions/get-workflow-run": {
18868 parameters: {
18869 path: {
18870 owner: components["parameters"]["owner"];
18871 repo: components["parameters"]["repo"];
18872 /** The id of the workflow run. */
18873 run_id: components["parameters"]["run-id"];
18874 };
18875 };
18876 responses: {
18877 /** Response */
18878 200: {
18879 content: {
18880 "application/json": components["schemas"]["workflow-run"];
18881 };
18882 };
18883 };
18884 };
18885 /**
18886 * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is
18887 * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use
18888 * this endpoint.
18889 */
18890 "actions/delete-workflow-run": {
18891 parameters: {
18892 path: {
18893 owner: components["parameters"]["owner"];
18894 repo: components["parameters"]["repo"];
18895 /** The id of the workflow run. */
18896 run_id: components["parameters"]["run-id"];
18897 };
18898 };
18899 responses: {
18900 /** Response */
18901 204: never;
18902 };
18903 };
18904 /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18905 "actions/get-reviews-for-run": {
18906 parameters: {
18907 path: {
18908 owner: components["parameters"]["owner"];
18909 repo: components["parameters"]["repo"];
18910 /** The id of the workflow run. */
18911 run_id: components["parameters"]["run-id"];
18912 };
18913 };
18914 responses: {
18915 /** Response */
18916 200: {
18917 content: {
18918 "application/json": components["schemas"]["environment-approvals"][];
18919 };
18920 };
18921 };
18922 };
18923 /**
18924 * **Note:** This endpoint is currently in beta and is subject to change.
18925 *
18926 * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."
18927 *
18928 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
18929 */
18930 "actions/approve-workflow-run": {
18931 parameters: {
18932 path: {
18933 owner: components["parameters"]["owner"];
18934 repo: components["parameters"]["repo"];
18935 /** The id of the workflow run. */
18936 run_id: components["parameters"]["run-id"];
18937 };
18938 };
18939 responses: {
18940 /** Response */
18941 201: {
18942 content: {
18943 "application/json": components["schemas"]["empty-object"];
18944 };
18945 };
18946 403: components["responses"]["forbidden"];
18947 404: components["responses"]["not_found"];
18948 };
18949 };
18950 /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
18951 "actions/list-workflow-run-artifacts": {
18952 parameters: {
18953 path: {
18954 owner: components["parameters"]["owner"];
18955 repo: components["parameters"]["repo"];
18956 /** The id of the workflow run. */
18957 run_id: components["parameters"]["run-id"];
18958 };
18959 query: {
18960 /** Results per page (max 100). */
18961 per_page?: components["parameters"]["per_page"];
18962 /** Page number of the results to fetch. */
18963 page?: components["parameters"]["page"];
18964 };
18965 };
18966 responses: {
18967 /** Response */
18968 200: {
18969 headers: {};
18970 content: {
18971 "application/json": {
18972 total_count: number;
18973 artifacts: components["schemas"]["artifact"][];
18974 };
18975 };
18976 };
18977 };
18978 };
18979 /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
18980 "actions/cancel-workflow-run": {
18981 parameters: {
18982 path: {
18983 owner: components["parameters"]["owner"];
18984 repo: components["parameters"]["repo"];
18985 /** The id of the workflow run. */
18986 run_id: components["parameters"]["run-id"];
18987 };
18988 };
18989 responses: {
18990 /** Response */
18991 202: {
18992 content: {
18993 "application/json": { [key: string]: any };
18994 };
18995 };
18996 };
18997 };
18998 /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */
18999 "actions/list-jobs-for-workflow-run": {
19000 parameters: {
19001 path: {
19002 owner: components["parameters"]["owner"];
19003 repo: components["parameters"]["repo"];
19004 /** The id of the workflow run. */
19005 run_id: components["parameters"]["run-id"];
19006 };
19007 query: {
19008 /**
19009 * Filters jobs by their `completed_at` timestamp. Can be one of:
19010 * \* `latest`: Returns jobs from the most recent execution of the workflow run.
19011 * \* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run.
19012 */
19013 filter?: "latest" | "all";
19014 /** Results per page (max 100). */
19015 per_page?: components["parameters"]["per_page"];
19016 /** Page number of the results to fetch. */
19017 page?: components["parameters"]["page"];
19018 };
19019 };
19020 responses: {
19021 /** Response */
19022 200: {
19023 headers: {};
19024 content: {
19025 "application/json": {
19026 total_count: number;
19027 jobs: components["schemas"]["job"][];
19028 };
19029 };
19030 };
19031 };
19032 };
19033 /**
19034 * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for
19035 * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use
19036 * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have
19037 * the `actions:read` permission to use this endpoint.
19038 */
19039 "actions/download-workflow-run-logs": {
19040 parameters: {
19041 path: {
19042 owner: components["parameters"]["owner"];
19043 repo: components["parameters"]["repo"];
19044 /** The id of the workflow run. */
19045 run_id: components["parameters"]["run-id"];
19046 };
19047 };
19048 responses: {
19049 /** Response */
19050 302: never;
19051 };
19052 };
19053 /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
19054 "actions/delete-workflow-run-logs": {
19055 parameters: {
19056 path: {
19057 owner: components["parameters"]["owner"];
19058 repo: components["parameters"]["repo"];
19059 /** The id of the workflow run. */
19060 run_id: components["parameters"]["run-id"];
19061 };
19062 };
19063 responses: {
19064 /** Response */
19065 204: never;
19066 };
19067 };
19068 /**
19069 * Get all deployment environments for a workflow run that are waiting for protection rules to pass.
19070 *
19071 * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
19072 */
19073 "actions/get-pending-deployments-for-run": {
19074 parameters: {
19075 path: {
19076 owner: components["parameters"]["owner"];
19077 repo: components["parameters"]["repo"];
19078 /** The id of the workflow run. */
19079 run_id: components["parameters"]["run-id"];
19080 };
19081 };
19082 responses: {
19083 /** Response */
19084 200: {
19085 content: {
19086 "application/json": components["schemas"]["pending-deployment"][];
19087 };
19088 };
19089 };
19090 };
19091 /**
19092 * Approve or reject pending deployments that are waiting on approval by a required reviewer.
19093 *
19094 * Anyone with read access to the repository contents and deployments can use this endpoint.
19095 */
19096 "actions/review-pending-deployments-for-run": {
19097 parameters: {
19098 path: {
19099 owner: components["parameters"]["owner"];
19100 repo: components["parameters"]["repo"];
19101 /** The id of the workflow run. */
19102 run_id: components["parameters"]["run-id"];
19103 };
19104 };
19105 responses: {
19106 /** Response */
19107 200: {
19108 content: {
19109 "application/json": components["schemas"]["deployment"][];
19110 };
19111 };
19112 };
19113 requestBody: {
19114 content: {
19115 "application/json": {
19116 /** The list of environment ids to approve or reject */
19117 environment_ids: number[];
19118 /** Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` */
19119 state: "approved" | "rejected";
19120 /** A comment to accompany the deployment review */
19121 comment: string;
19122 };
19123 };
19124 };
19125 };
19126 /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */
19127 "actions/re-run-workflow": {
19128 parameters: {
19129 path: {
19130 owner: components["parameters"]["owner"];
19131 repo: components["parameters"]["repo"];
19132 /** The id of the workflow run. */
19133 run_id: components["parameters"]["run-id"];
19134 };
19135 };
19136 responses: {
19137 /** Response */
19138 201: {
19139 content: {
19140 "application/json": { [key: string]: any };
19141 };
19142 };
19143 };
19144 };
19145 /**
19146 * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
19147 *
19148 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
19149 */
19150 "actions/get-workflow-run-usage": {
19151 parameters: {
19152 path: {
19153 owner: components["parameters"]["owner"];
19154 repo: components["parameters"]["repo"];
19155 /** The id of the workflow run. */
19156 run_id: components["parameters"]["run-id"];
19157 };
19158 };
19159 responses: {
19160 /** Response */
19161 200: {
19162 content: {
19163 "application/json": components["schemas"]["workflow-run-usage"];
19164 };
19165 };
19166 };
19167 };
19168 /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
19169 "actions/list-repo-secrets": {
19170 parameters: {
19171 path: {
19172 owner: components["parameters"]["owner"];
19173 repo: components["parameters"]["repo"];
19174 };
19175 query: {
19176 /** Results per page (max 100). */
19177 per_page?: components["parameters"]["per_page"];
19178 /** Page number of the results to fetch. */
19179 page?: components["parameters"]["page"];
19180 };
19181 };
19182 responses: {
19183 /** Response */
19184 200: {
19185 headers: {};
19186 content: {
19187 "application/json": {
19188 total_count: number;
19189 secrets: components["schemas"]["actions-secret"][];
19190 };
19191 };
19192 };
19193 };
19194 };
19195 /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
19196 "actions/get-repo-public-key": {
19197 parameters: {
19198 path: {
19199 owner: components["parameters"]["owner"];
19200 repo: components["parameters"]["repo"];
19201 };
19202 };
19203 responses: {
19204 /** Response */
19205 200: {
19206 content: {
19207 "application/json": components["schemas"]["actions-public-key"];
19208 };
19209 };
19210 };
19211 };
19212 /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
19213 "actions/get-repo-secret": {
19214 parameters: {
19215 path: {
19216 owner: components["parameters"]["owner"];
19217 repo: components["parameters"]["repo"];
19218 /** secret_name parameter */
19219 secret_name: components["parameters"]["secret_name"];
19220 };
19221 };
19222 responses: {
19223 /** Response */
19224 200: {
19225 content: {
19226 "application/json": components["schemas"]["actions-secret"];
19227 };
19228 };
19229 };
19230 };
19231 /**
19232 * Creates or updates a repository secret with an encrypted value. Encrypt your secret using
19233 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
19234 * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
19235 * this endpoint.
19236 *
19237 * #### Example encrypting a secret using Node.js
19238 *
19239 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
19240 *
19241 * ```
19242 * const sodium = require('tweetsodium');
19243 *
19244 * const key = "base64-encoded-public-key";
19245 * const value = "plain-text-secret";
19246 *
19247 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
19248 * const messageBytes = Buffer.from(value);
19249 * const keyBytes = Buffer.from(key, 'base64');
19250 *
19251 * // Encrypt using LibSodium.
19252 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
19253 *
19254 * // Base64 the encrypted secret
19255 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
19256 *
19257 * console.log(encrypted);
19258 * ```
19259 *
19260 *
19261 * #### Example encrypting a secret using Python
19262 *
19263 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
19264 *
19265 * ```
19266 * from base64 import b64encode
19267 * from nacl import encoding, public
19268 *
19269 * def encrypt(public_key: str, secret_value: str) -> str:
19270 * """Encrypt a Unicode string using the public key."""
19271 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
19272 * sealed_box = public.SealedBox(public_key)
19273 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
19274 * return b64encode(encrypted).decode("utf-8")
19275 * ```
19276 *
19277 * #### Example encrypting a secret using C#
19278 *
19279 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
19280 *
19281 * ```
19282 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
19283 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
19284 *
19285 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
19286 *
19287 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
19288 * ```
19289 *
19290 * #### Example encrypting a secret using Ruby
19291 *
19292 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
19293 *
19294 * ```ruby
19295 * require "rbnacl"
19296 * require "base64"
19297 *
19298 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
19299 * public_key = RbNaCl::PublicKey.new(key)
19300 *
19301 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
19302 * encrypted_secret = box.encrypt("my_secret")
19303 *
19304 * # Print the base64 encoded secret
19305 * puts Base64.strict_encode64(encrypted_secret)
19306 * ```
19307 */
19308 "actions/create-or-update-repo-secret": {
19309 parameters: {
19310 path: {
19311 owner: components["parameters"]["owner"];
19312 repo: components["parameters"]["repo"];
19313 /** secret_name parameter */
19314 secret_name: components["parameters"]["secret_name"];
19315 };
19316 };
19317 responses: {
19318 /** Response when creating a secret */
19319 201: {
19320 content: {
19321 "application/json": { [key: string]: any };
19322 };
19323 };
19324 /** Response when updating a secret */
19325 204: never;
19326 };
19327 requestBody: {
19328 content: {
19329 "application/json": {
19330 /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */
19331 encrypted_value?: string;
19332 /** ID of the key you used to encrypt the secret. */
19333 key_id?: string;
19334 };
19335 };
19336 };
19337 };
19338 /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
19339 "actions/delete-repo-secret": {
19340 parameters: {
19341 path: {
19342 owner: components["parameters"]["owner"];
19343 repo: components["parameters"]["repo"];
19344 /** secret_name parameter */
19345 secret_name: components["parameters"]["secret_name"];
19346 };
19347 };
19348 responses: {
19349 /** Response */
19350 204: never;
19351 };
19352 };
19353 /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
19354 "actions/list-repo-workflows": {
19355 parameters: {
19356 path: {
19357 owner: components["parameters"]["owner"];
19358 repo: components["parameters"]["repo"];
19359 };
19360 query: {
19361 /** Results per page (max 100). */
19362 per_page?: components["parameters"]["per_page"];
19363 /** Page number of the results to fetch. */
19364 page?: components["parameters"]["page"];
19365 };
19366 };
19367 responses: {
19368 /** Response */
19369 200: {
19370 headers: {};
19371 content: {
19372 "application/json": {
19373 total_count: number;
19374 workflows: components["schemas"]["workflow"][];
19375 };
19376 };
19377 };
19378 };
19379 };
19380 /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
19381 "actions/get-workflow": {
19382 parameters: {
19383 path: {
19384 owner: components["parameters"]["owner"];
19385 repo: components["parameters"]["repo"];
19386 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19387 workflow_id: components["parameters"]["workflow-id"];
19388 };
19389 };
19390 responses: {
19391 /** Response */
19392 200: {
19393 content: {
19394 "application/json": components["schemas"]["workflow"];
19395 };
19396 };
19397 };
19398 };
19399 /**
19400 * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
19401 *
19402 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
19403 */
19404 "actions/disable-workflow": {
19405 parameters: {
19406 path: {
19407 owner: components["parameters"]["owner"];
19408 repo: components["parameters"]["repo"];
19409 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19410 workflow_id: components["parameters"]["workflow-id"];
19411 };
19412 };
19413 responses: {
19414 /** Response */
19415 204: never;
19416 };
19417 };
19418 /**
19419 * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
19420 *
19421 * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."
19422 *
19423 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)."
19424 */
19425 "actions/create-workflow-dispatch": {
19426 parameters: {
19427 path: {
19428 owner: components["parameters"]["owner"];
19429 repo: components["parameters"]["repo"];
19430 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19431 workflow_id: components["parameters"]["workflow-id"];
19432 };
19433 };
19434 responses: {
19435 /** Response */
19436 204: never;
19437 };
19438 requestBody: {
19439 content: {
19440 "application/json": {
19441 /** The git reference for the workflow. The reference can be a branch or tag name. */
19442 ref: string;
19443 /** Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */
19444 inputs?: { [key: string]: string };
19445 };
19446 };
19447 };
19448 };
19449 /**
19450 * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
19451 *
19452 * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
19453 */
19454 "actions/enable-workflow": {
19455 parameters: {
19456 path: {
19457 owner: components["parameters"]["owner"];
19458 repo: components["parameters"]["repo"];
19459 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19460 workflow_id: components["parameters"]["workflow-id"];
19461 };
19462 };
19463 responses: {
19464 /** Response */
19465 204: never;
19466 };
19467 };
19468 /**
19469 * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
19470 *
19471 * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
19472 */
19473 "actions/list-workflow-runs": {
19474 parameters: {
19475 path: {
19476 owner: components["parameters"]["owner"];
19477 repo: components["parameters"]["repo"];
19478 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19479 workflow_id: components["parameters"]["workflow-id"];
19480 };
19481 query: {
19482 /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */
19483 actor?: components["parameters"]["actor"];
19484 /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */
19485 branch?: components["parameters"]["workflow-run-branch"];
19486 /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */
19487 event?: components["parameters"]["event"];
19488 /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */
19489 status?: components["parameters"]["workflow-run-status"];
19490 /** Results per page (max 100). */
19491 per_page?: components["parameters"]["per_page"];
19492 /** Page number of the results to fetch. */
19493 page?: components["parameters"]["page"];
19494 };
19495 };
19496 responses: {
19497 /** Response */
19498 200: {
19499 headers: {};
19500 content: {
19501 "application/json": {
19502 total_count: number;
19503 workflow_runs: components["schemas"]["workflow-run"][];
19504 };
19505 };
19506 };
19507 };
19508 };
19509 /**
19510 * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
19511 *
19512 * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
19513 */
19514 "actions/get-workflow-usage": {
19515 parameters: {
19516 path: {
19517 owner: components["parameters"]["owner"];
19518 repo: components["parameters"]["repo"];
19519 /** The ID of the workflow. You can also pass the workflow file name as a string. */
19520 workflow_id: components["parameters"]["workflow-id"];
19521 };
19522 };
19523 responses: {
19524 /** Response */
19525 200: {
19526 content: {
19527 "application/json": components["schemas"]["workflow-usage"];
19528 };
19529 };
19530 };
19531 };
19532 /** Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */
19533 "issues/list-assignees": {
19534 parameters: {
19535 path: {
19536 owner: components["parameters"]["owner"];
19537 repo: components["parameters"]["repo"];
19538 };
19539 query: {
19540 /** Results per page (max 100). */
19541 per_page?: components["parameters"]["per_page"];
19542 /** Page number of the results to fetch. */
19543 page?: components["parameters"]["page"];
19544 };
19545 };
19546 responses: {
19547 /** Response */
19548 200: {
19549 headers: {};
19550 content: {
19551 "application/json": components["schemas"]["simple-user"][];
19552 };
19553 };
19554 404: components["responses"]["not_found"];
19555 };
19556 };
19557 /**
19558 * Checks if a user has permission to be assigned to an issue in this repository.
19559 *
19560 * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.
19561 *
19562 * Otherwise a `404` status code is returned.
19563 */
19564 "issues/check-user-can-be-assigned": {
19565 parameters: {
19566 path: {
19567 owner: components["parameters"]["owner"];
19568 repo: components["parameters"]["repo"];
19569 assignee: string;
19570 };
19571 };
19572 responses: {
19573 /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */
19574 204: never;
19575 /** Otherwise a `404` status code is returned. */
19576 404: {
19577 content: {
19578 "application/json": components["schemas"]["basic-error"];
19579 };
19580 };
19581 };
19582 };
19583 /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)". */
19584 "repos/enable-automated-security-fixes": {
19585 parameters: {
19586 path: {
19587 owner: components["parameters"]["owner"];
19588 repo: components["parameters"]["repo"];
19589 };
19590 };
19591 responses: {
19592 /** Response */
19593 204: never;
19594 };
19595 };
19596 /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)". */
19597 "repos/disable-automated-security-fixes": {
19598 parameters: {
19599 path: {
19600 owner: components["parameters"]["owner"];
19601 repo: components["parameters"]["repo"];
19602 };
19603 };
19604 responses: {
19605 /** Response */
19606 204: never;
19607 };
19608 };
19609 "repos/list-branches": {
19610 parameters: {
19611 path: {
19612 owner: components["parameters"]["owner"];
19613 repo: components["parameters"]["repo"];
19614 };
19615 query: {
19616 /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */
19617 protected?: boolean;
19618 /** Results per page (max 100). */
19619 per_page?: components["parameters"]["per_page"];
19620 /** Page number of the results to fetch. */
19621 page?: components["parameters"]["page"];
19622 };
19623 };
19624 responses: {
19625 /** Response */
19626 200: {
19627 headers: {};
19628 content: {
19629 "application/json": components["schemas"]["short-branch"][];
19630 };
19631 };
19632 404: components["responses"]["not_found"];
19633 };
19634 };
19635 "repos/get-branch": {
19636 parameters: {
19637 path: {
19638 owner: components["parameters"]["owner"];
19639 repo: components["parameters"]["repo"];
19640 /** The name of the branch. */
19641 branch: components["parameters"]["branch"];
19642 };
19643 };
19644 responses: {
19645 /** Response */
19646 200: {
19647 content: {
19648 "application/json": components["schemas"]["branch-with-protection"];
19649 };
19650 };
19651 301: components["responses"]["moved_permanently"];
19652 404: components["responses"]["not_found"];
19653 415: components["responses"]["preview_header_missing"];
19654 };
19655 };
19656 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19657 "repos/get-branch-protection": {
19658 parameters: {
19659 path: {
19660 owner: components["parameters"]["owner"];
19661 repo: components["parameters"]["repo"];
19662 /** The name of the branch. */
19663 branch: components["parameters"]["branch"];
19664 };
19665 };
19666 responses: {
19667 /** Response */
19668 200: {
19669 content: {
19670 "application/json": components["schemas"]["branch-protection"];
19671 };
19672 };
19673 404: components["responses"]["not_found"];
19674 };
19675 };
19676 /**
19677 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19678 *
19679 * Protecting a branch requires admin or owner permissions to the repository.
19680 *
19681 * **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
19682 *
19683 * **Note**: The list of users, apps, and teams in total is limited to 100 items.
19684 */
19685 "repos/update-branch-protection": {
19686 parameters: {
19687 path: {
19688 owner: components["parameters"]["owner"];
19689 repo: components["parameters"]["repo"];
19690 /** The name of the branch. */
19691 branch: components["parameters"]["branch"];
19692 };
19693 };
19694 responses: {
19695 /** Response */
19696 200: {
19697 content: {
19698 "application/json": components["schemas"]["protected-branch"];
19699 };
19700 };
19701 403: components["responses"]["forbidden"];
19702 404: components["responses"]["not_found"];
19703 415: components["responses"]["preview_header_missing"];
19704 422: components["responses"]["validation_failed_simple"];
19705 };
19706 requestBody: {
19707 content: {
19708 "application/json": {
19709 /** Require status checks to pass before merging. Set to `null` to disable. */
19710 required_status_checks: {
19711 /** Require branches to be up to date before merging. */
19712 strict: boolean;
19713 /** The list of status checks to require in order to merge into this branch */
19714 contexts: string[];
19715 } | null;
19716 /** Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */
19717 enforce_admins: boolean | null;
19718 /** Require at least one approving review on a pull request, before merging. Set to `null` to disable. */
19719 required_pull_request_reviews: {
19720 /** Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */
19721 dismissal_restrictions?: {
19722 /** The list of user `login`s with dismissal access */
19723 users?: string[];
19724 /** The list of team `slug`s with dismissal access */
19725 teams?: string[];
19726 };
19727 /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */
19728 dismiss_stale_reviews?: boolean;
19729 /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */
19730 require_code_owner_reviews?: boolean;
19731 /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */
19732 required_approving_review_count?: number;
19733 } | null;
19734 /** Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */
19735 restrictions: {
19736 /** The list of user `login`s with push access */
19737 users: string[];
19738 /** The list of team `slug`s with push access */
19739 teams: string[];
19740 /** The list of app `slug`s with push access */
19741 apps?: string[];
19742 } | null;
19743 /** Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */
19744 required_linear_history?: boolean;
19745 /** Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */
19746 allow_force_pushes?: boolean | null;
19747 /** Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */
19748 allow_deletions?: boolean;
19749 /** Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */
19750 required_conversation_resolution?: boolean;
19751 };
19752 };
19753 };
19754 };
19755 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19756 "repos/delete-branch-protection": {
19757 parameters: {
19758 path: {
19759 owner: components["parameters"]["owner"];
19760 repo: components["parameters"]["repo"];
19761 /** The name of the branch. */
19762 branch: components["parameters"]["branch"];
19763 };
19764 };
19765 responses: {
19766 /** Response */
19767 204: never;
19768 403: components["responses"]["forbidden"];
19769 };
19770 };
19771 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19772 "repos/get-admin-branch-protection": {
19773 parameters: {
19774 path: {
19775 owner: components["parameters"]["owner"];
19776 repo: components["parameters"]["repo"];
19777 /** The name of the branch. */
19778 branch: components["parameters"]["branch"];
19779 };
19780 };
19781 responses: {
19782 /** Response */
19783 200: {
19784 content: {
19785 "application/json": components["schemas"]["protected-branch-admin-enforced"];
19786 };
19787 };
19788 };
19789 };
19790 /**
19791 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19792 *
19793 * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
19794 */
19795 "repos/set-admin-branch-protection": {
19796 parameters: {
19797 path: {
19798 owner: components["parameters"]["owner"];
19799 repo: components["parameters"]["repo"];
19800 /** The name of the branch. */
19801 branch: components["parameters"]["branch"];
19802 };
19803 };
19804 responses: {
19805 /** Response */
19806 200: {
19807 content: {
19808 "application/json": components["schemas"]["protected-branch-admin-enforced"];
19809 };
19810 };
19811 };
19812 };
19813 /**
19814 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19815 *
19816 * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
19817 */
19818 "repos/delete-admin-branch-protection": {
19819 parameters: {
19820 path: {
19821 owner: components["parameters"]["owner"];
19822 repo: components["parameters"]["repo"];
19823 /** The name of the branch. */
19824 branch: components["parameters"]["branch"];
19825 };
19826 };
19827 responses: {
19828 /** Response */
19829 204: never;
19830 404: components["responses"]["not_found"];
19831 };
19832 };
19833 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19834 "repos/get-pull-request-review-protection": {
19835 parameters: {
19836 path: {
19837 owner: components["parameters"]["owner"];
19838 repo: components["parameters"]["repo"];
19839 /** The name of the branch. */
19840 branch: components["parameters"]["branch"];
19841 };
19842 };
19843 responses: {
19844 /** Response */
19845 200: {
19846 content: {
19847 "application/json": components["schemas"]["protected-branch-pull-request-review"];
19848 };
19849 };
19850 };
19851 };
19852 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19853 "repos/delete-pull-request-review-protection": {
19854 parameters: {
19855 path: {
19856 owner: components["parameters"]["owner"];
19857 repo: components["parameters"]["repo"];
19858 /** The name of the branch. */
19859 branch: components["parameters"]["branch"];
19860 };
19861 };
19862 responses: {
19863 /** Response */
19864 204: never;
19865 404: components["responses"]["not_found"];
19866 };
19867 };
19868 /**
19869 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19870 *
19871 * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
19872 *
19873 * **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
19874 */
19875 "repos/update-pull-request-review-protection": {
19876 parameters: {
19877 path: {
19878 owner: components["parameters"]["owner"];
19879 repo: components["parameters"]["repo"];
19880 /** The name of the branch. */
19881 branch: components["parameters"]["branch"];
19882 };
19883 };
19884 responses: {
19885 /** Response */
19886 200: {
19887 content: {
19888 "application/json": components["schemas"]["protected-branch-pull-request-review"];
19889 };
19890 };
19891 422: components["responses"]["validation_failed"];
19892 };
19893 requestBody: {
19894 content: {
19895 "application/json": {
19896 /** Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */
19897 dismissal_restrictions?: {
19898 /** The list of user `login`s with dismissal access */
19899 users?: string[];
19900 /** The list of team `slug`s with dismissal access */
19901 teams?: string[];
19902 };
19903 /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */
19904 dismiss_stale_reviews?: boolean;
19905 /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. */
19906 require_code_owner_reviews?: boolean;
19907 /** Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. */
19908 required_approving_review_count?: number;
19909 };
19910 };
19911 };
19912 };
19913 /**
19914 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19915 *
19916 * 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](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help.
19917 *
19918 * **Note**: You must enable branch protection to require signed commits.
19919 */
19920 "repos/get-commit-signature-protection": {
19921 parameters: {
19922 path: {
19923 owner: components["parameters"]["owner"];
19924 repo: components["parameters"]["repo"];
19925 /** The name of the branch. */
19926 branch: components["parameters"]["branch"];
19927 };
19928 };
19929 responses: {
19930 /** Response */
19931 200: {
19932 content: {
19933 "application/json": components["schemas"]["protected-branch-admin-enforced"];
19934 };
19935 };
19936 404: components["responses"]["not_found"];
19937 };
19938 };
19939 /**
19940 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19941 *
19942 * 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.
19943 */
19944 "repos/create-commit-signature-protection": {
19945 parameters: {
19946 path: {
19947 owner: components["parameters"]["owner"];
19948 repo: components["parameters"]["repo"];
19949 /** The name of the branch. */
19950 branch: components["parameters"]["branch"];
19951 };
19952 };
19953 responses: {
19954 /** Response */
19955 200: {
19956 content: {
19957 "application/json": components["schemas"]["protected-branch-admin-enforced"];
19958 };
19959 };
19960 404: components["responses"]["not_found"];
19961 };
19962 };
19963 /**
19964 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19965 *
19966 * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
19967 */
19968 "repos/delete-commit-signature-protection": {
19969 parameters: {
19970 path: {
19971 owner: components["parameters"]["owner"];
19972 repo: components["parameters"]["repo"];
19973 /** The name of the branch. */
19974 branch: components["parameters"]["branch"];
19975 };
19976 };
19977 responses: {
19978 /** Response */
19979 204: never;
19980 404: components["responses"]["not_found"];
19981 };
19982 };
19983 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
19984 "repos/get-status-checks-protection": {
19985 parameters: {
19986 path: {
19987 owner: components["parameters"]["owner"];
19988 repo: components["parameters"]["repo"];
19989 /** The name of the branch. */
19990 branch: components["parameters"]["branch"];
19991 };
19992 };
19993 responses: {
19994 /** Response */
19995 200: {
19996 content: {
19997 "application/json": components["schemas"]["status-check-policy"];
19998 };
19999 };
20000 404: components["responses"]["not_found"];
20001 };
20002 };
20003 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
20004 "repos/remove-status-check-protection": {
20005 parameters: {
20006 path: {
20007 owner: components["parameters"]["owner"];
20008 repo: components["parameters"]["repo"];
20009 /** The name of the branch. */
20010 branch: components["parameters"]["branch"];
20011 };
20012 };
20013 responses: {
20014 /** Response */
20015 204: never;
20016 };
20017 };
20018 /**
20019 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20020 *
20021 * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
20022 */
20023 "repos/update-status-check-protection": {
20024 parameters: {
20025 path: {
20026 owner: components["parameters"]["owner"];
20027 repo: components["parameters"]["repo"];
20028 /** The name of the branch. */
20029 branch: components["parameters"]["branch"];
20030 };
20031 };
20032 responses: {
20033 /** Response */
20034 200: {
20035 content: {
20036 "application/json": components["schemas"]["status-check-policy"];
20037 };
20038 };
20039 404: components["responses"]["not_found"];
20040 422: components["responses"]["validation_failed"];
20041 };
20042 requestBody: {
20043 content: {
20044 "application/json": {
20045 /** Require branches to be up to date before merging. */
20046 strict?: boolean;
20047 /** The list of status checks to require in order to merge into this branch */
20048 contexts?: string[];
20049 };
20050 };
20051 };
20052 };
20053 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
20054 "repos/get-all-status-check-contexts": {
20055 parameters: {
20056 path: {
20057 owner: components["parameters"]["owner"];
20058 repo: components["parameters"]["repo"];
20059 /** The name of the branch. */
20060 branch: components["parameters"]["branch"];
20061 };
20062 };
20063 responses: {
20064 /** Response */
20065 200: {
20066 content: {
20067 "application/json": string[];
20068 };
20069 };
20070 404: components["responses"]["not_found"];
20071 };
20072 };
20073 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
20074 "repos/set-status-check-contexts": {
20075 parameters: {
20076 path: {
20077 owner: components["parameters"]["owner"];
20078 repo: components["parameters"]["repo"];
20079 /** The name of the branch. */
20080 branch: components["parameters"]["branch"];
20081 };
20082 };
20083 responses: {
20084 /** Response */
20085 200: {
20086 content: {
20087 "application/json": string[];
20088 };
20089 };
20090 404: components["responses"]["not_found"];
20091 422: components["responses"]["validation_failed"];
20092 };
20093 requestBody: {
20094 content: {
20095 "application/json": {
20096 /** contexts parameter */
20097 contexts: string[];
20098 };
20099 };
20100 };
20101 };
20102 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
20103 "repos/add-status-check-contexts": {
20104 parameters: {
20105 path: {
20106 owner: components["parameters"]["owner"];
20107 repo: components["parameters"]["repo"];
20108 /** The name of the branch. */
20109 branch: components["parameters"]["branch"];
20110 };
20111 };
20112 responses: {
20113 /** Response */
20114 200: {
20115 content: {
20116 "application/json": string[];
20117 };
20118 };
20119 403: components["responses"]["forbidden"];
20120 404: components["responses"]["not_found"];
20121 422: components["responses"]["validation_failed"];
20122 };
20123 requestBody: {
20124 content: {
20125 "application/json": {
20126 /** contexts parameter */
20127 contexts: string[];
20128 };
20129 };
20130 };
20131 };
20132 /** 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
20133 "repos/remove-status-check-contexts": {
20134 parameters: {
20135 path: {
20136 owner: components["parameters"]["owner"];
20137 repo: components["parameters"]["repo"];
20138 /** The name of the branch. */
20139 branch: components["parameters"]["branch"];
20140 };
20141 };
20142 responses: {
20143 /** Response */
20144 200: {
20145 content: {
20146 "application/json": string[];
20147 };
20148 };
20149 404: components["responses"]["not_found"];
20150 422: components["responses"]["validation_failed"];
20151 };
20152 requestBody: {
20153 content: {
20154 "application/json": {
20155 /** contexts parameter */
20156 contexts: string[];
20157 };
20158 };
20159 };
20160 };
20161 /**
20162 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20163 *
20164 * Lists who has access to this protected branch.
20165 *
20166 * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.
20167 */
20168 "repos/get-access-restrictions": {
20169 parameters: {
20170 path: {
20171 owner: components["parameters"]["owner"];
20172 repo: components["parameters"]["repo"];
20173 /** The name of the branch. */
20174 branch: components["parameters"]["branch"];
20175 };
20176 };
20177 responses: {
20178 /** Response */
20179 200: {
20180 content: {
20181 "application/json": components["schemas"]["branch-restriction-policy"];
20182 };
20183 };
20184 404: components["responses"]["not_found"];
20185 };
20186 };
20187 /**
20188 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20189 *
20190 * Disables the ability to restrict who can push to this branch.
20191 */
20192 "repos/delete-access-restrictions": {
20193 parameters: {
20194 path: {
20195 owner: components["parameters"]["owner"];
20196 repo: components["parameters"]["repo"];
20197 /** The name of the branch. */
20198 branch: components["parameters"]["branch"];
20199 };
20200 };
20201 responses: {
20202 /** Response */
20203 204: never;
20204 };
20205 };
20206 /**
20207 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20208 *
20209 * 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.
20210 */
20211 "repos/get-apps-with-access-to-protected-branch": {
20212 parameters: {
20213 path: {
20214 owner: components["parameters"]["owner"];
20215 repo: components["parameters"]["repo"];
20216 /** The name of the branch. */
20217 branch: components["parameters"]["branch"];
20218 };
20219 };
20220 responses: {
20221 /** Response */
20222 200: {
20223 content: {
20224 "application/json": components["schemas"]["integration"][];
20225 };
20226 };
20227 404: components["responses"]["not_found"];
20228 };
20229 };
20230 /**
20231 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20232 *
20233 * 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.
20234 *
20235 * | Type | Description |
20236 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
20237 * | `array` | The 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. |
20238 */
20239 "repos/set-app-access-restrictions": {
20240 parameters: {
20241 path: {
20242 owner: components["parameters"]["owner"];
20243 repo: components["parameters"]["repo"];
20244 /** The name of the branch. */
20245 branch: components["parameters"]["branch"];
20246 };
20247 };
20248 responses: {
20249 /** Response */
20250 200: {
20251 content: {
20252 "application/json": components["schemas"]["integration"][];
20253 };
20254 };
20255 422: components["responses"]["validation_failed"];
20256 };
20257 requestBody: {
20258 content: {
20259 "application/json": {
20260 /** apps parameter */
20261 apps: string[];
20262 };
20263 };
20264 };
20265 };
20266 /**
20267 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20268 *
20269 * 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.
20270 *
20271 * | Type | Description |
20272 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
20273 * | `array` | The 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. |
20274 */
20275 "repos/add-app-access-restrictions": {
20276 parameters: {
20277 path: {
20278 owner: components["parameters"]["owner"];
20279 repo: components["parameters"]["repo"];
20280 /** The name of the branch. */
20281 branch: components["parameters"]["branch"];
20282 };
20283 };
20284 responses: {
20285 /** Response */
20286 200: {
20287 content: {
20288 "application/json": components["schemas"]["integration"][];
20289 };
20290 };
20291 422: components["responses"]["validation_failed"];
20292 };
20293 requestBody: {
20294 content: {
20295 "application/json": {
20296 /** apps parameter */
20297 apps: string[];
20298 };
20299 };
20300 };
20301 };
20302 /**
20303 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20304 *
20305 * 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.
20306 *
20307 * | Type | Description |
20308 * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
20309 * | `array` | The 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. |
20310 */
20311 "repos/remove-app-access-restrictions": {
20312 parameters: {
20313 path: {
20314 owner: components["parameters"]["owner"];
20315 repo: components["parameters"]["repo"];
20316 /** The name of the branch. */
20317 branch: components["parameters"]["branch"];
20318 };
20319 };
20320 responses: {
20321 /** Response */
20322 200: {
20323 content: {
20324 "application/json": components["schemas"]["integration"][];
20325 };
20326 };
20327 422: components["responses"]["validation_failed"];
20328 };
20329 requestBody: {
20330 content: {
20331 "application/json": {
20332 /** apps parameter */
20333 apps: string[];
20334 };
20335 };
20336 };
20337 };
20338 /**
20339 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20340 *
20341 * Lists the teams who have push access to this branch. The list includes child teams.
20342 */
20343 "repos/get-teams-with-access-to-protected-branch": {
20344 parameters: {
20345 path: {
20346 owner: components["parameters"]["owner"];
20347 repo: components["parameters"]["repo"];
20348 /** The name of the branch. */
20349 branch: components["parameters"]["branch"];
20350 };
20351 };
20352 responses: {
20353 /** Response */
20354 200: {
20355 content: {
20356 "application/json": components["schemas"]["team"][];
20357 };
20358 };
20359 404: components["responses"]["not_found"];
20360 };
20361 };
20362 /**
20363 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20364 *
20365 * 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.
20366 *
20367 * | Type | Description |
20368 * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
20369 * | `array` | The 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. |
20370 */
20371 "repos/set-team-access-restrictions": {
20372 parameters: {
20373 path: {
20374 owner: components["parameters"]["owner"];
20375 repo: components["parameters"]["repo"];
20376 /** The name of the branch. */
20377 branch: components["parameters"]["branch"];
20378 };
20379 };
20380 responses: {
20381 /** Response */
20382 200: {
20383 content: {
20384 "application/json": components["schemas"]["team"][];
20385 };
20386 };
20387 422: components["responses"]["validation_failed"];
20388 };
20389 requestBody: {
20390 content: {
20391 "application/json": {
20392 /** teams parameter */
20393 teams: string[];
20394 };
20395 };
20396 };
20397 };
20398 /**
20399 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20400 *
20401 * Grants the specified teams push access for this branch. You can also give push access to child teams.
20402 *
20403 * | Type | Description |
20404 * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
20405 * | `array` | The 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. |
20406 */
20407 "repos/add-team-access-restrictions": {
20408 parameters: {
20409 path: {
20410 owner: components["parameters"]["owner"];
20411 repo: components["parameters"]["repo"];
20412 /** The name of the branch. */
20413 branch: components["parameters"]["branch"];
20414 };
20415 };
20416 responses: {
20417 /** Response */
20418 200: {
20419 content: {
20420 "application/json": components["schemas"]["team"][];
20421 };
20422 };
20423 422: components["responses"]["validation_failed"];
20424 };
20425 requestBody: {
20426 content: {
20427 "application/json": {
20428 /** teams parameter */
20429 teams: string[];
20430 };
20431 };
20432 };
20433 };
20434 /**
20435 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20436 *
20437 * Removes the ability of a team to push to this branch. You can also remove push access for child teams.
20438 *
20439 * | Type | Description |
20440 * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
20441 * | `array` | Teams 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. |
20442 */
20443 "repos/remove-team-access-restrictions": {
20444 parameters: {
20445 path: {
20446 owner: components["parameters"]["owner"];
20447 repo: components["parameters"]["repo"];
20448 /** The name of the branch. */
20449 branch: components["parameters"]["branch"];
20450 };
20451 };
20452 responses: {
20453 /** Response */
20454 200: {
20455 content: {
20456 "application/json": components["schemas"]["team"][];
20457 };
20458 };
20459 422: components["responses"]["validation_failed"];
20460 };
20461 requestBody: {
20462 content: {
20463 "application/json": {
20464 /** teams parameter */
20465 teams: string[];
20466 };
20467 };
20468 };
20469 };
20470 /**
20471 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20472 *
20473 * Lists the people who have push access to this branch.
20474 */
20475 "repos/get-users-with-access-to-protected-branch": {
20476 parameters: {
20477 path: {
20478 owner: components["parameters"]["owner"];
20479 repo: components["parameters"]["repo"];
20480 /** The name of the branch. */
20481 branch: components["parameters"]["branch"];
20482 };
20483 };
20484 responses: {
20485 /** Response */
20486 200: {
20487 content: {
20488 "application/json": components["schemas"]["simple-user"][];
20489 };
20490 };
20491 404: components["responses"]["not_found"];
20492 };
20493 };
20494 /**
20495 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20496 *
20497 * 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.
20498 *
20499 * | Type | Description |
20500 * | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
20501 * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20502 */
20503 "repos/set-user-access-restrictions": {
20504 parameters: {
20505 path: {
20506 owner: components["parameters"]["owner"];
20507 repo: components["parameters"]["repo"];
20508 /** The name of the branch. */
20509 branch: components["parameters"]["branch"];
20510 };
20511 };
20512 responses: {
20513 /** Response */
20514 200: {
20515 content: {
20516 "application/json": components["schemas"]["simple-user"][];
20517 };
20518 };
20519 422: components["responses"]["validation_failed"];
20520 };
20521 requestBody: {
20522 content: {
20523 "application/json": {
20524 /** users parameter */
20525 users: string[];
20526 };
20527 };
20528 };
20529 };
20530 /**
20531 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20532 *
20533 * Grants the specified people push access for this branch.
20534 *
20535 * | Type | Description |
20536 * | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
20537 * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20538 */
20539 "repos/add-user-access-restrictions": {
20540 parameters: {
20541 path: {
20542 owner: components["parameters"]["owner"];
20543 repo: components["parameters"]["repo"];
20544 /** The name of the branch. */
20545 branch: components["parameters"]["branch"];
20546 };
20547 };
20548 responses: {
20549 /** Response */
20550 200: {
20551 content: {
20552 "application/json": components["schemas"]["simple-user"][];
20553 };
20554 };
20555 422: components["responses"]["validation_failed"];
20556 };
20557 requestBody: {
20558 content: {
20559 "application/json": {
20560 /** users parameter */
20561 users: string[];
20562 };
20563 };
20564 };
20565 };
20566 /**
20567 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20568 *
20569 * Removes the ability of a user to push to this branch.
20570 *
20571 * | Type | Description |
20572 * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
20573 * | `array` | Usernames 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. |
20574 */
20575 "repos/remove-user-access-restrictions": {
20576 parameters: {
20577 path: {
20578 owner: components["parameters"]["owner"];
20579 repo: components["parameters"]["repo"];
20580 /** The name of the branch. */
20581 branch: components["parameters"]["branch"];
20582 };
20583 };
20584 responses: {
20585 /** Response */
20586 200: {
20587 content: {
20588 "application/json": components["schemas"]["simple-user"][];
20589 };
20590 };
20591 422: components["responses"]["validation_failed"];
20592 };
20593 requestBody: {
20594 content: {
20595 "application/json": {
20596 /** users parameter */
20597 users: string[];
20598 };
20599 };
20600 };
20601 };
20602 /**
20603 * Renames a branch in a repository.
20604 *
20605 * **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](https://docs.github.com/github/administering-a-repository/renaming-a-branch)".
20606 *
20607 * The permissions required to use this endpoint depends on whether you are renaming the default branch.
20608 *
20609 * To rename a non-default branch:
20610 *
20611 * * Users must have push access.
20612 * * GitHub Apps must have the `contents:write` repository permission.
20613 *
20614 * To rename the default branch:
20615 *
20616 * * Users must have admin or owner permissions.
20617 * * GitHub Apps must have the `administration:write` repository permission.
20618 */
20619 "repos/rename-branch": {
20620 parameters: {
20621 path: {
20622 owner: components["parameters"]["owner"];
20623 repo: components["parameters"]["repo"];
20624 /** The name of the branch. */
20625 branch: components["parameters"]["branch"];
20626 };
20627 };
20628 responses: {
20629 /** Response */
20630 201: {
20631 content: {
20632 "application/json": components["schemas"]["branch-with-protection"];
20633 };
20634 };
20635 403: components["responses"]["forbidden"];
20636 404: components["responses"]["not_found"];
20637 422: components["responses"]["validation_failed"];
20638 };
20639 requestBody: {
20640 content: {
20641 "application/json": {
20642 /** The new name of the branch. */
20643 new_name: string;
20644 };
20645 };
20646 };
20647 };
20648 /**
20649 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20650 *
20651 * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs.
20652 *
20653 * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
20654 */
20655 "checks/create": {
20656 parameters: {
20657 path: {
20658 owner: components["parameters"]["owner"];
20659 repo: components["parameters"]["repo"];
20660 };
20661 };
20662 responses: {
20663 /** Response */
20664 201: {
20665 content: {
20666 "application/json": components["schemas"]["check-run"];
20667 };
20668 };
20669 };
20670 requestBody: {
20671 content: {
20672 "application/json": (
20673 | ({
20674 status: "completed";
20675 } & { [key: string]: any })
20676 | ({
20677 status?: "queued" | "in_progress";
20678 } & { [key: string]: any })
20679 ) & {
20680 /** The name of the check. For example, "code-coverage". */
20681 name: string;
20682 /** The SHA of the commit. */
20683 head_sha: string;
20684 /** The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */
20685 details_url?: string;
20686 /** A reference for the run on the integrator's system. */
20687 external_id?: string;
20688 /** The current status. Can be one of `queued`, `in_progress`, or `completed`. */
20689 status?: "queued" | "in_progress" | "completed";
20690 /** The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
20691 started_at?: string;
20692 /**
20693 * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`.
20694 * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
20695 */
20696 conclusion?:
20697 | "action_required"
20698 | "cancelled"
20699 | "failure"
20700 | "neutral"
20701 | "success"
20702 | "skipped"
20703 | "stale"
20704 | "timed_out";
20705 /** The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
20706 completed_at?: string;
20707 /** Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */
20708 output?: {
20709 /** The title of the check run. */
20710 title: string;
20711 /** The summary of the check run. This parameter supports Markdown. */
20712 summary: string;
20713 /** The details of the check run. This parameter supports Markdown. */
20714 text?: string;
20715 /** Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://help.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */
20716 annotations?: {
20717 /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */
20718 path: string;
20719 /** The start line of the annotation. */
20720 start_line: number;
20721 /** The end line of the annotation. */
20722 end_line: number;
20723 /** The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
20724 start_column?: number;
20725 /** The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
20726 end_column?: number;
20727 /** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */
20728 annotation_level: "notice" | "warning" | "failure";
20729 /** A short description of the feedback for these lines of code. The maximum size is 64 KB. */
20730 message: string;
20731 /** The title that represents the annotation. The maximum size is 255 characters. */
20732 title?: string;
20733 /** Details about this annotation. The maximum size is 64 KB. */
20734 raw_details?: string;
20735 }[];
20736 /** Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */
20737 images?: {
20738 /** The alternative text for the image. */
20739 alt: string;
20740 /** The full URL of the image. */
20741 image_url: string;
20742 /** A short image description. */
20743 caption?: string;
20744 }[];
20745 };
20746 /** Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */
20747 actions?: {
20748 /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */
20749 label: string;
20750 /** A short explanation of what this action would do. The maximum size is 40 characters. */
20751 description: string;
20752 /** A reference for the action on the integrator's system. The maximum size is 20 characters. */
20753 identifier: string;
20754 }[];
20755 };
20756 };
20757 };
20758 };
20759 /**
20760 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20761 *
20762 * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
20763 */
20764 "checks/get": {
20765 parameters: {
20766 path: {
20767 owner: components["parameters"]["owner"];
20768 repo: components["parameters"]["repo"];
20769 /** check_run_id parameter */
20770 check_run_id: components["parameters"]["check_run_id"];
20771 };
20772 };
20773 responses: {
20774 /** Response */
20775 200: {
20776 content: {
20777 "application/json": components["schemas"]["check-run"];
20778 };
20779 };
20780 };
20781 };
20782 /**
20783 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20784 *
20785 * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.
20786 */
20787 "checks/update": {
20788 parameters: {
20789 path: {
20790 owner: components["parameters"]["owner"];
20791 repo: components["parameters"]["repo"];
20792 /** check_run_id parameter */
20793 check_run_id: components["parameters"]["check_run_id"];
20794 };
20795 };
20796 responses: {
20797 /** Response */
20798 200: {
20799 content: {
20800 "application/json": components["schemas"]["check-run"];
20801 };
20802 };
20803 };
20804 requestBody: {
20805 content: {
20806 "application/json": (Partial<
20807 {
20808 status?: "completed";
20809 } & { [key: string]: any }
20810 > &
20811 Partial<
20812 {
20813 status?: "queued" | "in_progress";
20814 } & { [key: string]: any }
20815 >) & {
20816 /** The name of the check. For example, "code-coverage". */
20817 name?: string;
20818 /** The URL of the integrator's site that has the full details of the check. */
20819 details_url?: string;
20820 /** A reference for the run on the integrator's system. */
20821 external_id?: string;
20822 /** This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
20823 started_at?: string;
20824 /** The current status. Can be one of `queued`, `in_progress`, or `completed`. */
20825 status?: "queued" | "in_progress" | "completed";
20826 /**
20827 * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`.
20828 * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
20829 */
20830 conclusion?:
20831 | "action_required"
20832 | "cancelled"
20833 | "failure"
20834 | "neutral"
20835 | "success"
20836 | "skipped"
20837 | "stale"
20838 | "timed_out";
20839 /** The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
20840 completed_at?: string;
20841 /** Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */
20842 output?: {
20843 /** **Required**. */
20844 title?: string;
20845 /** Can contain Markdown. */
20846 summary: string;
20847 /** Can contain Markdown. */
20848 text?: string;
20849 /** Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://help.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */
20850 annotations?: {
20851 /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */
20852 path: string;
20853 /** The start line of the annotation. */
20854 start_line: number;
20855 /** The end line of the annotation. */
20856 end_line: number;
20857 /** The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
20858 start_column?: number;
20859 /** The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
20860 end_column?: number;
20861 /** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */
20862 annotation_level: "notice" | "warning" | "failure";
20863 /** A short description of the feedback for these lines of code. The maximum size is 64 KB. */
20864 message: string;
20865 /** The title that represents the annotation. The maximum size is 255 characters. */
20866 title?: string;
20867 /** Details about this annotation. The maximum size is 64 KB. */
20868 raw_details?: string;
20869 }[];
20870 /** Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */
20871 images?: {
20872 /** The alternative text for the image. */
20873 alt: string;
20874 /** The full URL of the image. */
20875 image_url: string;
20876 /** A short image description. */
20877 caption?: string;
20878 }[];
20879 };
20880 /** Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */
20881 actions?: {
20882 /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */
20883 label: string;
20884 /** A short explanation of what this action would do. The maximum size is 40 characters. */
20885 description: string;
20886 /** A reference for the action on the integrator's system. The maximum size is 20 characters. */
20887 identifier: string;
20888 }[];
20889 };
20890 };
20891 };
20892 };
20893 /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */
20894 "checks/list-annotations": {
20895 parameters: {
20896 path: {
20897 owner: components["parameters"]["owner"];
20898 repo: components["parameters"]["repo"];
20899 /** check_run_id parameter */
20900 check_run_id: components["parameters"]["check_run_id"];
20901 };
20902 query: {
20903 /** Results per page (max 100). */
20904 per_page?: components["parameters"]["per_page"];
20905 /** Page number of the results to fetch. */
20906 page?: components["parameters"]["page"];
20907 };
20908 };
20909 responses: {
20910 /** Response */
20911 200: {
20912 headers: {};
20913 content: {
20914 "application/json": components["schemas"]["check-annotation"][];
20915 };
20916 };
20917 };
20918 };
20919 /**
20920 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
20921 *
20922 * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites.
20923 */
20924 "checks/create-suite": {
20925 parameters: {
20926 path: {
20927 owner: components["parameters"]["owner"];
20928 repo: components["parameters"]["repo"];
20929 };
20930 };
20931 responses: {
20932 /** when the suite already existed */
20933 200: {
20934 content: {
20935 "application/json": components["schemas"]["check-suite"];
20936 };
20937 };
20938 /** Response when the suite was created */
20939 201: {
20940 content: {
20941 "application/json": components["schemas"]["check-suite"];
20942 };
20943 };
20944 };
20945 requestBody: {
20946 content: {
20947 "application/json": {
20948 /** The sha of the head commit. */
20949 head_sha: string;
20950 };
20951 };
20952 };
20953 };
20954 /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */
20955 "checks/set-suites-preferences": {
20956 parameters: {
20957 path: {
20958 owner: components["parameters"]["owner"];
20959 repo: components["parameters"]["repo"];
20960 };
20961 };
20962 responses: {
20963 /** Response */
20964 200: {
20965 content: {
20966 "application/json": components["schemas"]["check-suite-preference"];
20967 };
20968 };
20969 };
20970 requestBody: {
20971 content: {
20972 "application/json": {
20973 /** Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */
20974 auto_trigger_checks?: {
20975 /** The `id` of the GitHub App. */
20976 app_id: number;
20977 /** Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. */
20978 setting: boolean;
20979 }[];
20980 };
20981 };
20982 };
20983 };
20984 /**
20985 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
20986 *
20987 * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
20988 */
20989 "checks/get-suite": {
20990 parameters: {
20991 path: {
20992 owner: components["parameters"]["owner"];
20993 repo: components["parameters"]["repo"];
20994 /** check_suite_id parameter */
20995 check_suite_id: components["parameters"]["check_suite_id"];
20996 };
20997 };
20998 responses: {
20999 /** Response */
21000 200: {
21001 content: {
21002 "application/json": components["schemas"]["check-suite"];
21003 };
21004 };
21005 };
21006 };
21007 /**
21008 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
21009 *
21010 * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
21011 */
21012 "checks/list-for-suite": {
21013 parameters: {
21014 path: {
21015 owner: components["parameters"]["owner"];
21016 repo: components["parameters"]["repo"];
21017 /** check_suite_id parameter */
21018 check_suite_id: components["parameters"]["check_suite_id"];
21019 };
21020 query: {
21021 /** Returns check runs with the specified `name`. */
21022 check_name?: components["parameters"]["check_name"];
21023 /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */
21024 status?: components["parameters"]["status"];
21025 /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */
21026 filter?: "latest" | "all";
21027 /** Results per page (max 100). */
21028 per_page?: components["parameters"]["per_page"];
21029 /** Page number of the results to fetch. */
21030 page?: components["parameters"]["page"];
21031 };
21032 };
21033 responses: {
21034 /** Response */
21035 200: {
21036 headers: {};
21037 content: {
21038 "application/json": {
21039 total_count: number;
21040 check_runs: components["schemas"]["check-run"][];
21041 };
21042 };
21043 };
21044 };
21045 };
21046 /**
21047 * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.
21048 *
21049 * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.
21050 */
21051 "checks/rerequest-suite": {
21052 parameters: {
21053 path: {
21054 owner: components["parameters"]["owner"];
21055 repo: components["parameters"]["repo"];
21056 /** check_suite_id parameter */
21057 check_suite_id: components["parameters"]["check_suite_id"];
21058 };
21059 };
21060 responses: {
21061 /** Response */
21062 201: {
21063 content: {
21064 "application/json": { [key: string]: any };
21065 };
21066 };
21067 };
21068 };
21069 /**
21070 * Lists all open code scanning alerts for the default branch (usually `main`
21071 * or `master`). You must use an access token with the `security_events` scope to use
21072 * this endpoint. GitHub Apps must have the `security_events` read permission to use
21073 * this endpoint.
21074 *
21075 * The response includes a `most_recent_instance` object.
21076 * This provides details of the most recent instance of this alert
21077 * for the default branch or for the specified Git reference
21078 * (if you used `ref` in the request).
21079 */
21080 "code-scanning/list-alerts-for-repo": {
21081 parameters: {
21082 path: {
21083 owner: components["parameters"]["owner"];
21084 repo: components["parameters"]["repo"];
21085 };
21086 query: {
21087 /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */
21088 tool_name?: components["parameters"]["tool_name"];
21089 /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */
21090 tool_guid?: components["parameters"]["tool_guid"];
21091 /** Page number of the results to fetch. */
21092 page?: components["parameters"]["page"];
21093 /** Results per page (max 100). */
21094 per_page?: components["parameters"]["per_page"];
21095 /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. */
21096 ref?: components["parameters"]["git_ref"];
21097 /** Set to `open`, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */
21098 state?: components["schemas"]["code-scanning-alert-state"];
21099 };
21100 };
21101 responses: {
21102 /** Response */
21103 200: {
21104 content: {
21105 "application/json": components["schemas"]["code-scanning-alert-items"][];
21106 };
21107 };
21108 403: components["responses"]["code_scanning_forbidden_read"];
21109 404: components["responses"]["not_found"];
21110 503: components["responses"]["service_unavailable"];
21111 };
21112 };
21113 /**
21114 * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.
21115 *
21116 * **Deprecation notice**:
21117 * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`.
21118 */
21119 "code-scanning/get-alert": {
21120 parameters: {
21121 path: {
21122 owner: components["parameters"]["owner"];
21123 repo: components["parameters"]["repo"];
21124 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
21125 alert_number: components["parameters"]["alert_number"];
21126 };
21127 };
21128 responses: {
21129 /** Response */
21130 200: {
21131 content: {
21132 "application/json": components["schemas"]["code-scanning-alert"];
21133 };
21134 };
21135 403: components["responses"]["code_scanning_forbidden_read"];
21136 404: components["responses"]["not_found"];
21137 503: components["responses"]["service_unavailable"];
21138 };
21139 };
21140 /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. */
21141 "code-scanning/update-alert": {
21142 parameters: {
21143 path: {
21144 owner: components["parameters"]["owner"];
21145 repo: components["parameters"]["repo"];
21146 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
21147 alert_number: components["parameters"]["alert_number"];
21148 };
21149 };
21150 responses: {
21151 /** Response */
21152 200: {
21153 content: {
21154 "application/json": components["schemas"]["code-scanning-alert"];
21155 };
21156 };
21157 403: components["responses"]["code_scanning_forbidden_write"];
21158 404: components["responses"]["not_found"];
21159 503: components["responses"]["service_unavailable"];
21160 };
21161 requestBody: {
21162 content: {
21163 "application/json": {
21164 state: components["schemas"]["code-scanning-alert-set-state"];
21165 dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"];
21166 };
21167 };
21168 };
21169 };
21170 /** Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */
21171 "code-scanning/list-alert-instances": {
21172 parameters: {
21173 path: {
21174 owner: components["parameters"]["owner"];
21175 repo: components["parameters"]["repo"];
21176 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
21177 alert_number: components["parameters"]["alert_number"];
21178 };
21179 query: {
21180 /** Page number of the results to fetch. */
21181 page?: components["parameters"]["page"];
21182 /** Results per page (max 100). */
21183 per_page?: components["parameters"]["per_page"];
21184 /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. */
21185 ref?: components["parameters"]["git_ref"];
21186 };
21187 };
21188 responses: {
21189 /** Response */
21190 200: {
21191 content: {
21192 "application/json": components["schemas"]["code-scanning-alert-instance"][];
21193 };
21194 };
21195 403: components["responses"]["code_scanning_forbidden_read"];
21196 404: components["responses"]["not_found"];
21197 503: components["responses"]["service_unavailable"];
21198 };
21199 };
21200 /**
21201 * Lists the details of all code scanning analyses for a repository,
21202 * starting with the most recent.
21203 * The response is paginated and you can use the `page` and `per_page` parameters
21204 * to list the analyses you're interested in.
21205 * By default 30 analyses are listed per page.
21206 *
21207 * The `rules_count` field in the response give the number of rules
21208 * that were run in the analysis.
21209 * For very old analyses this data is not available,
21210 * and `0` is returned in this field.
21211 *
21212 * You must use an access token with the `security_events` scope to use this endpoint.
21213 * GitHub Apps must have the `security_events` read permission to use this endpoint.
21214 *
21215 * **Deprecation notice**:
21216 * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
21217 */
21218 "code-scanning/list-recent-analyses": {
21219 parameters: {
21220 path: {
21221 owner: components["parameters"]["owner"];
21222 repo: components["parameters"]["repo"];
21223 };
21224 query: {
21225 /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */
21226 tool_name?: components["parameters"]["tool_name"];
21227 /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */
21228 tool_guid?: components["parameters"]["tool_guid"];
21229 /** Page number of the results to fetch. */
21230 page?: components["parameters"]["page"];
21231 /** Results per page (max 100). */
21232 per_page?: components["parameters"]["per_page"];
21233 /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. */
21234 ref?: components["schemas"]["code-scanning-ref"];
21235 /** Filter analyses belonging to the same SARIF upload. */
21236 sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"];
21237 };
21238 };
21239 responses: {
21240 /** Response */
21241 200: {
21242 content: {
21243 "application/json": components["schemas"]["code-scanning-analysis"][];
21244 };
21245 };
21246 403: components["responses"]["code_scanning_forbidden_read"];
21247 404: components["responses"]["not_found"];
21248 503: components["responses"]["service_unavailable"];
21249 };
21250 };
21251 /**
21252 * Gets a specified code scanning analysis for a repository.
21253 * You must use an access token with the `security_events` scope to use this endpoint.
21254 * GitHub Apps must have the `security_events` read permission to use this endpoint.
21255 *
21256 * The default JSON response contains fields that describe the analysis.
21257 * This includes the Git reference and commit SHA to which the analysis relates,
21258 * the datetime of the analysis, the name of the code scanning tool,
21259 * and the number of alerts.
21260 *
21261 * The `rules_count` field in the default response give the number of rules
21262 * that were run in the analysis.
21263 * For very old analyses this data is not available,
21264 * and `0` is returned in this field.
21265 *
21266 * If you use the Accept header `application/sarif+json`,
21267 * the response contains the analysis data that was uploaded.
21268 * This is formatted as
21269 * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).
21270 *
21271 * **Deprecation notice**:
21272 * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
21273 */
21274 "code-scanning/get-analysis": {
21275 parameters: {
21276 path: {
21277 owner: components["parameters"]["owner"];
21278 repo: components["parameters"]["repo"];
21279 /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */
21280 analysis_id: number;
21281 };
21282 };
21283 responses: {
21284 /** Response */
21285 200: {
21286 content: {
21287 "application/json+sarif": string;
21288 "application/json": components["schemas"]["code-scanning-analysis"];
21289 };
21290 };
21291 403: components["responses"]["code_scanning_forbidden_read"];
21292 404: components["responses"]["not_found"];
21293 503: components["responses"]["service_unavailable"];
21294 };
21295 };
21296 /**
21297 * Deletes a specified code scanning analysis from a repository. For
21298 * private repositories, you must use an access token with the `repo` scope. For public repositories,
21299 * you must use an access token with `public_repo` and `repo:security_events` scopes.
21300 * GitHub Apps must have the `security_events` write permission to use this endpoint.
21301 *
21302 * You can delete one analysis at a time.
21303 * To delete a series of analyses, start with the most recent analysis and work backwards.
21304 * Conceptually, the process is similar to the undo function in a text editor.
21305 *
21306 * When you list the analyses for a repository,
21307 * one or more will be identified as deletable in the response:
21308 *
21309 * ```
21310 * "deletable": true
21311 * ```
21312 *
21313 * An analysis is deletable when it's the most recent in a set of analyses.
21314 * Typically, a repository will have multiple sets of analyses
21315 * for each enabled code scanning tool,
21316 * where a set is determined by a unique combination of analysis values:
21317 *
21318 * * `ref`
21319 * * `tool`
21320 * * `analysis_key`
21321 * * `environment`
21322 *
21323 * If you attempt to delete an analysis that is not the most recent in a set,
21324 * you'll get a 400 response with the message:
21325 *
21326 * ```
21327 * Analysis specified is not deletable.
21328 * ```
21329 *
21330 * The response from a successful `DELETE` operation provides you with
21331 * two alternative URLs for deleting the next analysis in the set
21332 * (see the example default response below).
21333 * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
21334 * in the set. This is a useful option if you want to preserve at least one analysis
21335 * for the specified tool in your repository.
21336 * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
21337 * When you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url`
21338 * in the 200 response is `null`.
21339 *
21340 * As an example of the deletion process,
21341 * let's imagine that you added a workflow that configured a particular code scanning tool
21342 * to analyze the code in a repository. This tool has added 15 analyses:
21343 * 10 on the default branch, and another 5 on a topic branch.
21344 * You therefore have two separate sets of analyses for this tool.
21345 * You've now decided that you want to remove all of the analyses for the tool.
21346 * To do this you must make 15 separate deletion requests.
21347 * To start, you must find the deletable analysis for one of the sets,
21348 * step through deleting the analyses in that set,
21349 * and then repeat the process for the second set.
21350 * The procedure therefore consists of a nested loop:
21351 *
21352 * **Outer loop**:
21353 * * List the analyses for the repository, filtered by tool.
21354 * * Parse this list to find a deletable analysis. If found:
21355 *
21356 * **Inner loop**:
21357 * * Delete the identified analysis.
21358 * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
21359 *
21360 * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
21361 */
21362 "code-scanning/delete-analysis": {
21363 parameters: {
21364 path: {
21365 owner: components["parameters"]["owner"];
21366 repo: components["parameters"]["repo"];
21367 /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */
21368 analysis_id: number;
21369 };
21370 query: {
21371 /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */
21372 confirm_delete?: string | null;
21373 };
21374 };
21375 responses: {
21376 /** Response */
21377 200: {
21378 content: {
21379 "application/json": components["schemas"]["code-scanning-analysis-deletion"];
21380 };
21381 };
21382 400: components["responses"]["bad_request"];
21383 403: components["responses"]["code_scanning_forbidden_write"];
21384 404: components["responses"]["not_found"];
21385 503: components["responses"]["service_unavailable"];
21386 };
21387 };
21388 /**
21389 * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.
21390 *
21391 * There are two places where you can upload code scanning results.
21392 * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
21393 * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
21394 *
21395 * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:
21396 *
21397 * ```
21398 * gzip -c analysis-data.sarif | base64 -w0
21399 * ```
21400 *
21401 * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.
21402 *
21403 * The `202 Accepted`, response includes an `id` value.
21404 * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.
21405 * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)."
21406 */
21407 "code-scanning/upload-sarif": {
21408 parameters: {
21409 path: {
21410 owner: components["parameters"]["owner"];
21411 repo: components["parameters"]["repo"];
21412 };
21413 };
21414 responses: {
21415 /** Response */
21416 202: {
21417 content: {
21418 "application/json": components["schemas"]["code-scanning-sarifs-receipt"];
21419 };
21420 };
21421 /** Bad Request if the sarif field is invalid */
21422 400: unknown;
21423 403: components["responses"]["code_scanning_forbidden_write"];
21424 404: components["responses"]["not_found"];
21425 /** Payload Too Large if the sarif field is too large */
21426 413: unknown;
21427 503: components["responses"]["service_unavailable"];
21428 };
21429 requestBody: {
21430 content: {
21431 "application/json": {
21432 commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"];
21433 ref: components["schemas"]["code-scanning-ref"];
21434 sarif: components["schemas"]["code-scanning-analysis-sarif-file"];
21435 /**
21436 * The base directory used in the analysis, as it appears in the SARIF file.
21437 * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.
21438 */
21439 checkout_uri?: string;
21440 /** The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
21441 started_at?: string;
21442 /** The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */
21443 tool_name?: string;
21444 };
21445 };
21446 };
21447 };
21448 /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */
21449 "code-scanning/get-sarif": {
21450 parameters: {
21451 path: {
21452 owner: components["parameters"]["owner"];
21453 repo: components["parameters"]["repo"];
21454 /** The SARIF ID obtained after uploading. */
21455 sarif_id: string;
21456 };
21457 };
21458 responses: {
21459 /** Response */
21460 200: {
21461 content: {
21462 "application/json": components["schemas"]["code-scanning-sarifs-status"];
21463 };
21464 };
21465 403: components["responses"]["code_scanning_forbidden_read"];
21466 /** Not Found if the sarif id does not match any upload */
21467 404: unknown;
21468 503: components["responses"]["service_unavailable"];
21469 };
21470 };
21471 /**
21472 * 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.
21473 *
21474 * Team members will include the members of child teams.
21475 */
21476 "repos/list-collaborators": {
21477 parameters: {
21478 path: {
21479 owner: components["parameters"]["owner"];
21480 repo: components["parameters"]["repo"];
21481 };
21482 query: {
21483 /**
21484 * Filter collaborators returned by their affiliation. Can be one of:
21485 * \* `outside`: All outside collaborators of an organization-owned repository.
21486 * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.
21487 * \* `all`: All collaborators the authenticated user can see.
21488 */
21489 affiliation?: "outside" | "direct" | "all";
21490 /** Results per page (max 100). */
21491 per_page?: components["parameters"]["per_page"];
21492 /** Page number of the results to fetch. */
21493 page?: components["parameters"]["page"];
21494 };
21495 };
21496 responses: {
21497 /** Response */
21498 200: {
21499 headers: {};
21500 content: {
21501 "application/json": components["schemas"]["collaborator"][];
21502 };
21503 };
21504 404: components["responses"]["not_found"];
21505 };
21506 };
21507 /**
21508 * 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.
21509 *
21510 * Team members will include the members of child teams.
21511 */
21512 "repos/check-collaborator": {
21513 parameters: {
21514 path: {
21515 owner: components["parameters"]["owner"];
21516 repo: components["parameters"]["repo"];
21517 username: components["parameters"]["username"];
21518 };
21519 };
21520 responses: {
21521 /** Response if user is a collaborator */
21522 204: never;
21523 /** Not Found if user is not a collaborator */
21524 404: unknown;
21525 };
21526 };
21527 /**
21528 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
21529 *
21530 * For more information the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".
21531 *
21532 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
21533 *
21534 * 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](https://docs.github.com/rest/reference/repos#invitations).
21535 *
21536 * **Rate limits**
21537 *
21538 * To prevent abuse, 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.
21539 */
21540 "repos/add-collaborator": {
21541 parameters: {
21542 path: {
21543 owner: components["parameters"]["owner"];
21544 repo: components["parameters"]["repo"];
21545 username: components["parameters"]["username"];
21546 };
21547 };
21548 responses: {
21549 /** Response when a new invitation is created */
21550 201: {
21551 content: {
21552 "application/json": components["schemas"]["repository-invitation"];
21553 };
21554 };
21555 /** Response when person is already a collaborator */
21556 204: never;
21557 403: components["responses"]["forbidden"];
21558 422: components["responses"]["validation_failed"];
21559 };
21560 requestBody: {
21561 content: {
21562 "application/json": {
21563 /**
21564 * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of:
21565 * \* `pull` - can pull, but not push to or administer this repository.
21566 * \* `push` - can pull and push, but not administer this repository.
21567 * \* `admin` - can pull, push and administer this repository.
21568 * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
21569 * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
21570 */
21571 permission?: "pull" | "push" | "admin" | "maintain" | "triage";
21572 permissions?: string;
21573 };
21574 };
21575 };
21576 };
21577 "repos/remove-collaborator": {
21578 parameters: {
21579 path: {
21580 owner: components["parameters"]["owner"];
21581 repo: components["parameters"]["repo"];
21582 username: components["parameters"]["username"];
21583 };
21584 };
21585 responses: {
21586 /** Response */
21587 204: never;
21588 };
21589 };
21590 /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */
21591 "repos/get-collaborator-permission-level": {
21592 parameters: {
21593 path: {
21594 owner: components["parameters"]["owner"];
21595 repo: components["parameters"]["repo"];
21596 username: components["parameters"]["username"];
21597 };
21598 };
21599 responses: {
21600 /** if user has admin permissions */
21601 200: {
21602 content: {
21603 "application/json": components["schemas"]["repository-collaborator-permission"];
21604 };
21605 };
21606 404: components["responses"]["not_found"];
21607 };
21608 };
21609 /**
21610 * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/).
21611 *
21612 * Comments are ordered by ascending ID.
21613 */
21614 "repos/list-commit-comments-for-repo": {
21615 parameters: {
21616 path: {
21617 owner: components["parameters"]["owner"];
21618 repo: components["parameters"]["repo"];
21619 };
21620 query: {
21621 /** Results per page (max 100). */
21622 per_page?: components["parameters"]["per_page"];
21623 /** Page number of the results to fetch. */
21624 page?: components["parameters"]["page"];
21625 };
21626 };
21627 responses: {
21628 /** Response */
21629 200: {
21630 headers: {};
21631 content: {
21632 "application/json": components["schemas"]["commit-comment"][];
21633 };
21634 };
21635 };
21636 };
21637 "repos/get-commit-comment": {
21638 parameters: {
21639 path: {
21640 owner: components["parameters"]["owner"];
21641 repo: components["parameters"]["repo"];
21642 /** comment_id parameter */
21643 comment_id: components["parameters"]["comment_id"];
21644 };
21645 };
21646 responses: {
21647 /** Response */
21648 200: {
21649 content: {
21650 "application/json": components["schemas"]["commit-comment"];
21651 };
21652 };
21653 404: components["responses"]["not_found"];
21654 };
21655 };
21656 "repos/delete-commit-comment": {
21657 parameters: {
21658 path: {
21659 owner: components["parameters"]["owner"];
21660 repo: components["parameters"]["repo"];
21661 /** comment_id parameter */
21662 comment_id: components["parameters"]["comment_id"];
21663 };
21664 };
21665 responses: {
21666 /** Response */
21667 204: never;
21668 404: components["responses"]["not_found"];
21669 };
21670 };
21671 "repos/update-commit-comment": {
21672 parameters: {
21673 path: {
21674 owner: components["parameters"]["owner"];
21675 repo: components["parameters"]["repo"];
21676 /** comment_id parameter */
21677 comment_id: components["parameters"]["comment_id"];
21678 };
21679 };
21680 responses: {
21681 /** Response */
21682 200: {
21683 content: {
21684 "application/json": components["schemas"]["commit-comment"];
21685 };
21686 };
21687 404: components["responses"]["not_found"];
21688 };
21689 requestBody: {
21690 content: {
21691 "application/json": {
21692 /** The contents of the comment */
21693 body: string;
21694 };
21695 };
21696 };
21697 };
21698 /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */
21699 "reactions/list-for-commit-comment": {
21700 parameters: {
21701 path: {
21702 owner: components["parameters"]["owner"];
21703 repo: components["parameters"]["repo"];
21704 /** comment_id parameter */
21705 comment_id: components["parameters"]["comment_id"];
21706 };
21707 query: {
21708 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */
21709 content?:
21710 | "+1"
21711 | "-1"
21712 | "laugh"
21713 | "confused"
21714 | "heart"
21715 | "hooray"
21716 | "rocket"
21717 | "eyes";
21718 /** Results per page (max 100). */
21719 per_page?: components["parameters"]["per_page"];
21720 /** Page number of the results to fetch. */
21721 page?: components["parameters"]["page"];
21722 };
21723 };
21724 responses: {
21725 /** Response */
21726 200: {
21727 headers: {};
21728 content: {
21729 "application/json": components["schemas"]["reaction"][];
21730 };
21731 };
21732 404: components["responses"]["not_found"];
21733 415: components["responses"]["preview_header_missing"];
21734 };
21735 };
21736 /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */
21737 "reactions/create-for-commit-comment": {
21738 parameters: {
21739 path: {
21740 owner: components["parameters"]["owner"];
21741 repo: components["parameters"]["repo"];
21742 /** comment_id parameter */
21743 comment_id: components["parameters"]["comment_id"];
21744 };
21745 };
21746 responses: {
21747 /** Reaction exists */
21748 200: {
21749 content: {
21750 "application/json": components["schemas"]["reaction"];
21751 };
21752 };
21753 /** Reaction created */
21754 201: {
21755 content: {
21756 "application/json": components["schemas"]["reaction"];
21757 };
21758 };
21759 415: components["responses"]["preview_header_missing"];
21760 422: components["responses"]["validation_failed"];
21761 };
21762 requestBody: {
21763 content: {
21764 "application/json": {
21765 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. */
21766 content:
21767 | "+1"
21768 | "-1"
21769 | "laugh"
21770 | "confused"
21771 | "heart"
21772 | "hooray"
21773 | "rocket"
21774 | "eyes";
21775 };
21776 };
21777 };
21778 };
21779 /**
21780 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.
21781 *
21782 * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments).
21783 */
21784 "reactions/delete-for-commit-comment": {
21785 parameters: {
21786 path: {
21787 owner: components["parameters"]["owner"];
21788 repo: components["parameters"]["repo"];
21789 /** comment_id parameter */
21790 comment_id: components["parameters"]["comment_id"];
21791 reaction_id: components["parameters"]["reaction-id"];
21792 };
21793 };
21794 responses: {
21795 /** Response */
21796 204: never;
21797 };
21798 };
21799 /**
21800 * **Signature verification object**
21801 *
21802 * 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:
21803 *
21804 * | Name | Type | Description |
21805 * | ---- | ---- | ----------- |
21806 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
21807 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
21808 * | `signature` | `string` | The signature that was extracted from the commit. |
21809 * | `payload` | `string` | The value that was signed. |
21810 *
21811 * These are the possible values for `reason` in the `verification` object:
21812 *
21813 * | Value | Description |
21814 * | ----- | ----------- |
21815 * | `expired_key` | The key that made the signature is expired. |
21816 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
21817 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
21818 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
21819 * | `unsigned` | The object does not include a signature. |
21820 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
21821 * | `no_user` | No user was associated with the `committer` email address in the commit. |
21822 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
21823 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
21824 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
21825 * | `malformed_signature` | There was an error parsing the signature. |
21826 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
21827 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
21828 */
21829 "repos/list-commits": {
21830 parameters: {
21831 path: {
21832 owner: components["parameters"]["owner"];
21833 repo: components["parameters"]["repo"];
21834 };
21835 query: {
21836 /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */
21837 sha?: string;
21838 /** Only commits containing this file path will be returned. */
21839 path?: string;
21840 /** GitHub login or email address by which to filter by commit author. */
21841 author?: string;
21842 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
21843 since?: components["parameters"]["since"];
21844 /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
21845 until?: string;
21846 /** Results per page (max 100). */
21847 per_page?: components["parameters"]["per_page"];
21848 /** Page number of the results to fetch. */
21849 page?: components["parameters"]["page"];
21850 };
21851 };
21852 responses: {
21853 /** Response */
21854 200: {
21855 headers: {};
21856 content: {
21857 "application/json": components["schemas"]["commit"][];
21858 };
21859 };
21860 400: components["responses"]["bad_request"];
21861 404: components["responses"]["not_found"];
21862 409: components["responses"]["conflict"];
21863 500: components["responses"]["internal_error"];
21864 };
21865 };
21866 /**
21867 * 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](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
21868 *
21869 * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
21870 */
21871 "repos/list-branches-for-head-commit": {
21872 parameters: {
21873 path: {
21874 owner: components["parameters"]["owner"];
21875 repo: components["parameters"]["repo"];
21876 /** commit_sha parameter */
21877 commit_sha: components["parameters"]["commit_sha"];
21878 };
21879 };
21880 responses: {
21881 /** Response */
21882 200: {
21883 content: {
21884 "application/json": components["schemas"]["branch-short"][];
21885 };
21886 };
21887 415: components["responses"]["preview_header_missing"];
21888 422: components["responses"]["validation_failed"];
21889 };
21890 };
21891 /** Use the `:commit_sha` to specify the commit that will have its comments listed. */
21892 "repos/list-comments-for-commit": {
21893 parameters: {
21894 path: {
21895 owner: components["parameters"]["owner"];
21896 repo: components["parameters"]["repo"];
21897 /** commit_sha parameter */
21898 commit_sha: components["parameters"]["commit_sha"];
21899 };
21900 query: {
21901 /** Results per page (max 100). */
21902 per_page?: components["parameters"]["per_page"];
21903 /** Page number of the results to fetch. */
21904 page?: components["parameters"]["page"];
21905 };
21906 };
21907 responses: {
21908 /** Response */
21909 200: {
21910 headers: {};
21911 content: {
21912 "application/json": components["schemas"]["commit-comment"][];
21913 };
21914 };
21915 };
21916 };
21917 /**
21918 * Create a comment for a commit using its `:commit_sha`.
21919 *
21920 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
21921 */
21922 "repos/create-commit-comment": {
21923 parameters: {
21924 path: {
21925 owner: components["parameters"]["owner"];
21926 repo: components["parameters"]["repo"];
21927 /** commit_sha parameter */
21928 commit_sha: components["parameters"]["commit_sha"];
21929 };
21930 };
21931 responses: {
21932 /** Response */
21933 201: {
21934 headers: {
21935 Location?: string;
21936 };
21937 content: {
21938 "application/json": components["schemas"]["commit-comment"];
21939 };
21940 };
21941 403: components["responses"]["forbidden"];
21942 422: components["responses"]["validation_failed"];
21943 };
21944 requestBody: {
21945 content: {
21946 "application/json": {
21947 /** The contents of the comment. */
21948 body: string;
21949 /** Relative path of the file to comment on. */
21950 path?: string;
21951 /** Line index in the diff to comment on. */
21952 position?: number;
21953 /** **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */
21954 line?: number;
21955 };
21956 };
21957 };
21958 };
21959 /** 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](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */
21960 "repos/list-pull-requests-associated-with-commit": {
21961 parameters: {
21962 path: {
21963 owner: components["parameters"]["owner"];
21964 repo: components["parameters"]["repo"];
21965 /** commit_sha parameter */
21966 commit_sha: components["parameters"]["commit_sha"];
21967 };
21968 query: {
21969 /** Results per page (max 100). */
21970 per_page?: components["parameters"]["per_page"];
21971 /** Page number of the results to fetch. */
21972 page?: components["parameters"]["page"];
21973 };
21974 };
21975 responses: {
21976 /** Response */
21977 200: {
21978 headers: {};
21979 content: {
21980 "application/json": components["schemas"]["pull-request-simple"][];
21981 };
21982 };
21983 415: components["responses"]["preview_header_missing"];
21984 };
21985 };
21986 /**
21987 * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.
21988 *
21989 * **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.
21990 *
21991 * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property.
21992 *
21993 * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) 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.
21994 *
21995 * **Signature verification object**
21996 *
21997 * 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:
21998 *
21999 * | Name | Type | Description |
22000 * | ---- | ---- | ----------- |
22001 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
22002 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
22003 * | `signature` | `string` | The signature that was extracted from the commit. |
22004 * | `payload` | `string` | The value that was signed. |
22005 *
22006 * These are the possible values for `reason` in the `verification` object:
22007 *
22008 * | Value | Description |
22009 * | ----- | ----------- |
22010 * | `expired_key` | The key that made the signature is expired. |
22011 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
22012 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
22013 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
22014 * | `unsigned` | The object does not include a signature. |
22015 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
22016 * | `no_user` | No user was associated with the `committer` email address in the commit. |
22017 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
22018 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
22019 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
22020 * | `malformed_signature` | There was an error parsing the signature. |
22021 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
22022 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
22023 */
22024 "repos/get-commit": {
22025 parameters: {
22026 path: {
22027 owner: components["parameters"]["owner"];
22028 repo: components["parameters"]["repo"];
22029 /** ref parameter */
22030 ref: string;
22031 };
22032 query: {
22033 /** Page number of the results to fetch. */
22034 page?: components["parameters"]["page"];
22035 /** Results per page (max 100). */
22036 per_page?: components["parameters"]["per_page"];
22037 };
22038 };
22039 responses: {
22040 /** Response */
22041 200: {
22042 content: {
22043 "application/json": components["schemas"]["commit"];
22044 };
22045 };
22046 404: components["responses"]["not_found"];
22047 422: components["responses"]["validation_failed"];
22048 500: components["responses"]["internal_error"];
22049 };
22050 };
22051 /**
22052 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
22053 *
22054 * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
22055 */
22056 "checks/list-for-ref": {
22057 parameters: {
22058 path: {
22059 owner: components["parameters"]["owner"];
22060 repo: components["parameters"]["repo"];
22061 /** ref parameter */
22062 ref: string;
22063 };
22064 query: {
22065 /** Returns check runs with the specified `name`. */
22066 check_name?: components["parameters"]["check_name"];
22067 /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */
22068 status?: components["parameters"]["status"];
22069 /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */
22070 filter?: "latest" | "all";
22071 /** Results per page (max 100). */
22072 per_page?: components["parameters"]["per_page"];
22073 /** Page number of the results to fetch. */
22074 page?: components["parameters"]["page"];
22075 app_id?: number;
22076 };
22077 };
22078 responses: {
22079 /** Response */
22080 200: {
22081 headers: {};
22082 content: {
22083 "application/json": {
22084 total_count: number;
22085 check_runs: components["schemas"]["check-run"][];
22086 };
22087 };
22088 };
22089 };
22090 };
22091 /**
22092 * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
22093 *
22094 * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
22095 */
22096 "checks/list-suites-for-ref": {
22097 parameters: {
22098 path: {
22099 owner: components["parameters"]["owner"];
22100 repo: components["parameters"]["repo"];
22101 /** ref parameter */
22102 ref: string;
22103 };
22104 query: {
22105 /** Filters check suites by GitHub App `id`. */
22106 app_id?: number;
22107 /** Returns check runs with the specified `name`. */
22108 check_name?: components["parameters"]["check_name"];
22109 /** Results per page (max 100). */
22110 per_page?: components["parameters"]["per_page"];
22111 /** Page number of the results to fetch. */
22112 page?: components["parameters"]["page"];
22113 };
22114 };
22115 responses: {
22116 /** Response */
22117 200: {
22118 headers: {};
22119 content: {
22120 "application/json": {
22121 total_count: number;
22122 check_suites: components["schemas"]["check-suite"][];
22123 };
22124 };
22125 };
22126 };
22127 };
22128 /**
22129 * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
22130 *
22131 * The most recent status for each context is returned, up to 100. This field [paginates](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination) if there are over 100 contexts.
22132 *
22133 * Additionally, a combined `state` is returned. The `state` is one of:
22134 *
22135 * * **failure** if any of the contexts report as `error` or `failure`
22136 * * **pending** if there are no statuses or a context is `pending`
22137 * * **success** if the latest status for all contexts is `success`
22138 */
22139 "repos/get-combined-status-for-ref": {
22140 parameters: {
22141 path: {
22142 owner: components["parameters"]["owner"];
22143 repo: components["parameters"]["repo"];
22144 /** ref parameter */
22145 ref: string;
22146 };
22147 query: {
22148 /** Results per page (max 100). */
22149 per_page?: components["parameters"]["per_page"];
22150 /** Page number of the results to fetch. */
22151 page?: components["parameters"]["page"];
22152 };
22153 };
22154 responses: {
22155 /** Response */
22156 200: {
22157 content: {
22158 "application/json": components["schemas"]["combined-commit-status"];
22159 };
22160 };
22161 404: components["responses"]["not_found"];
22162 };
22163 };
22164 /**
22165 * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
22166 *
22167 * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.
22168 */
22169 "repos/list-commit-statuses-for-ref": {
22170 parameters: {
22171 path: {
22172 owner: components["parameters"]["owner"];
22173 repo: components["parameters"]["repo"];
22174 /** ref parameter */
22175 ref: string;
22176 };
22177 query: {
22178 /** Results per page (max 100). */
22179 per_page?: components["parameters"]["per_page"];
22180 /** Page number of the results to fetch. */
22181 page?: components["parameters"]["page"];
22182 };
22183 };
22184 responses: {
22185 /** Response */
22186 200: {
22187 headers: {};
22188 content: {
22189 "application/json": components["schemas"]["status"][];
22190 };
22191 };
22192 301: components["responses"]["moved_permanently"];
22193 };
22194 };
22195 /**
22196 * Returns the contents of the repository's code of conduct file, if one is detected.
22197 *
22198 * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.
22199 */
22200 "codes-of-conduct/get-for-repo": {
22201 parameters: {
22202 path: {
22203 owner: components["parameters"]["owner"];
22204 repo: components["parameters"]["repo"];
22205 };
22206 };
22207 responses: {
22208 /** Response */
22209 200: {
22210 content: {
22211 "application/json": components["schemas"]["code-of-conduct"];
22212 };
22213 };
22214 };
22215 };
22216 /**
22217 * This endpoint will return all community profile metrics, including an
22218 * overall health score, repository description, the presence of documentation, detected
22219 * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
22220 * README, and CONTRIBUTING files.
22221 *
22222 * The `health_percentage` score is defined as a percentage of how many of
22223 * these four documents are present: README, CONTRIBUTING, LICENSE, and
22224 * CODE_OF_CONDUCT. For example, if all four documents are present, then
22225 * the `health_percentage` is `100`. If only one is present, then the
22226 * `health_percentage` is `25`.
22227 *
22228 * `content_reports_enabled` is only returned for organization-owned repositories.
22229 */
22230 "repos/get-community-profile-metrics": {
22231 parameters: {
22232 path: {
22233 owner: components["parameters"]["owner"];
22234 repo: components["parameters"]["repo"];
22235 };
22236 };
22237 responses: {
22238 /** Response */
22239 200: {
22240 content: {
22241 "application/json": components["schemas"]["community-profile"];
22242 };
22243 };
22244 };
22245 };
22246 /**
22247 * 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`.
22248 *
22249 * 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](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
22250 *
22251 * 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.
22252 *
22253 * **Working with large comparisons**
22254 *
22255 * 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](/rest/guides/traversing-with-pagination)."
22256 *
22257 * 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.
22258 *
22259 * **Signature verification object**
22260 *
22261 * 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:
22262 *
22263 * | Name | Type | Description |
22264 * | ---- | ---- | ----------- |
22265 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
22266 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
22267 * | `signature` | `string` | The signature that was extracted from the commit. |
22268 * | `payload` | `string` | The value that was signed. |
22269 *
22270 * These are the possible values for `reason` in the `verification` object:
22271 *
22272 * | Value | Description |
22273 * | ----- | ----------- |
22274 * | `expired_key` | The key that made the signature is expired. |
22275 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
22276 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
22277 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
22278 * | `unsigned` | The object does not include a signature. |
22279 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
22280 * | `no_user` | No user was associated with the `committer` email address in the commit. |
22281 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
22282 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
22283 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
22284 * | `malformed_signature` | There was an error parsing the signature. |
22285 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
22286 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
22287 */
22288 "repos/compare-commits-with-basehead": {
22289 parameters: {
22290 path: {
22291 owner: components["parameters"]["owner"];
22292 repo: components["parameters"]["repo"];
22293 /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */
22294 basehead: string;
22295 };
22296 query: {
22297 /** Page number of the results to fetch. */
22298 page?: components["parameters"]["page"];
22299 /** Results per page (max 100) */
22300 per_page?: components["parameters"]["per-page"];
22301 };
22302 };
22303 responses: {
22304 /** Response */
22305 200: {
22306 content: {
22307 "application/json": components["schemas"]["commit-comparison"];
22308 };
22309 };
22310 404: components["responses"]["not_found"];
22311 500: components["responses"]["internal_error"];
22312 };
22313 };
22314 /**
22315 * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.
22316 *
22317 * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments.
22318 *
22319 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
22320 */
22321 "apps/create-content-attachment-for-repo": {
22322 parameters: {
22323 path: {
22324 /** The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event. */
22325 owner: string;
22326 /** The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event. */
22327 repo: string;
22328 /** The `id` of the `content_reference` event. */
22329 content_reference_id: number;
22330 };
22331 };
22332 responses: {
22333 /** Response */
22334 200: {
22335 content: {
22336 "application/json": components["schemas"]["content-reference-attachment"];
22337 };
22338 };
22339 304: components["responses"]["not_modified"];
22340 403: components["responses"]["forbidden"];
22341 404: components["responses"]["not_found"];
22342 410: components["responses"]["gone"];
22343 415: components["responses"]["preview_header_missing"];
22344 422: components["responses"]["validation_failed"];
22345 };
22346 requestBody: {
22347 content: {
22348 "application/json": {
22349 /** The title of the attachment */
22350 title: string;
22351 /** The body of the attachment */
22352 body: string;
22353 };
22354 };
22355 };
22356 };
22357 /**
22358 * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit
22359 * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories.
22360 *
22361 * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for
22362 * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media
22363 * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent
22364 * object format.
22365 *
22366 * **Note**:
22367 * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).
22368 * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees
22369 * API](https://docs.github.com/rest/reference/git#get-a-tree).
22370 * * This API supports files up to 1 megabyte in size.
22371 *
22372 * #### If the content is a directory
22373 * The response will be an array of objects, one object for each item in the directory.
22374 * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value
22375 * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).
22376 * In the next major version of the API, the type will be returned as "submodule".
22377 *
22378 * #### If the content is a symlink
22379 * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the
22380 * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object
22381 * describing the symlink itself.
22382 *
22383 * #### If the content is a submodule
22384 * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific
22385 * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out
22386 * the submodule at that specific commit.
22387 *
22388 * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the
22389 * github.com URLs (`html_url` and `_links["html"]`) will have null values.
22390 */
22391 "repos/get-content": {
22392 parameters: {
22393 path: {
22394 owner: components["parameters"]["owner"];
22395 repo: components["parameters"]["repo"];
22396 /** path parameter */
22397 path: string;
22398 };
22399 query: {
22400 /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */
22401 ref?: string;
22402 };
22403 };
22404 responses: {
22405 /** Response */
22406 200: {
22407 content: {
22408 "application/vnd.github.v3.object": components["schemas"]["content-tree"];
22409 "application/json":
22410 | components["schemas"]["content-directory"]
22411 | components["schemas"]["content-file"]
22412 | components["schemas"]["content-symlink"]
22413 | components["schemas"]["content-submodule"];
22414 };
22415 };
22416 302: components["responses"]["found"];
22417 403: components["responses"]["forbidden"];
22418 404: components["responses"]["not_found"];
22419 };
22420 };
22421 /** Creates a new file or replaces an existing file in a repository. */
22422 "repos/create-or-update-file-contents": {
22423 parameters: {
22424 path: {
22425 owner: components["parameters"]["owner"];
22426 repo: components["parameters"]["repo"];
22427 /** path parameter */
22428 path: string;
22429 };
22430 };
22431 responses: {
22432 /** Response */
22433 200: {
22434 content: {
22435 "application/json": components["schemas"]["file-commit"];
22436 };
22437 };
22438 /** Response */
22439 201: {
22440 content: {
22441 "application/json": components["schemas"]["file-commit"];
22442 };
22443 };
22444 404: components["responses"]["not_found"];
22445 409: components["responses"]["conflict"];
22446 422: components["responses"]["validation_failed"];
22447 };
22448 requestBody: {
22449 content: {
22450 "application/json": {
22451 /** The commit message. */
22452 message: string;
22453 /** The new file content, using Base64 encoding. */
22454 content: string;
22455 /** **Required if you are updating a file**. The blob SHA of the file being replaced. */
22456 sha?: string;
22457 /** The branch name. Default: the repository’s default branch (usually `master`) */
22458 branch?: string;
22459 /** The person that committed the file. Default: the authenticated user. */
22460 committer?: {
22461 /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */
22462 name: string;
22463 /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */
22464 email: string;
22465 date?: string;
22466 };
22467 /** The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */
22468 author?: {
22469 /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */
22470 name: string;
22471 /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */
22472 email: string;
22473 date?: string;
22474 };
22475 };
22476 };
22477 };
22478 };
22479 /**
22480 * Deletes a file in a repository.
22481 *
22482 * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.
22483 *
22484 * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.
22485 *
22486 * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.
22487 */
22488 "repos/delete-file": {
22489 parameters: {
22490 path: {
22491 owner: components["parameters"]["owner"];
22492 repo: components["parameters"]["repo"];
22493 /** path parameter */
22494 path: string;
22495 };
22496 };
22497 responses: {
22498 /** Response */
22499 200: {
22500 content: {
22501 "application/json": components["schemas"]["file-commit"];
22502 };
22503 };
22504 404: components["responses"]["not_found"];
22505 409: components["responses"]["conflict"];
22506 422: components["responses"]["validation_failed"];
22507 503: components["responses"]["service_unavailable"];
22508 };
22509 requestBody: {
22510 content: {
22511 "application/json": {
22512 /** The commit message. */
22513 message: string;
22514 /** The blob SHA of the file being replaced. */
22515 sha: string;
22516 /** The branch name. Default: the repository’s default branch (usually `master`) */
22517 branch?: string;
22518 /** object containing information about the committer. */
22519 committer?: {
22520 /** The name of the author (or committer) of the commit */
22521 name?: string;
22522 /** The email of the author (or committer) of the commit */
22523 email?: string;
22524 };
22525 /** object containing information about the author. */
22526 author?: {
22527 /** The name of the author (or committer) of the commit */
22528 name?: string;
22529 /** The email of the author (or committer) of the commit */
22530 email?: string;
22531 };
22532 };
22533 };
22534 };
22535 };
22536 /**
22537 * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
22538 *
22539 * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
22540 */
22541 "repos/list-contributors": {
22542 parameters: {
22543 path: {
22544 owner: components["parameters"]["owner"];
22545 repo: components["parameters"]["repo"];
22546 };
22547 query: {
22548 /** Set to `1` or `true` to include anonymous contributors in results. */
22549 anon?: string;
22550 /** Results per page (max 100). */
22551 per_page?: components["parameters"]["per_page"];
22552 /** Page number of the results to fetch. */
22553 page?: components["parameters"]["page"];
22554 };
22555 };
22556 responses: {
22557 /** if repository contains content */
22558 200: {
22559 headers: {};
22560 content: {
22561 "application/json": components["schemas"]["contributor"][];
22562 };
22563 };
22564 /** Response if repository is empty */
22565 204: never;
22566 403: components["responses"]["forbidden"];
22567 404: components["responses"]["not_found"];
22568 };
22569 };
22570 /** Simple filtering of deployments is available via query parameters: */
22571 "repos/list-deployments": {
22572 parameters: {
22573 path: {
22574 owner: components["parameters"]["owner"];
22575 repo: components["parameters"]["repo"];
22576 };
22577 query: {
22578 /** The SHA recorded at creation time. */
22579 sha?: string;
22580 /** The name of the ref. This can be a branch, tag, or SHA. */
22581 ref?: string;
22582 /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */
22583 task?: string;
22584 /** The name of the environment that was deployed to (e.g., `staging` or `production`). */
22585 environment?: string | null;
22586 /** Results per page (max 100). */
22587 per_page?: components["parameters"]["per_page"];
22588 /** Page number of the results to fetch. */
22589 page?: components["parameters"]["page"];
22590 };
22591 };
22592 responses: {
22593 /** Response */
22594 200: {
22595 headers: {};
22596 content: {
22597 "application/json": components["schemas"]["deployment"][];
22598 };
22599 };
22600 };
22601 };
22602 /**
22603 * Deployments offer a few configurable parameters with certain defaults.
22604 *
22605 * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
22606 * before we merge a pull request.
22607 *
22608 * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
22609 * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
22610 * makes it easier to track which environments have requested deployments. The default environment is `production`.
22611 *
22612 * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
22613 * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
22614 * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
22615 * return a failure response.
22616 *
22617 * By default, [commit statuses](https://docs.github.com/rest/reference/repos#statuses) for every submitted context must be in a `success`
22618 * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
22619 * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
22620 * not require any contexts or create any commit statuses, the deployment will always succeed.
22621 *
22622 * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
22623 * field that will be passed on when a deployment event is dispatched.
22624 *
22625 * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
22626 * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
22627 * application with debugging enabled.
22628 *
22629 * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref.
22630 *
22631 * #### Merged branch response
22632 * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
22633 * a deployment. This auto-merge happens when:
22634 * * Auto-merge option is enabled in the repository
22635 * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example
22636 * * There are no merge conflicts
22637 *
22638 * If there are no new commits in the base branch, a new request to create a deployment should give a successful
22639 * response.
22640 *
22641 * #### Merge conflict response
22642 * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
22643 * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.
22644 *
22645 * #### Failed commit status checks
22646 * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
22647 * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.
22648 */
22649 "repos/create-deployment": {
22650 parameters: {
22651 path: {
22652 owner: components["parameters"]["owner"];
22653 repo: components["parameters"]["repo"];
22654 };
22655 };
22656 responses: {
22657 /** Response */
22658 201: {
22659 content: {
22660 "application/json": components["schemas"]["deployment"];
22661 };
22662 };
22663 /** Merged branch response */
22664 202: {
22665 content: {
22666 "application/json": {
22667 message?: string;
22668 };
22669 };
22670 };
22671 /** Conflict when there is a merge conflict or the commit's status checks failed */
22672 409: unknown;
22673 422: components["responses"]["validation_failed"];
22674 };
22675 requestBody: {
22676 content: {
22677 "application/json": {
22678 /** The ref to deploy. This can be a branch, tag, or SHA. */
22679 ref: string;
22680 /** Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). */
22681 task?: string;
22682 /** Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. */
22683 auto_merge?: boolean;
22684 /** The [status](https://docs.github.com/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */
22685 required_contexts?: string[];
22686 payload?: { [key: string]: any } | string;
22687 /** Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */
22688 environment?: string;
22689 /** Short description of the deployment. */
22690 description?: string | null;
22691 /**
22692 * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`
22693 * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
22694 */
22695 transient_environment?: boolean;
22696 /**
22697 * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.
22698 * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
22699 */
22700 production_environment?: boolean;
22701 };
22702 };
22703 };
22704 };
22705 "repos/get-deployment": {
22706 parameters: {
22707 path: {
22708 owner: components["parameters"]["owner"];
22709 repo: components["parameters"]["repo"];
22710 /** deployment_id parameter */
22711 deployment_id: components["parameters"]["deployment_id"];
22712 };
22713 };
22714 responses: {
22715 /** Response */
22716 200: {
22717 content: {
22718 "application/json": components["schemas"]["deployment"];
22719 };
22720 };
22721 404: components["responses"]["not_found"];
22722 };
22723 };
22724 /**
22725 * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment.
22726 *
22727 * To set a deployment as inactive, you must:
22728 *
22729 * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
22730 * * Mark the active deployment as inactive by adding any non-successful deployment status.
22731 *
22732 * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)."
22733 */
22734 "repos/delete-deployment": {
22735 parameters: {
22736 path: {
22737 owner: components["parameters"]["owner"];
22738 repo: components["parameters"]["repo"];
22739 /** deployment_id parameter */
22740 deployment_id: components["parameters"]["deployment_id"];
22741 };
22742 };
22743 responses: {
22744 /** Response */
22745 204: never;
22746 404: components["responses"]["not_found"];
22747 422: components["responses"]["validation_failed_simple"];
22748 };
22749 };
22750 /** Users with pull access can view deployment statuses for a deployment: */
22751 "repos/list-deployment-statuses": {
22752 parameters: {
22753 path: {
22754 owner: components["parameters"]["owner"];
22755 repo: components["parameters"]["repo"];
22756 /** deployment_id parameter */
22757 deployment_id: components["parameters"]["deployment_id"];
22758 };
22759 query: {
22760 /** Results per page (max 100). */
22761 per_page?: components["parameters"]["per_page"];
22762 /** Page number of the results to fetch. */
22763 page?: components["parameters"]["page"];
22764 };
22765 };
22766 responses: {
22767 /** Response */
22768 200: {
22769 headers: {};
22770 content: {
22771 "application/json": components["schemas"]["deployment-status"][];
22772 };
22773 };
22774 404: components["responses"]["not_found"];
22775 };
22776 };
22777 /**
22778 * Users with `push` access can create deployment statuses for a given deployment.
22779 *
22780 * 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.
22781 */
22782 "repos/create-deployment-status": {
22783 parameters: {
22784 path: {
22785 owner: components["parameters"]["owner"];
22786 repo: components["parameters"]["repo"];
22787 /** deployment_id parameter */
22788 deployment_id: components["parameters"]["deployment_id"];
22789 };
22790 };
22791 responses: {
22792 /** Response */
22793 201: {
22794 headers: {
22795 Location?: string;
22796 };
22797 content: {
22798 "application/json": components["schemas"]["deployment-status"];
22799 };
22800 };
22801 422: components["responses"]["validation_failed"];
22802 };
22803 requestBody: {
22804 content: {
22805 "application/json": {
22806 /** The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. */
22807 state:
22808 | "error"
22809 | "failure"
22810 | "inactive"
22811 | "in_progress"
22812 | "queued"
22813 | "pending"
22814 | "success";
22815 /** The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. */
22816 target_url?: string;
22817 /**
22818 * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""`
22819 * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
22820 */
22821 log_url?: string;
22822 /** A short description of the status. The maximum description length is 140 characters. */
22823 description?: string;
22824 /** Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. */
22825 environment?: "production" | "staging" | "qa";
22826 /**
22827 * Sets the URL for accessing your environment. Default: `""`
22828 * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
22829 */
22830 environment_url?: string;
22831 /**
22832 * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`
22833 * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type.
22834 * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
22835 */
22836 auto_inactive?: boolean;
22837 };
22838 };
22839 };
22840 };
22841 /** Users with pull access can view a deployment status for a deployment: */
22842 "repos/get-deployment-status": {
22843 parameters: {
22844 path: {
22845 owner: components["parameters"]["owner"];
22846 repo: components["parameters"]["repo"];
22847 /** deployment_id parameter */
22848 deployment_id: components["parameters"]["deployment_id"];
22849 status_id: number;
22850 };
22851 };
22852 responses: {
22853 /** Response */
22854 200: {
22855 content: {
22856 "application/json": components["schemas"]["deployment-status"];
22857 };
22858 };
22859 404: components["responses"]["not_found"];
22860 415: components["responses"]["preview_header_missing"];
22861 };
22862 };
22863 /**
22864 * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)."
22865 *
22866 * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.
22867 *
22868 * This endpoint requires write access to the repository by providing either:
22869 *
22870 * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation.
22871 * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions.
22872 *
22873 * This input example shows how you can use the `client_payload` as a test to debug your workflow.
22874 */
22875 "repos/create-dispatch-event": {
22876 parameters: {
22877 path: {
22878 owner: components["parameters"]["owner"];
22879 repo: components["parameters"]["repo"];
22880 };
22881 };
22882 responses: {
22883 /** Response */
22884 204: never;
22885 422: components["responses"]["validation_failed"];
22886 };
22887 requestBody: {
22888 content: {
22889 "application/json": {
22890 /** A custom webhook event name. */
22891 event_type: string;
22892 /** JSON payload with extra information about the webhook event that your action or worklow may use. */
22893 client_payload?: { [key: string]: any };
22894 };
22895 };
22896 };
22897 };
22898 /**
22899 * Get all environments for a repository.
22900 *
22901 * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
22902 */
22903 "repos/get-all-environments": {
22904 parameters: {
22905 path: {
22906 owner: components["parameters"]["owner"];
22907 repo: components["parameters"]["repo"];
22908 };
22909 };
22910 responses: {
22911 /** Response */
22912 200: {
22913 content: {
22914 "application/json": {
22915 /** The number of environments in this repository */
22916 total_count?: number;
22917 environments?: components["schemas"]["environment"][];
22918 };
22919 };
22920 };
22921 };
22922 };
22923 /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
22924 "repos/get-environment": {
22925 parameters: {
22926 path: {
22927 owner: components["parameters"]["owner"];
22928 repo: components["parameters"]["repo"];
22929 /** The name of the environment */
22930 environment_name: components["parameters"]["environment_name"];
22931 };
22932 };
22933 responses: {
22934 /** Response */
22935 200: {
22936 content: {
22937 "application/json": components["schemas"]["environment"];
22938 };
22939 };
22940 };
22941 };
22942 /**
22943 * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
22944 *
22945 * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
22946 *
22947 * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
22948 *
22949 * You must authenticate using an access token with the repo scope to use this endpoint.
22950 */
22951 "repos/create-or-update-environment": {
22952 parameters: {
22953 path: {
22954 owner: components["parameters"]["owner"];
22955 repo: components["parameters"]["repo"];
22956 /** The name of the environment */
22957 environment_name: components["parameters"]["environment_name"];
22958 };
22959 };
22960 responses: {
22961 /** Response */
22962 200: {
22963 content: {
22964 "application/json": components["schemas"]["environment"];
22965 };
22966 };
22967 /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */
22968 422: {
22969 content: {
22970 "application/json": components["schemas"]["basic-error"];
22971 };
22972 };
22973 };
22974 requestBody: {
22975 content: {
22976 "application/json": {
22977 wait_timer?: components["schemas"]["wait-timer"];
22978 /** The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */
22979 reviewers?:
22980 | {
22981 type?: components["schemas"]["deployment-reviewer-type"];
22982 /** The id of the user or team who can review the deployment */
22983 id?: number;
22984 }[]
22985 | null;
22986 deployment_branch_policy?: components["schemas"]["deployment_branch_policy"];
22987 } | null;
22988 };
22989 };
22990 };
22991 /** You must authenticate using an access token with the repo scope to use this endpoint. */
22992 "repos/delete-an-environment": {
22993 parameters: {
22994 path: {
22995 owner: components["parameters"]["owner"];
22996 repo: components["parameters"]["repo"];
22997 /** The name of the environment */
22998 environment_name: components["parameters"]["environment_name"];
22999 };
23000 };
23001 responses: {
23002 /** Default response */
23003 204: never;
23004 };
23005 };
23006 "activity/list-repo-events": {
23007 parameters: {
23008 path: {
23009 owner: components["parameters"]["owner"];
23010 repo: components["parameters"]["repo"];
23011 };
23012 query: {
23013 /** Results per page (max 100). */
23014 per_page?: components["parameters"]["per_page"];
23015 /** Page number of the results to fetch. */
23016 page?: components["parameters"]["page"];
23017 };
23018 };
23019 responses: {
23020 /** Response */
23021 200: {
23022 content: {
23023 "application/json": components["schemas"]["event"][];
23024 };
23025 };
23026 };
23027 };
23028 "repos/list-forks": {
23029 parameters: {
23030 path: {
23031 owner: components["parameters"]["owner"];
23032 repo: components["parameters"]["repo"];
23033 };
23034 query: {
23035 /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */
23036 sort?: "newest" | "oldest" | "stargazers" | "watchers";
23037 /** Results per page (max 100). */
23038 per_page?: components["parameters"]["per_page"];
23039 /** Page number of the results to fetch. */
23040 page?: components["parameters"]["page"];
23041 };
23042 };
23043 responses: {
23044 /** Response */
23045 200: {
23046 headers: {};
23047 content: {
23048 "application/json": components["schemas"]["minimal-repository"][];
23049 };
23050 };
23051 400: components["responses"]["bad_request"];
23052 };
23053 };
23054 /**
23055 * Create a fork for the authenticated user.
23056 *
23057 * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com).
23058 */
23059 "repos/create-fork": {
23060 parameters: {
23061 path: {
23062 owner: components["parameters"]["owner"];
23063 repo: components["parameters"]["repo"];
23064 };
23065 };
23066 responses: {
23067 /** Response */
23068 202: {
23069 content: {
23070 "application/json": components["schemas"]["full-repository"];
23071 };
23072 };
23073 400: components["responses"]["bad_request"];
23074 403: components["responses"]["forbidden"];
23075 404: components["responses"]["not_found"];
23076 422: components["responses"]["validation_failed"];
23077 };
23078 requestBody: {
23079 content: {
23080 "application/json": {
23081 /** Optional parameter to specify the organization name if forking into an organization. */
23082 organization?: string;
23083 } | null;
23084 };
23085 };
23086 };
23087 "git/create-blob": {
23088 parameters: {
23089 path: {
23090 owner: components["parameters"]["owner"];
23091 repo: components["parameters"]["repo"];
23092 };
23093 };
23094 responses: {
23095 /** Response */
23096 201: {
23097 headers: {
23098 Location?: string;
23099 };
23100 content: {
23101 "application/json": components["schemas"]["short-blob"];
23102 };
23103 };
23104 403: components["responses"]["forbidden"];
23105 404: components["responses"]["not_found"];
23106 409: components["responses"]["conflict"];
23107 422: components["responses"]["validation_failed"];
23108 };
23109 requestBody: {
23110 content: {
23111 "application/json": {
23112 /** The new blob's content. */
23113 content: string;
23114 /** The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. */
23115 encoding?: string;
23116 };
23117 };
23118 };
23119 };
23120 /**
23121 * The `content` in the response will always be Base64 encoded.
23122 *
23123 * _Note_: This API supports blobs up to 100 megabytes in size.
23124 */
23125 "git/get-blob": {
23126 parameters: {
23127 path: {
23128 owner: components["parameters"]["owner"];
23129 repo: components["parameters"]["repo"];
23130 file_sha: string;
23131 };
23132 };
23133 responses: {
23134 /** Response */
23135 200: {
23136 content: {
23137 "application/json": components["schemas"]["blob"];
23138 };
23139 };
23140 403: components["responses"]["forbidden"];
23141 404: components["responses"]["not_found"];
23142 422: components["responses"]["validation_failed"];
23143 };
23144 };
23145 /**
23146 * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
23147 *
23148 * **Signature verification object**
23149 *
23150 * 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:
23151 *
23152 * | Name | Type | Description |
23153 * | ---- | ---- | ----------- |
23154 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
23155 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
23156 * | `signature` | `string` | The signature that was extracted from the commit. |
23157 * | `payload` | `string` | The value that was signed. |
23158 *
23159 * These are the possible values for `reason` in the `verification` object:
23160 *
23161 * | Value | Description |
23162 * | ----- | ----------- |
23163 * | `expired_key` | The key that made the signature is expired. |
23164 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
23165 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
23166 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
23167 * | `unsigned` | The object does not include a signature. |
23168 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
23169 * | `no_user` | No user was associated with the `committer` email address in the commit. |
23170 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
23171 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
23172 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
23173 * | `malformed_signature` | There was an error parsing the signature. |
23174 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
23175 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
23176 */
23177 "git/create-commit": {
23178 parameters: {
23179 path: {
23180 owner: components["parameters"]["owner"];
23181 repo: components["parameters"]["repo"];
23182 };
23183 };
23184 responses: {
23185 /** Response */
23186 201: {
23187 headers: {
23188 Location?: string;
23189 };
23190 content: {
23191 "application/json": components["schemas"]["git-commit"];
23192 };
23193 };
23194 404: components["responses"]["not_found"];
23195 422: components["responses"]["validation_failed"];
23196 };
23197 requestBody: {
23198 content: {
23199 "application/json": {
23200 /** The commit message */
23201 message: string;
23202 /** The SHA of the tree object this commit points to */
23203 tree: string;
23204 /** The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */
23205 parents?: string[];
23206 /** Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */
23207 author?: {
23208 /** The name of the author (or committer) of the commit */
23209 name: string;
23210 /** The email of the author (or committer) of the commit */
23211 email: string;
23212 /** Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
23213 date?: string;
23214 };
23215 /** Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */
23216 committer?: {
23217 /** The name of the author (or committer) of the commit */
23218 name?: string;
23219 /** The email of the author (or committer) of the commit */
23220 email?: string;
23221 /** Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
23222 date?: string;
23223 };
23224 /** The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */
23225 signature?: string;
23226 };
23227 };
23228 };
23229 };
23230 /**
23231 * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
23232 *
23233 * **Signature verification object**
23234 *
23235 * 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:
23236 *
23237 * | Name | Type | Description |
23238 * | ---- | ---- | ----------- |
23239 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
23240 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
23241 * | `signature` | `string` | The signature that was extracted from the commit. |
23242 * | `payload` | `string` | The value that was signed. |
23243 *
23244 * These are the possible values for `reason` in the `verification` object:
23245 *
23246 * | Value | Description |
23247 * | ----- | ----------- |
23248 * | `expired_key` | The key that made the signature is expired. |
23249 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
23250 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
23251 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
23252 * | `unsigned` | The object does not include a signature. |
23253 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
23254 * | `no_user` | No user was associated with the `committer` email address in the commit. |
23255 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
23256 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
23257 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
23258 * | `malformed_signature` | There was an error parsing the signature. |
23259 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
23260 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
23261 */
23262 "git/get-commit": {
23263 parameters: {
23264 path: {
23265 owner: components["parameters"]["owner"];
23266 repo: components["parameters"]["repo"];
23267 /** commit_sha parameter */
23268 commit_sha: components["parameters"]["commit_sha"];
23269 };
23270 };
23271 responses: {
23272 /** Response */
23273 200: {
23274 content: {
23275 "application/json": components["schemas"]["git-commit"];
23276 };
23277 };
23278 404: components["responses"]["not_found"];
23279 };
23280 };
23281 /**
23282 * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.
23283 *
23284 * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.
23285 *
23286 * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
23287 *
23288 * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.
23289 */
23290 "git/list-matching-refs": {
23291 parameters: {
23292 path: {
23293 owner: components["parameters"]["owner"];
23294 repo: components["parameters"]["repo"];
23295 /** ref parameter */
23296 ref: string;
23297 };
23298 query: {
23299 /** Results per page (max 100). */
23300 per_page?: components["parameters"]["per_page"];
23301 /** Page number of the results to fetch. */
23302 page?: components["parameters"]["page"];
23303 };
23304 };
23305 responses: {
23306 /** Response */
23307 200: {
23308 headers: {};
23309 content: {
23310 "application/json": components["schemas"]["git-ref"][];
23311 };
23312 };
23313 };
23314 };
23315 /**
23316 * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.
23317 *
23318 * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
23319 */
23320 "git/get-ref": {
23321 parameters: {
23322 path: {
23323 owner: components["parameters"]["owner"];
23324 repo: components["parameters"]["repo"];
23325 /** ref parameter */
23326 ref: string;
23327 };
23328 };
23329 responses: {
23330 /** Response */
23331 200: {
23332 content: {
23333 "application/json": components["schemas"]["git-ref"];
23334 };
23335 };
23336 404: components["responses"]["not_found"];
23337 };
23338 };
23339 /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */
23340 "git/create-ref": {
23341 parameters: {
23342 path: {
23343 owner: components["parameters"]["owner"];
23344 repo: components["parameters"]["repo"];
23345 };
23346 };
23347 responses: {
23348 /** Response */
23349 201: {
23350 headers: {
23351 Location?: string;
23352 };
23353 content: {
23354 "application/json": components["schemas"]["git-ref"];
23355 };
23356 };
23357 422: components["responses"]["validation_failed"];
23358 };
23359 requestBody: {
23360 content: {
23361 "application/json": {
23362 /** The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */
23363 ref: string;
23364 /** The SHA1 value for this reference. */
23365 sha: string;
23366 key?: string;
23367 };
23368 };
23369 };
23370 };
23371 "git/delete-ref": {
23372 parameters: {
23373 path: {
23374 owner: components["parameters"]["owner"];
23375 repo: components["parameters"]["repo"];
23376 /** ref parameter */
23377 ref: string;
23378 };
23379 };
23380 responses: {
23381 /** Response */
23382 204: never;
23383 422: components["responses"]["validation_failed"];
23384 };
23385 };
23386 "git/update-ref": {
23387 parameters: {
23388 path: {
23389 owner: components["parameters"]["owner"];
23390 repo: components["parameters"]["repo"];
23391 /** ref parameter */
23392 ref: string;
23393 };
23394 };
23395 responses: {
23396 /** Response */
23397 200: {
23398 content: {
23399 "application/json": components["schemas"]["git-ref"];
23400 };
23401 };
23402 422: components["responses"]["validation_failed"];
23403 };
23404 requestBody: {
23405 content: {
23406 "application/json": {
23407 /** The SHA1 value to set this reference to */
23408 sha: string;
23409 /** Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. */
23410 force?: boolean;
23411 };
23412 };
23413 };
23414 };
23415 /**
23416 * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary.
23417 *
23418 * **Signature verification object**
23419 *
23420 * 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:
23421 *
23422 * | Name | Type | Description |
23423 * | ---- | ---- | ----------- |
23424 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
23425 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
23426 * | `signature` | `string` | The signature that was extracted from the commit. |
23427 * | `payload` | `string` | The value that was signed. |
23428 *
23429 * These are the possible values for `reason` in the `verification` object:
23430 *
23431 * | Value | Description |
23432 * | ----- | ----------- |
23433 * | `expired_key` | The key that made the signature is expired. |
23434 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
23435 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
23436 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
23437 * | `unsigned` | The object does not include a signature. |
23438 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
23439 * | `no_user` | No user was associated with the `committer` email address in the commit. |
23440 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
23441 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
23442 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
23443 * | `malformed_signature` | There was an error parsing the signature. |
23444 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
23445 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
23446 */
23447 "git/create-tag": {
23448 parameters: {
23449 path: {
23450 owner: components["parameters"]["owner"];
23451 repo: components["parameters"]["repo"];
23452 };
23453 };
23454 responses: {
23455 /** Response */
23456 201: {
23457 headers: {
23458 Location?: string;
23459 };
23460 content: {
23461 "application/json": components["schemas"]["git-tag"];
23462 };
23463 };
23464 422: components["responses"]["validation_failed"];
23465 };
23466 requestBody: {
23467 content: {
23468 "application/json": {
23469 /** The tag's name. This is typically a version (e.g., "v0.0.1"). */
23470 tag: string;
23471 /** The tag message. */
23472 message: string;
23473 /** The SHA of the git object this is tagging. */
23474 object: string;
23475 /** The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. */
23476 type: "commit" | "tree" | "blob";
23477 /** An object with information about the individual creating the tag. */
23478 tagger?: {
23479 /** The name of the author of the tag */
23480 name: string;
23481 /** The email of the author of the tag */
23482 email: string;
23483 /** When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
23484 date?: string;
23485 };
23486 };
23487 };
23488 };
23489 };
23490 /**
23491 * **Signature verification object**
23492 *
23493 * 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:
23494 *
23495 * | Name | Type | Description |
23496 * | ---- | ---- | ----------- |
23497 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
23498 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
23499 * | `signature` | `string` | The signature that was extracted from the commit. |
23500 * | `payload` | `string` | The value that was signed. |
23501 *
23502 * These are the possible values for `reason` in the `verification` object:
23503 *
23504 * | Value | Description |
23505 * | ----- | ----------- |
23506 * | `expired_key` | The key that made the signature is expired. |
23507 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
23508 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
23509 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
23510 * | `unsigned` | The object does not include a signature. |
23511 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
23512 * | `no_user` | No user was associated with the `committer` email address in the commit. |
23513 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
23514 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
23515 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
23516 * | `malformed_signature` | There was an error parsing the signature. |
23517 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
23518 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
23519 */
23520 "git/get-tag": {
23521 parameters: {
23522 path: {
23523 owner: components["parameters"]["owner"];
23524 repo: components["parameters"]["repo"];
23525 tag_sha: string;
23526 };
23527 };
23528 responses: {
23529 /** Response */
23530 200: {
23531 content: {
23532 "application/json": components["schemas"]["git-tag"];
23533 };
23534 };
23535 404: components["responses"]["not_found"];
23536 };
23537 };
23538 /**
23539 * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
23540 *
23541 * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)."
23542 */
23543 "git/create-tree": {
23544 parameters: {
23545 path: {
23546 owner: components["parameters"]["owner"];
23547 repo: components["parameters"]["repo"];
23548 };
23549 };
23550 responses: {
23551 /** Response */
23552 201: {
23553 headers: {
23554 Location?: string;
23555 };
23556 content: {
23557 "application/json": components["schemas"]["git-tree"];
23558 };
23559 };
23560 403: components["responses"]["forbidden"];
23561 404: components["responses"]["not_found"];
23562 422: components["responses"]["validation_failed"];
23563 };
23564 requestBody: {
23565 content: {
23566 "application/json": {
23567 /** Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */
23568 tree: {
23569 /** The file referenced in the tree. */
23570 path?: string;
23571 /** The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. */
23572 mode?: "100644" | "100755" | "040000" | "160000" | "120000";
23573 /** Either `blob`, `tree`, or `commit`. */
23574 type?: "blob" | "tree" | "commit";
23575 /**
23576 * The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted.
23577 *
23578 * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.
23579 */
23580 sha?: string | null;
23581 /**
23582 * The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.
23583 *
23584 * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.
23585 */
23586 content?: string;
23587 }[];
23588 /**
23589 * The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.
23590 * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit.
23591 */
23592 base_tree?: string;
23593 };
23594 };
23595 };
23596 };
23597 /**
23598 * Returns a single tree using the SHA1 value for that tree.
23599 *
23600 * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
23601 */
23602 "git/get-tree": {
23603 parameters: {
23604 path: {
23605 owner: components["parameters"]["owner"];
23606 repo: components["parameters"]["repo"];
23607 tree_sha: string;
23608 };
23609 query: {
23610 /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */
23611 recursive?: string;
23612 };
23613 };
23614 responses: {
23615 /** Response */
23616 200: {
23617 content: {
23618 "application/json": components["schemas"]["git-tree"];
23619 };
23620 };
23621 404: components["responses"]["not_found"];
23622 422: components["responses"]["validation_failed"];
23623 };
23624 };
23625 "repos/list-webhooks": {
23626 parameters: {
23627 path: {
23628 owner: components["parameters"]["owner"];
23629 repo: components["parameters"]["repo"];
23630 };
23631 query: {
23632 /** Results per page (max 100). */
23633 per_page?: components["parameters"]["per_page"];
23634 /** Page number of the results to fetch. */
23635 page?: components["parameters"]["page"];
23636 };
23637 };
23638 responses: {
23639 /** Response */
23640 200: {
23641 headers: {};
23642 content: {
23643 "application/json": components["schemas"]["hook"][];
23644 };
23645 };
23646 404: components["responses"]["not_found"];
23647 };
23648 };
23649 /**
23650 * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can
23651 * share the same `config` as long as those webhooks do not have any `events` that overlap.
23652 */
23653 "repos/create-webhook": {
23654 parameters: {
23655 path: {
23656 owner: components["parameters"]["owner"];
23657 repo: components["parameters"]["repo"];
23658 };
23659 };
23660 responses: {
23661 /** Response */
23662 201: {
23663 headers: {
23664 Location?: string;
23665 };
23666 content: {
23667 "application/json": components["schemas"]["hook"];
23668 };
23669 };
23670 403: components["responses"]["forbidden"];
23671 404: components["responses"]["not_found"];
23672 422: components["responses"]["validation_failed"];
23673 };
23674 requestBody: {
23675 content: {
23676 "application/json": {
23677 /** Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */
23678 name?: string;
23679 /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */
23680 config?: {
23681 url?: components["schemas"]["webhook-config-url"];
23682 content_type?: components["schemas"]["webhook-config-content-type"];
23683 secret?: components["schemas"]["webhook-config-secret"];
23684 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
23685 token?: string;
23686 digest?: string;
23687 };
23688 /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */
23689 events?: string[];
23690 /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */
23691 active?: boolean;
23692 } | null;
23693 };
23694 };
23695 };
23696 /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */
23697 "repos/get-webhook": {
23698 parameters: {
23699 path: {
23700 owner: components["parameters"]["owner"];
23701 repo: components["parameters"]["repo"];
23702 hook_id: components["parameters"]["hook-id"];
23703 };
23704 };
23705 responses: {
23706 /** Response */
23707 200: {
23708 content: {
23709 "application/json": components["schemas"]["hook"];
23710 };
23711 };
23712 404: components["responses"]["not_found"];
23713 };
23714 };
23715 "repos/delete-webhook": {
23716 parameters: {
23717 path: {
23718 owner: components["parameters"]["owner"];
23719 repo: components["parameters"]["repo"];
23720 hook_id: components["parameters"]["hook-id"];
23721 };
23722 };
23723 responses: {
23724 /** Response */
23725 204: never;
23726 404: components["responses"]["not_found"];
23727 };
23728 };
23729 /** 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](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */
23730 "repos/update-webhook": {
23731 parameters: {
23732 path: {
23733 owner: components["parameters"]["owner"];
23734 repo: components["parameters"]["repo"];
23735 hook_id: components["parameters"]["hook-id"];
23736 };
23737 };
23738 responses: {
23739 /** Response */
23740 200: {
23741 content: {
23742 "application/json": components["schemas"]["hook"];
23743 };
23744 };
23745 404: components["responses"]["not_found"];
23746 422: components["responses"]["validation_failed"];
23747 };
23748 requestBody: {
23749 content: {
23750 "application/json": {
23751 /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */
23752 config?: {
23753 url: components["schemas"]["webhook-config-url"];
23754 content_type?: components["schemas"]["webhook-config-content-type"];
23755 secret?: components["schemas"]["webhook-config-secret"];
23756 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
23757 address?: string;
23758 room?: string;
23759 };
23760 /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. */
23761 events?: string[];
23762 /** Determines a list of events to be added to the list of events that the Hook triggers for. */
23763 add_events?: string[];
23764 /** Determines a list of events to be removed from the list of events that the Hook triggers for. */
23765 remove_events?: string[];
23766 /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */
23767 active?: boolean;
23768 };
23769 };
23770 };
23771 };
23772 /**
23773 * 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](/rest/reference/orgs#get-a-repository-webhook)."
23774 *
23775 * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission.
23776 */
23777 "repos/get-webhook-config-for-repo": {
23778 parameters: {
23779 path: {
23780 owner: components["parameters"]["owner"];
23781 repo: components["parameters"]["repo"];
23782 hook_id: components["parameters"]["hook-id"];
23783 };
23784 };
23785 responses: {
23786 /** Response */
23787 200: {
23788 content: {
23789 "application/json": components["schemas"]["webhook-config"];
23790 };
23791 };
23792 };
23793 };
23794 /**
23795 * 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](/rest/reference/orgs#update-a-repository-webhook)."
23796 *
23797 * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.
23798 */
23799 "repos/update-webhook-config-for-repo": {
23800 parameters: {
23801 path: {
23802 owner: components["parameters"]["owner"];
23803 repo: components["parameters"]["repo"];
23804 hook_id: components["parameters"]["hook-id"];
23805 };
23806 };
23807 responses: {
23808 /** Response */
23809 200: {
23810 content: {
23811 "application/json": components["schemas"]["webhook-config"];
23812 };
23813 };
23814 };
23815 requestBody: {
23816 content: {
23817 "application/json": {
23818 url?: components["schemas"]["webhook-config-url"];
23819 content_type?: components["schemas"]["webhook-config-content-type"];
23820 secret?: components["schemas"]["webhook-config-secret"];
23821 insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
23822 };
23823 };
23824 };
23825 };
23826 /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */
23827 "repos/ping-webhook": {
23828 parameters: {
23829 path: {
23830 owner: components["parameters"]["owner"];
23831 repo: components["parameters"]["repo"];
23832 hook_id: components["parameters"]["hook-id"];
23833 };
23834 };
23835 responses: {
23836 /** Response */
23837 204: never;
23838 404: components["responses"]["not_found"];
23839 };
23840 };
23841 /**
23842 * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.
23843 *
23844 * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test`
23845 */
23846 "repos/test-push-webhook": {
23847 parameters: {
23848 path: {
23849 owner: components["parameters"]["owner"];
23850 repo: components["parameters"]["repo"];
23851 hook_id: components["parameters"]["hook-id"];
23852 };
23853 };
23854 responses: {
23855 /** Response */
23856 204: never;
23857 404: components["responses"]["not_found"];
23858 };
23859 };
23860 /**
23861 * View the progress of an import.
23862 *
23863 * **Import status**
23864 *
23865 * This section includes details about the possible values of the `status` field of the Import Progress response.
23866 *
23867 * An import that does not have errors will progress through these steps:
23868 *
23869 * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.
23870 * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).
23871 * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.
23872 * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".
23873 * * `complete` - the import is complete, and the repository is ready on GitHub.
23874 *
23875 * If there are problems, you will see one of these in the `status` field:
23876 *
23877 * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
23878 * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information.
23879 * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
23880 * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL.
23881 * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
23882 *
23883 * **The project_choices field**
23884 *
23885 * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.
23886 *
23887 * **Git LFS related fields**
23888 *
23889 * This section includes details about Git LFS related fields that may be present in the Import Progress response.
23890 *
23891 * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.
23892 * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.
23893 * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.
23894 * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request.
23895 */
23896 "migrations/get-import-status": {
23897 parameters: {
23898 path: {
23899 owner: components["parameters"]["owner"];
23900 repo: components["parameters"]["repo"];
23901 };
23902 };
23903 responses: {
23904 /** Response */
23905 200: {
23906 content: {
23907 "application/json": components["schemas"]["import"];
23908 };
23909 };
23910 404: components["responses"]["not_found"];
23911 };
23912 };
23913 /** Start a source import to a GitHub repository using GitHub Importer. */
23914 "migrations/start-import": {
23915 parameters: {
23916 path: {
23917 owner: components["parameters"]["owner"];
23918 repo: components["parameters"]["repo"];
23919 };
23920 };
23921 responses: {
23922 /** Response */
23923 201: {
23924 headers: {
23925 Location?: string;
23926 };
23927 content: {
23928 "application/json": components["schemas"]["import"];
23929 };
23930 };
23931 404: components["responses"]["not_found"];
23932 422: components["responses"]["validation_failed"];
23933 };
23934 requestBody: {
23935 content: {
23936 "application/json": {
23937 /** The URL of the originating repository. */
23938 vcs_url: string;
23939 /** The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. */
23940 vcs?: "subversion" | "git" | "mercurial" | "tfvc";
23941 /** If authentication is required, the username to provide to `vcs_url`. */
23942 vcs_username?: string;
23943 /** If authentication is required, the password to provide to `vcs_url`. */
23944 vcs_password?: string;
23945 /** For a tfvc import, the name of the project that is being imported. */
23946 tfvc_project?: string;
23947 };
23948 };
23949 };
23950 };
23951 /** Stop an import for a repository. */
23952 "migrations/cancel-import": {
23953 parameters: {
23954 path: {
23955 owner: components["parameters"]["owner"];
23956 repo: components["parameters"]["repo"];
23957 };
23958 };
23959 responses: {
23960 /** Response */
23961 204: never;
23962 };
23963 };
23964 /**
23965 * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API
23966 * request. If no parameters are provided, the import will be restarted.
23967 */
23968 "migrations/update-import": {
23969 parameters: {
23970 path: {
23971 owner: components["parameters"]["owner"];
23972 repo: components["parameters"]["repo"];
23973 };
23974 };
23975 responses: {
23976 /** Response */
23977 200: {
23978 content: {
23979 "application/json": components["schemas"]["import"];
23980 };
23981 };
23982 };
23983 requestBody: {
23984 content: {
23985 "application/json": {
23986 /** The username to provide to the originating repository. */
23987 vcs_username?: string;
23988 /** The password to provide to the originating repository. */
23989 vcs_password?: string;
23990 vcs?: string;
23991 tfvc_project?: string;
23992 } | null;
23993 };
23994 };
23995 };
23996 /**
23997 * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot <hubot@12341234-abab-fefe-8787-fedcba987654>`.
23998 *
23999 * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information.
24000 */
24001 "migrations/get-commit-authors": {
24002 parameters: {
24003 path: {
24004 owner: components["parameters"]["owner"];
24005 repo: components["parameters"]["repo"];
24006 };
24007 query: {
24008 /** A user ID. Only return users with an ID greater than this ID. */
24009 since?: components["parameters"]["since-user"];
24010 };
24011 };
24012 responses: {
24013 /** Response */
24014 200: {
24015 content: {
24016 "application/json": components["schemas"]["porter-author"][];
24017 };
24018 };
24019 404: components["responses"]["not_found"];
24020 };
24021 };
24022 /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */
24023 "migrations/map-commit-author": {
24024 parameters: {
24025 path: {
24026 owner: components["parameters"]["owner"];
24027 repo: components["parameters"]["repo"];
24028 author_id: number;
24029 };
24030 };
24031 responses: {
24032 /** Response */
24033 200: {
24034 content: {
24035 "application/json": components["schemas"]["porter-author"];
24036 };
24037 };
24038 404: components["responses"]["not_found"];
24039 422: components["responses"]["validation_failed"];
24040 };
24041 requestBody: {
24042 content: {
24043 "application/json": {
24044 /** The new Git author email. */
24045 email?: string;
24046 /** The new Git author name. */
24047 name?: string;
24048 };
24049 };
24050 };
24051 };
24052 /** List files larger than 100MB found during the import */
24053 "migrations/get-large-files": {
24054 parameters: {
24055 path: {
24056 owner: components["parameters"]["owner"];
24057 repo: components["parameters"]["repo"];
24058 };
24059 };
24060 responses: {
24061 /** Response */
24062 200: {
24063 content: {
24064 "application/json": components["schemas"]["porter-large-file"][];
24065 };
24066 };
24067 };
24068 };
24069 /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). */
24070 "migrations/set-lfs-preference": {
24071 parameters: {
24072 path: {
24073 owner: components["parameters"]["owner"];
24074 repo: components["parameters"]["repo"];
24075 };
24076 };
24077 responses: {
24078 /** Response */
24079 200: {
24080 content: {
24081 "application/json": components["schemas"]["import"];
24082 };
24083 };
24084 422: components["responses"]["validation_failed"];
24085 };
24086 requestBody: {
24087 content: {
24088 "application/json": {
24089 /** Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). */
24090 use_lfs: "opt_in" | "opt_out";
24091 };
24092 };
24093 };
24094 };
24095 /**
24096 * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
24097 *
24098 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
24099 */
24100 "apps/get-repo-installation": {
24101 parameters: {
24102 path: {
24103 owner: components["parameters"]["owner"];
24104 repo: components["parameters"]["repo"];
24105 };
24106 };
24107 responses: {
24108 /** Response */
24109 200: {
24110 content: {
24111 "application/json": components["schemas"]["installation"];
24112 };
24113 };
24114 301: components["responses"]["moved_permanently"];
24115 404: components["responses"]["not_found"];
24116 };
24117 };
24118 /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */
24119 "interactions/get-restrictions-for-repo": {
24120 parameters: {
24121 path: {
24122 owner: components["parameters"]["owner"];
24123 repo: components["parameters"]["repo"];
24124 };
24125 };
24126 responses: {
24127 /** Response */
24128 200: {
24129 content: {
24130 "application/json": Partial<
24131 components["schemas"]["interaction-limit-response"]
24132 > &
24133 Partial<{ [key: string]: any }>;
24134 };
24135 };
24136 };
24137 };
24138 /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */
24139 "interactions/set-restrictions-for-repo": {
24140 parameters: {
24141 path: {
24142 owner: components["parameters"]["owner"];
24143 repo: components["parameters"]["repo"];
24144 };
24145 };
24146 responses: {
24147 /** Response */
24148 200: {
24149 content: {
24150 "application/json": components["schemas"]["interaction-limit-response"];
24151 };
24152 };
24153 /** Response */
24154 409: unknown;
24155 };
24156 requestBody: {
24157 content: {
24158 "application/json": components["schemas"]["interaction-limit"];
24159 };
24160 };
24161 };
24162 /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */
24163 "interactions/remove-restrictions-for-repo": {
24164 parameters: {
24165 path: {
24166 owner: components["parameters"]["owner"];
24167 repo: components["parameters"]["repo"];
24168 };
24169 };
24170 responses: {
24171 /** Response */
24172 204: never;
24173 /** Response */
24174 409: unknown;
24175 };
24176 };
24177 /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */
24178 "repos/list-invitations": {
24179 parameters: {
24180 path: {
24181 owner: components["parameters"]["owner"];
24182 repo: components["parameters"]["repo"];
24183 };
24184 query: {
24185 /** Results per page (max 100). */
24186 per_page?: components["parameters"]["per_page"];
24187 /** Page number of the results to fetch. */
24188 page?: components["parameters"]["page"];
24189 };
24190 };
24191 responses: {
24192 /** Response */
24193 200: {
24194 headers: {};
24195 content: {
24196 "application/json": components["schemas"]["repository-invitation"][];
24197 };
24198 };
24199 };
24200 };
24201 "repos/delete-invitation": {
24202 parameters: {
24203 path: {
24204 owner: components["parameters"]["owner"];
24205 repo: components["parameters"]["repo"];
24206 /** invitation_id parameter */
24207 invitation_id: components["parameters"]["invitation_id"];
24208 };
24209 };
24210 responses: {
24211 /** Response */
24212 204: never;
24213 };
24214 };
24215 "repos/update-invitation": {
24216 parameters: {
24217 path: {
24218 owner: components["parameters"]["owner"];
24219 repo: components["parameters"]["repo"];
24220 /** invitation_id parameter */
24221 invitation_id: components["parameters"]["invitation_id"];
24222 };
24223 };
24224 responses: {
24225 /** Response */
24226 200: {
24227 content: {
24228 "application/json": components["schemas"]["repository-invitation"];
24229 };
24230 };
24231 };
24232 requestBody: {
24233 content: {
24234 "application/json": {
24235 /** The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. */
24236 permissions?: "read" | "write" | "maintain" | "triage" | "admin";
24237 };
24238 };
24239 };
24240 };
24241 /**
24242 * List issues in a repository.
24243 *
24244 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
24245 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
24246 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
24247 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
24248 */
24249 "issues/list-for-repo": {
24250 parameters: {
24251 path: {
24252 owner: components["parameters"]["owner"];
24253 repo: components["parameters"]["repo"];
24254 };
24255 query: {
24256 /** If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */
24257 milestone?: string;
24258 /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */
24259 state?: "open" | "closed" | "all";
24260 /** Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */
24261 assignee?: string;
24262 /** The user that created the issue. */
24263 creator?: string;
24264 /** A user that's mentioned in the issue. */
24265 mentioned?: string;
24266 /** A list of comma separated label names. Example: `bug,ui,@high` */
24267 labels?: components["parameters"]["labels"];
24268 /** What to sort results by. Can be either `created`, `updated`, `comments`. */
24269 sort?: "created" | "updated" | "comments";
24270 /** One of `asc` (ascending) or `desc` (descending). */
24271 direction?: components["parameters"]["direction"];
24272 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
24273 since?: components["parameters"]["since"];
24274 /** Results per page (max 100). */
24275 per_page?: components["parameters"]["per_page"];
24276 /** Page number of the results to fetch. */
24277 page?: components["parameters"]["page"];
24278 };
24279 };
24280 responses: {
24281 /** Response */
24282 200: {
24283 headers: {};
24284 content: {
24285 "application/json": components["schemas"]["issue-simple"][];
24286 };
24287 };
24288 301: components["responses"]["moved_permanently"];
24289 404: components["responses"]["not_found"];
24290 422: components["responses"]["validation_failed"];
24291 };
24292 };
24293 /**
24294 * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.
24295 *
24296 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details.
24297 */
24298 "issues/create": {
24299 parameters: {
24300 path: {
24301 owner: components["parameters"]["owner"];
24302 repo: components["parameters"]["repo"];
24303 };
24304 };
24305 responses: {
24306 /** Response */
24307 201: {
24308 headers: {
24309 Location?: string;
24310 };
24311 content: {
24312 "application/json": components["schemas"]["issue"];
24313 };
24314 };
24315 403: components["responses"]["forbidden"];
24316 404: components["responses"]["not_found"];
24317 410: components["responses"]["gone"];
24318 422: components["responses"]["validation_failed"];
24319 503: components["responses"]["service_unavailable"];
24320 };
24321 requestBody: {
24322 content: {
24323 "application/json": {
24324 /** The title of the issue. */
24325 title: string | number;
24326 /** The contents of the issue. */
24327 body?: string;
24328 /** Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */
24329 assignee?: string | null;
24330 milestone?: (string | number) | null;
24331 /** Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */
24332 labels?: (
24333 | string
24334 | {
24335 id?: number;
24336 name?: string;
24337 description?: string | null;
24338 color?: string | null;
24339 }
24340 )[];
24341 /** Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */
24342 assignees?: string[];
24343 };
24344 };
24345 };
24346 };
24347 /** By default, Issue Comments are ordered by ascending ID. */
24348 "issues/list-comments-for-repo": {
24349 parameters: {
24350 path: {
24351 owner: components["parameters"]["owner"];
24352 repo: components["parameters"]["repo"];
24353 };
24354 query: {
24355 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
24356 sort?: components["parameters"]["sort"];
24357 /** Either `asc` or `desc`. Ignored without the `sort` parameter. */
24358 direction?: "asc" | "desc";
24359 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
24360 since?: components["parameters"]["since"];
24361 /** Results per page (max 100). */
24362 per_page?: components["parameters"]["per_page"];
24363 /** Page number of the results to fetch. */
24364 page?: components["parameters"]["page"];
24365 };
24366 };
24367 responses: {
24368 /** Response */
24369 200: {
24370 headers: {};
24371 content: {
24372 "application/json": components["schemas"]["issue-comment"][];
24373 };
24374 };
24375 404: components["responses"]["not_found"];
24376 422: components["responses"]["validation_failed"];
24377 };
24378 };
24379 "issues/get-comment": {
24380 parameters: {
24381 path: {
24382 owner: components["parameters"]["owner"];
24383 repo: components["parameters"]["repo"];
24384 /** comment_id parameter */
24385 comment_id: components["parameters"]["comment_id"];
24386 };
24387 };
24388 responses: {
24389 /** Response */
24390 200: {
24391 content: {
24392 "application/json": components["schemas"]["issue-comment"];
24393 };
24394 };
24395 404: components["responses"]["not_found"];
24396 };
24397 };
24398 "issues/delete-comment": {
24399 parameters: {
24400 path: {
24401 owner: components["parameters"]["owner"];
24402 repo: components["parameters"]["repo"];
24403 /** comment_id parameter */
24404 comment_id: components["parameters"]["comment_id"];
24405 };
24406 };
24407 responses: {
24408 /** Response */
24409 204: never;
24410 };
24411 };
24412 "issues/update-comment": {
24413 parameters: {
24414 path: {
24415 owner: components["parameters"]["owner"];
24416 repo: components["parameters"]["repo"];
24417 /** comment_id parameter */
24418 comment_id: components["parameters"]["comment_id"];
24419 };
24420 };
24421 responses: {
24422 /** Response */
24423 200: {
24424 content: {
24425 "application/json": components["schemas"]["issue-comment"];
24426 };
24427 };
24428 422: components["responses"]["validation_failed"];
24429 };
24430 requestBody: {
24431 content: {
24432 "application/json": {
24433 /** The contents of the comment. */
24434 body: string;
24435 };
24436 };
24437 };
24438 };
24439 /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */
24440 "reactions/list-for-issue-comment": {
24441 parameters: {
24442 path: {
24443 owner: components["parameters"]["owner"];
24444 repo: components["parameters"]["repo"];
24445 /** comment_id parameter */
24446 comment_id: components["parameters"]["comment_id"];
24447 };
24448 query: {
24449 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */
24450 content?:
24451 | "+1"
24452 | "-1"
24453 | "laugh"
24454 | "confused"
24455 | "heart"
24456 | "hooray"
24457 | "rocket"
24458 | "eyes";
24459 /** Results per page (max 100). */
24460 per_page?: components["parameters"]["per_page"];
24461 /** Page number of the results to fetch. */
24462 page?: components["parameters"]["page"];
24463 };
24464 };
24465 responses: {
24466 /** Response */
24467 200: {
24468 headers: {};
24469 content: {
24470 "application/json": components["schemas"]["reaction"][];
24471 };
24472 };
24473 404: components["responses"]["not_found"];
24474 415: components["responses"]["preview_header_missing"];
24475 };
24476 };
24477 /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */
24478 "reactions/create-for-issue-comment": {
24479 parameters: {
24480 path: {
24481 owner: components["parameters"]["owner"];
24482 repo: components["parameters"]["repo"];
24483 /** comment_id parameter */
24484 comment_id: components["parameters"]["comment_id"];
24485 };
24486 };
24487 responses: {
24488 /** Reaction exists */
24489 200: {
24490 content: {
24491 "application/json": components["schemas"]["reaction"];
24492 };
24493 };
24494 /** Reaction created */
24495 201: {
24496 content: {
24497 "application/json": components["schemas"]["reaction"];
24498 };
24499 };
24500 415: components["responses"]["preview_header_missing"];
24501 422: components["responses"]["validation_failed"];
24502 };
24503 requestBody: {
24504 content: {
24505 "application/json": {
24506 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. */
24507 content:
24508 | "+1"
24509 | "-1"
24510 | "laugh"
24511 | "confused"
24512 | "heart"
24513 | "hooray"
24514 | "rocket"
24515 | "eyes";
24516 };
24517 };
24518 };
24519 };
24520 /**
24521 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.
24522 *
24523 * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments).
24524 */
24525 "reactions/delete-for-issue-comment": {
24526 parameters: {
24527 path: {
24528 owner: components["parameters"]["owner"];
24529 repo: components["parameters"]["repo"];
24530 /** comment_id parameter */
24531 comment_id: components["parameters"]["comment_id"];
24532 reaction_id: components["parameters"]["reaction-id"];
24533 };
24534 };
24535 responses: {
24536 /** Response */
24537 204: never;
24538 };
24539 };
24540 "issues/list-events-for-repo": {
24541 parameters: {
24542 path: {
24543 owner: components["parameters"]["owner"];
24544 repo: components["parameters"]["repo"];
24545 };
24546 query: {
24547 /** Results per page (max 100). */
24548 per_page?: components["parameters"]["per_page"];
24549 /** Page number of the results to fetch. */
24550 page?: components["parameters"]["page"];
24551 };
24552 };
24553 responses: {
24554 /** Response */
24555 200: {
24556 headers: {};
24557 content: {
24558 "application/json": components["schemas"]["issue-event"][];
24559 };
24560 };
24561 422: components["responses"]["validation_failed"];
24562 };
24563 };
24564 "issues/get-event": {
24565 parameters: {
24566 path: {
24567 owner: components["parameters"]["owner"];
24568 repo: components["parameters"]["repo"];
24569 event_id: number;
24570 };
24571 };
24572 responses: {
24573 /** Response */
24574 200: {
24575 content: {
24576 "application/json": components["schemas"]["issue-event"];
24577 };
24578 };
24579 403: components["responses"]["forbidden"];
24580 404: components["responses"]["not_found"];
24581 410: components["responses"]["gone"];
24582 };
24583 };
24584 /**
24585 * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was
24586 * [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If
24587 * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
24588 * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read
24589 * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe
24590 * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.
24591 *
24592 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
24593 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
24594 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
24595 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
24596 */
24597 "issues/get": {
24598 parameters: {
24599 path: {
24600 owner: components["parameters"]["owner"];
24601 repo: components["parameters"]["repo"];
24602 /** issue_number parameter */
24603 issue_number: components["parameters"]["issue_number"];
24604 };
24605 };
24606 responses: {
24607 /** Response */
24608 200: {
24609 content: {
24610 "application/json": components["schemas"]["issue"];
24611 };
24612 };
24613 301: components["responses"]["moved_permanently"];
24614 304: components["responses"]["not_modified"];
24615 404: components["responses"]["not_found"];
24616 410: components["responses"]["gone"];
24617 };
24618 };
24619 /** Issue owners and users with push access can edit an issue. */
24620 "issues/update": {
24621 parameters: {
24622 path: {
24623 owner: components["parameters"]["owner"];
24624 repo: components["parameters"]["repo"];
24625 /** issue_number parameter */
24626 issue_number: components["parameters"]["issue_number"];
24627 };
24628 };
24629 responses: {
24630 /** Response */
24631 200: {
24632 content: {
24633 "application/json": components["schemas"]["issue"];
24634 };
24635 };
24636 301: components["responses"]["moved_permanently"];
24637 403: components["responses"]["forbidden"];
24638 404: components["responses"]["not_found"];
24639 410: components["responses"]["gone"];
24640 422: components["responses"]["validation_failed"];
24641 503: components["responses"]["service_unavailable"];
24642 };
24643 requestBody: {
24644 content: {
24645 "application/json": {
24646 /** The title of the issue. */
24647 title?: (string | number) | null;
24648 /** The contents of the issue. */
24649 body?: string | null;
24650 /** Login for the user that this issue should be assigned to. **This field is deprecated.** */
24651 assignee?: string | null;
24652 /** State of the issue. Either `open` or `closed`. */
24653 state?: "open" | "closed";
24654 milestone?: (string | number) | null;
24655 /** Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */
24656 labels?: (
24657 | string
24658 | {
24659 id?: number;
24660 name?: string;
24661 description?: string | null;
24662 color?: string | null;
24663 }
24664 )[];
24665 /** Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */
24666 assignees?: string[];
24667 };
24668 };
24669 };
24670 };
24671 /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */
24672 "issues/add-assignees": {
24673 parameters: {
24674 path: {
24675 owner: components["parameters"]["owner"];
24676 repo: components["parameters"]["repo"];
24677 /** issue_number parameter */
24678 issue_number: components["parameters"]["issue_number"];
24679 };
24680 };
24681 responses: {
24682 /** Response */
24683 201: {
24684 content: {
24685 "application/json": components["schemas"]["issue-simple"];
24686 };
24687 };
24688 };
24689 requestBody: {
24690 content: {
24691 "application/json": {
24692 /** Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */
24693 assignees?: string[];
24694 };
24695 };
24696 };
24697 };
24698 /** Removes one or more assignees from an issue. */
24699 "issues/remove-assignees": {
24700 parameters: {
24701 path: {
24702 owner: components["parameters"]["owner"];
24703 repo: components["parameters"]["repo"];
24704 /** issue_number parameter */
24705 issue_number: components["parameters"]["issue_number"];
24706 };
24707 };
24708 responses: {
24709 /** Response */
24710 200: {
24711 content: {
24712 "application/json": components["schemas"]["issue-simple"];
24713 };
24714 };
24715 };
24716 requestBody: {
24717 content: {
24718 "application/json": {
24719 /** Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */
24720 assignees?: string[];
24721 };
24722 };
24723 };
24724 };
24725 /** Issue Comments are ordered by ascending ID. */
24726 "issues/list-comments": {
24727 parameters: {
24728 path: {
24729 owner: components["parameters"]["owner"];
24730 repo: components["parameters"]["repo"];
24731 /** issue_number parameter */
24732 issue_number: components["parameters"]["issue_number"];
24733 };
24734 query: {
24735 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
24736 since?: components["parameters"]["since"];
24737 /** Results per page (max 100). */
24738 per_page?: components["parameters"]["per_page"];
24739 /** Page number of the results to fetch. */
24740 page?: components["parameters"]["page"];
24741 };
24742 };
24743 responses: {
24744 /** Response */
24745 200: {
24746 headers: {};
24747 content: {
24748 "application/json": components["schemas"]["issue-comment"][];
24749 };
24750 };
24751 404: components["responses"]["not_found"];
24752 410: components["responses"]["gone"];
24753 };
24754 };
24755 /** This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
24756 "issues/create-comment": {
24757 parameters: {
24758 path: {
24759 owner: components["parameters"]["owner"];
24760 repo: components["parameters"]["repo"];
24761 /** issue_number parameter */
24762 issue_number: components["parameters"]["issue_number"];
24763 };
24764 };
24765 responses: {
24766 /** Response */
24767 201: {
24768 headers: {
24769 Location?: string;
24770 };
24771 content: {
24772 "application/json": components["schemas"]["issue-comment"];
24773 };
24774 };
24775 403: components["responses"]["forbidden"];
24776 404: components["responses"]["not_found"];
24777 410: components["responses"]["gone"];
24778 422: components["responses"]["validation_failed"];
24779 };
24780 requestBody: {
24781 content: {
24782 "application/json": {
24783 /** The contents of the comment. */
24784 body: string;
24785 };
24786 };
24787 };
24788 };
24789 "issues/list-events": {
24790 parameters: {
24791 path: {
24792 owner: components["parameters"]["owner"];
24793 repo: components["parameters"]["repo"];
24794 /** issue_number parameter */
24795 issue_number: components["parameters"]["issue_number"];
24796 };
24797 query: {
24798 /** Results per page (max 100). */
24799 per_page?: components["parameters"]["per_page"];
24800 /** Page number of the results to fetch. */
24801 page?: components["parameters"]["page"];
24802 };
24803 };
24804 responses: {
24805 /** Response */
24806 200: {
24807 headers: {};
24808 content: {
24809 "application/json": components["schemas"]["issue-event-for-issue"][];
24810 };
24811 };
24812 410: components["responses"]["gone"];
24813 };
24814 };
24815 "issues/list-labels-on-issue": {
24816 parameters: {
24817 path: {
24818 owner: components["parameters"]["owner"];
24819 repo: components["parameters"]["repo"];
24820 /** issue_number parameter */
24821 issue_number: components["parameters"]["issue_number"];
24822 };
24823 query: {
24824 /** Results per page (max 100). */
24825 per_page?: components["parameters"]["per_page"];
24826 /** Page number of the results to fetch. */
24827 page?: components["parameters"]["page"];
24828 };
24829 };
24830 responses: {
24831 /** Response */
24832 200: {
24833 headers: {};
24834 content: {
24835 "application/json": components["schemas"]["label"][];
24836 };
24837 };
24838 410: components["responses"]["gone"];
24839 };
24840 };
24841 /** Removes any previous labels and sets the new labels for an issue. */
24842 "issues/set-labels": {
24843 parameters: {
24844 path: {
24845 owner: components["parameters"]["owner"];
24846 repo: components["parameters"]["repo"];
24847 /** issue_number parameter */
24848 issue_number: components["parameters"]["issue_number"];
24849 };
24850 };
24851 responses: {
24852 /** Response */
24853 200: {
24854 content: {
24855 "application/json": components["schemas"]["label"][];
24856 };
24857 };
24858 410: components["responses"]["gone"];
24859 422: components["responses"]["validation_failed"];
24860 };
24861 requestBody: {
24862 content: {
24863 "application/json": Partial<{
24864 /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */
24865 labels?: string[];
24866 }> &
24867 Partial<{
24868 labels?: {
24869 name: string;
24870 }[];
24871 }>;
24872 };
24873 };
24874 };
24875 "issues/add-labels": {
24876 parameters: {
24877 path: {
24878 owner: components["parameters"]["owner"];
24879 repo: components["parameters"]["repo"];
24880 /** issue_number parameter */
24881 issue_number: components["parameters"]["issue_number"];
24882 };
24883 };
24884 responses: {
24885 /** Response */
24886 200: {
24887 content: {
24888 "application/json": components["schemas"]["label"][];
24889 };
24890 };
24891 410: components["responses"]["gone"];
24892 422: components["responses"]["validation_failed"];
24893 };
24894 requestBody: {
24895 content: {
24896 "application/json":
24897 | {
24898 /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */
24899 labels?: string[];
24900 }
24901 | {
24902 labels?: {
24903 name: string;
24904 }[];
24905 };
24906 };
24907 };
24908 };
24909 "issues/remove-all-labels": {
24910 parameters: {
24911 path: {
24912 owner: components["parameters"]["owner"];
24913 repo: components["parameters"]["repo"];
24914 /** issue_number parameter */
24915 issue_number: components["parameters"]["issue_number"];
24916 };
24917 };
24918 responses: {
24919 /** Response */
24920 204: never;
24921 410: components["responses"]["gone"];
24922 };
24923 };
24924 /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */
24925 "issues/remove-label": {
24926 parameters: {
24927 path: {
24928 owner: components["parameters"]["owner"];
24929 repo: components["parameters"]["repo"];
24930 /** issue_number parameter */
24931 issue_number: components["parameters"]["issue_number"];
24932 name: string;
24933 };
24934 };
24935 responses: {
24936 /** Response */
24937 200: {
24938 content: {
24939 "application/json": components["schemas"]["label"][];
24940 };
24941 };
24942 404: components["responses"]["not_found"];
24943 410: components["responses"]["gone"];
24944 };
24945 };
24946 /**
24947 * Users with push access can lock an issue or pull request's conversation.
24948 *
24949 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
24950 */
24951 "issues/lock": {
24952 parameters: {
24953 path: {
24954 owner: components["parameters"]["owner"];
24955 repo: components["parameters"]["repo"];
24956 /** issue_number parameter */
24957 issue_number: components["parameters"]["issue_number"];
24958 };
24959 };
24960 responses: {
24961 /** Response */
24962 204: never;
24963 403: components["responses"]["forbidden"];
24964 404: components["responses"]["not_found"];
24965 410: components["responses"]["gone"];
24966 422: components["responses"]["validation_failed"];
24967 };
24968 requestBody: {
24969 content: {
24970 "application/json": {
24971 /**
24972 * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
24973 * \* `off-topic`
24974 * \* `too heated`
24975 * \* `resolved`
24976 * \* `spam`
24977 */
24978 lock_reason?: "off-topic" | "too heated" | "resolved" | "spam";
24979 } | null;
24980 };
24981 };
24982 };
24983 /** Users with push access can unlock an issue's conversation. */
24984 "issues/unlock": {
24985 parameters: {
24986 path: {
24987 owner: components["parameters"]["owner"];
24988 repo: components["parameters"]["repo"];
24989 /** issue_number parameter */
24990 issue_number: components["parameters"]["issue_number"];
24991 };
24992 };
24993 responses: {
24994 /** Response */
24995 204: never;
24996 403: components["responses"]["forbidden"];
24997 404: components["responses"]["not_found"];
24998 };
24999 };
25000 /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */
25001 "reactions/list-for-issue": {
25002 parameters: {
25003 path: {
25004 owner: components["parameters"]["owner"];
25005 repo: components["parameters"]["repo"];
25006 /** issue_number parameter */
25007 issue_number: components["parameters"]["issue_number"];
25008 };
25009 query: {
25010 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */
25011 content?:
25012 | "+1"
25013 | "-1"
25014 | "laugh"
25015 | "confused"
25016 | "heart"
25017 | "hooray"
25018 | "rocket"
25019 | "eyes";
25020 /** Results per page (max 100). */
25021 per_page?: components["parameters"]["per_page"];
25022 /** Page number of the results to fetch. */
25023 page?: components["parameters"]["page"];
25024 };
25025 };
25026 responses: {
25027 /** Response */
25028 200: {
25029 headers: {};
25030 content: {
25031 "application/json": components["schemas"]["reaction"][];
25032 };
25033 };
25034 404: components["responses"]["not_found"];
25035 410: components["responses"]["gone"];
25036 415: components["responses"]["preview_header_missing"];
25037 };
25038 };
25039 /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */
25040 "reactions/create-for-issue": {
25041 parameters: {
25042 path: {
25043 owner: components["parameters"]["owner"];
25044 repo: components["parameters"]["repo"];
25045 /** issue_number parameter */
25046 issue_number: components["parameters"]["issue_number"];
25047 };
25048 };
25049 responses: {
25050 /** Response */
25051 200: {
25052 content: {
25053 "application/json": components["schemas"]["reaction"];
25054 };
25055 };
25056 /** Response */
25057 201: {
25058 content: {
25059 "application/json": components["schemas"]["reaction"];
25060 };
25061 };
25062 415: components["responses"]["preview_header_missing"];
25063 422: components["responses"]["validation_failed"];
25064 };
25065 requestBody: {
25066 content: {
25067 "application/json": {
25068 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. */
25069 content:
25070 | "+1"
25071 | "-1"
25072 | "laugh"
25073 | "confused"
25074 | "heart"
25075 | "hooray"
25076 | "rocket"
25077 | "eyes";
25078 };
25079 };
25080 };
25081 };
25082 /**
25083 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.
25084 *
25085 * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/).
25086 */
25087 "reactions/delete-for-issue": {
25088 parameters: {
25089 path: {
25090 owner: components["parameters"]["owner"];
25091 repo: components["parameters"]["repo"];
25092 /** issue_number parameter */
25093 issue_number: components["parameters"]["issue_number"];
25094 reaction_id: components["parameters"]["reaction-id"];
25095 };
25096 };
25097 responses: {
25098 /** Response */
25099 204: never;
25100 };
25101 };
25102 "issues/list-events-for-timeline": {
25103 parameters: {
25104 path: {
25105 owner: components["parameters"]["owner"];
25106 repo: components["parameters"]["repo"];
25107 /** issue_number parameter */
25108 issue_number: components["parameters"]["issue_number"];
25109 };
25110 query: {
25111 /** Results per page (max 100). */
25112 per_page?: components["parameters"]["per_page"];
25113 /** Page number of the results to fetch. */
25114 page?: components["parameters"]["page"];
25115 };
25116 };
25117 responses: {
25118 /** Response */
25119 200: {
25120 headers: {};
25121 content: {
25122 "application/json": components["schemas"]["timeline-issue-events"][];
25123 };
25124 };
25125 404: components["responses"]["not_found"];
25126 410: components["responses"]["gone"];
25127 415: components["responses"]["preview_header_missing"];
25128 };
25129 };
25130 "repos/list-deploy-keys": {
25131 parameters: {
25132 path: {
25133 owner: components["parameters"]["owner"];
25134 repo: components["parameters"]["repo"];
25135 };
25136 query: {
25137 /** Results per page (max 100). */
25138 per_page?: components["parameters"]["per_page"];
25139 /** Page number of the results to fetch. */
25140 page?: components["parameters"]["page"];
25141 };
25142 };
25143 responses: {
25144 /** Response */
25145 200: {
25146 headers: {};
25147 content: {
25148 "application/json": components["schemas"]["deploy-key"][];
25149 };
25150 };
25151 };
25152 };
25153 /** You can create a read-only deploy key. */
25154 "repos/create-deploy-key": {
25155 parameters: {
25156 path: {
25157 owner: components["parameters"]["owner"];
25158 repo: components["parameters"]["repo"];
25159 };
25160 };
25161 responses: {
25162 /** Response */
25163 201: {
25164 headers: {
25165 Location?: string;
25166 };
25167 content: {
25168 "application/json": components["schemas"]["deploy-key"];
25169 };
25170 };
25171 422: components["responses"]["validation_failed"];
25172 };
25173 requestBody: {
25174 content: {
25175 "application/json": {
25176 /** A name for the key. */
25177 title?: string;
25178 /** The contents of the key. */
25179 key: string;
25180 /**
25181 * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.
25182 *
25183 * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)."
25184 */
25185 read_only?: boolean;
25186 };
25187 };
25188 };
25189 };
25190 "repos/get-deploy-key": {
25191 parameters: {
25192 path: {
25193 owner: components["parameters"]["owner"];
25194 repo: components["parameters"]["repo"];
25195 /** key_id parameter */
25196 key_id: components["parameters"]["key_id"];
25197 };
25198 };
25199 responses: {
25200 /** Response */
25201 200: {
25202 content: {
25203 "application/json": components["schemas"]["deploy-key"];
25204 };
25205 };
25206 404: components["responses"]["not_found"];
25207 };
25208 };
25209 /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */
25210 "repos/delete-deploy-key": {
25211 parameters: {
25212 path: {
25213 owner: components["parameters"]["owner"];
25214 repo: components["parameters"]["repo"];
25215 /** key_id parameter */
25216 key_id: components["parameters"]["key_id"];
25217 };
25218 };
25219 responses: {
25220 /** Response */
25221 204: never;
25222 };
25223 };
25224 "issues/list-labels-for-repo": {
25225 parameters: {
25226 path: {
25227 owner: components["parameters"]["owner"];
25228 repo: components["parameters"]["repo"];
25229 };
25230 query: {
25231 /** Results per page (max 100). */
25232 per_page?: components["parameters"]["per_page"];
25233 /** Page number of the results to fetch. */
25234 page?: components["parameters"]["page"];
25235 };
25236 };
25237 responses: {
25238 /** Response */
25239 200: {
25240 headers: {};
25241 content: {
25242 "application/json": components["schemas"]["label"][];
25243 };
25244 };
25245 404: components["responses"]["not_found"];
25246 };
25247 };
25248 "issues/create-label": {
25249 parameters: {
25250 path: {
25251 owner: components["parameters"]["owner"];
25252 repo: components["parameters"]["repo"];
25253 };
25254 };
25255 responses: {
25256 /** Response */
25257 201: {
25258 headers: {
25259 Location?: string;
25260 };
25261 content: {
25262 "application/json": components["schemas"]["label"];
25263 };
25264 };
25265 404: components["responses"]["not_found"];
25266 422: components["responses"]["validation_failed"];
25267 };
25268 requestBody: {
25269 content: {
25270 "application/json": {
25271 /** The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */
25272 name: string;
25273 /** The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */
25274 color?: string;
25275 /** A short description of the label. */
25276 description?: string;
25277 };
25278 };
25279 };
25280 };
25281 "issues/get-label": {
25282 parameters: {
25283 path: {
25284 owner: components["parameters"]["owner"];
25285 repo: components["parameters"]["repo"];
25286 name: string;
25287 };
25288 };
25289 responses: {
25290 /** Response */
25291 200: {
25292 content: {
25293 "application/json": components["schemas"]["label"];
25294 };
25295 };
25296 404: components["responses"]["not_found"];
25297 };
25298 };
25299 "issues/delete-label": {
25300 parameters: {
25301 path: {
25302 owner: components["parameters"]["owner"];
25303 repo: components["parameters"]["repo"];
25304 name: string;
25305 };
25306 };
25307 responses: {
25308 /** Response */
25309 204: never;
25310 };
25311 };
25312 "issues/update-label": {
25313 parameters: {
25314 path: {
25315 owner: components["parameters"]["owner"];
25316 repo: components["parameters"]["repo"];
25317 name: string;
25318 };
25319 };
25320 responses: {
25321 /** Response */
25322 200: {
25323 content: {
25324 "application/json": components["schemas"]["label"];
25325 };
25326 };
25327 };
25328 requestBody: {
25329 content: {
25330 "application/json": {
25331 /** The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */
25332 new_name?: string;
25333 /** The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */
25334 color?: string;
25335 /** A short description of the label. */
25336 description?: string;
25337 };
25338 };
25339 };
25340 };
25341 /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */
25342 "repos/list-languages": {
25343 parameters: {
25344 path: {
25345 owner: components["parameters"]["owner"];
25346 repo: components["parameters"]["repo"];
25347 };
25348 };
25349 responses: {
25350 /** Response */
25351 200: {
25352 content: {
25353 "application/json": components["schemas"]["language"];
25354 };
25355 };
25356 };
25357 };
25358 /**
25359 * This method returns the contents of the repository's license file, if one is detected.
25360 *
25361 * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.
25362 */
25363 "licenses/get-for-repo": {
25364 parameters: {
25365 path: {
25366 owner: components["parameters"]["owner"];
25367 repo: components["parameters"]["repo"];
25368 };
25369 };
25370 responses: {
25371 /** Response */
25372 200: {
25373 content: {
25374 "application/json": components["schemas"]["license-content"];
25375 };
25376 };
25377 };
25378 };
25379 "repos/merge": {
25380 parameters: {
25381 path: {
25382 owner: components["parameters"]["owner"];
25383 repo: components["parameters"]["repo"];
25384 };
25385 };
25386 responses: {
25387 /** Successful Response (The resulting merge commit) */
25388 201: {
25389 content: {
25390 "application/json": components["schemas"]["commit"];
25391 };
25392 };
25393 /** Response when already merged */
25394 204: never;
25395 403: components["responses"]["forbidden"];
25396 /** Not Found when the base or head does not exist */
25397 404: unknown;
25398 /** Conflict when there is a merge conflict */
25399 409: unknown;
25400 422: components["responses"]["validation_failed"];
25401 };
25402 requestBody: {
25403 content: {
25404 "application/json": {
25405 /** The name of the base branch that the head will be merged into. */
25406 base: string;
25407 /** The head to merge. This can be a branch name or a commit SHA1. */
25408 head: string;
25409 /** Commit message to use for the merge commit. If omitted, a default message will be used. */
25410 commit_message?: string;
25411 };
25412 };
25413 };
25414 };
25415 "issues/list-milestones": {
25416 parameters: {
25417 path: {
25418 owner: components["parameters"]["owner"];
25419 repo: components["parameters"]["repo"];
25420 };
25421 query: {
25422 /** The state of the milestone. Either `open`, `closed`, or `all`. */
25423 state?: "open" | "closed" | "all";
25424 /** What to sort results by. Either `due_on` or `completeness`. */
25425 sort?: "due_on" | "completeness";
25426 /** The direction of the sort. Either `asc` or `desc`. */
25427 direction?: "asc" | "desc";
25428 /** Results per page (max 100). */
25429 per_page?: components["parameters"]["per_page"];
25430 /** Page number of the results to fetch. */
25431 page?: components["parameters"]["page"];
25432 };
25433 };
25434 responses: {
25435 /** Response */
25436 200: {
25437 headers: {};
25438 content: {
25439 "application/json": components["schemas"]["milestone"][];
25440 };
25441 };
25442 404: components["responses"]["not_found"];
25443 };
25444 };
25445 "issues/create-milestone": {
25446 parameters: {
25447 path: {
25448 owner: components["parameters"]["owner"];
25449 repo: components["parameters"]["repo"];
25450 };
25451 };
25452 responses: {
25453 /** Response */
25454 201: {
25455 headers: {
25456 Location?: string;
25457 };
25458 content: {
25459 "application/json": components["schemas"]["milestone"];
25460 };
25461 };
25462 404: components["responses"]["not_found"];
25463 422: components["responses"]["validation_failed"];
25464 };
25465 requestBody: {
25466 content: {
25467 "application/json": {
25468 /** The title of the milestone. */
25469 title: string;
25470 /** The state of the milestone. Either `open` or `closed`. */
25471 state?: "open" | "closed";
25472 /** A description of the milestone. */
25473 description?: string;
25474 /** The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
25475 due_on?: string;
25476 };
25477 };
25478 };
25479 };
25480 "issues/get-milestone": {
25481 parameters: {
25482 path: {
25483 owner: components["parameters"]["owner"];
25484 repo: components["parameters"]["repo"];
25485 /** milestone_number parameter */
25486 milestone_number: components["parameters"]["milestone_number"];
25487 };
25488 };
25489 responses: {
25490 /** Response */
25491 200: {
25492 content: {
25493 "application/json": components["schemas"]["milestone"];
25494 };
25495 };
25496 404: components["responses"]["not_found"];
25497 };
25498 };
25499 "issues/delete-milestone": {
25500 parameters: {
25501 path: {
25502 owner: components["parameters"]["owner"];
25503 repo: components["parameters"]["repo"];
25504 /** milestone_number parameter */
25505 milestone_number: components["parameters"]["milestone_number"];
25506 };
25507 };
25508 responses: {
25509 /** Response */
25510 204: never;
25511 404: components["responses"]["not_found"];
25512 };
25513 };
25514 "issues/update-milestone": {
25515 parameters: {
25516 path: {
25517 owner: components["parameters"]["owner"];
25518 repo: components["parameters"]["repo"];
25519 /** milestone_number parameter */
25520 milestone_number: components["parameters"]["milestone_number"];
25521 };
25522 };
25523 responses: {
25524 /** Response */
25525 200: {
25526 content: {
25527 "application/json": components["schemas"]["milestone"];
25528 };
25529 };
25530 };
25531 requestBody: {
25532 content: {
25533 "application/json": {
25534 /** The title of the milestone. */
25535 title?: string;
25536 /** The state of the milestone. Either `open` or `closed`. */
25537 state?: "open" | "closed";
25538 /** A description of the milestone. */
25539 description?: string;
25540 /** The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
25541 due_on?: string;
25542 };
25543 };
25544 };
25545 };
25546 "issues/list-labels-for-milestone": {
25547 parameters: {
25548 path: {
25549 owner: components["parameters"]["owner"];
25550 repo: components["parameters"]["repo"];
25551 /** milestone_number parameter */
25552 milestone_number: components["parameters"]["milestone_number"];
25553 };
25554 query: {
25555 /** Results per page (max 100). */
25556 per_page?: components["parameters"]["per_page"];
25557 /** Page number of the results to fetch. */
25558 page?: components["parameters"]["page"];
25559 };
25560 };
25561 responses: {
25562 /** Response */
25563 200: {
25564 headers: {};
25565 content: {
25566 "application/json": components["schemas"]["label"][];
25567 };
25568 };
25569 };
25570 };
25571 /** List all notifications for the current user. */
25572 "activity/list-repo-notifications-for-authenticated-user": {
25573 parameters: {
25574 path: {
25575 owner: components["parameters"]["owner"];
25576 repo: components["parameters"]["repo"];
25577 };
25578 query: {
25579 /** If `true`, show notifications marked as read. */
25580 all?: components["parameters"]["all"];
25581 /** If `true`, only shows notifications in which the user is directly participating or mentioned. */
25582 participating?: components["parameters"]["participating"];
25583 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
25584 since?: components["parameters"]["since"];
25585 /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
25586 before?: components["parameters"]["before"];
25587 /** Results per page (max 100). */
25588 per_page?: components["parameters"]["per_page"];
25589 /** Page number of the results to fetch. */
25590 page?: components["parameters"]["page"];
25591 };
25592 };
25593 responses: {
25594 /** Response */
25595 200: {
25596 headers: {};
25597 content: {
25598 "application/json": components["schemas"]["thread"][];
25599 };
25600 };
25601 };
25602 };
25603 /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */
25604 "activity/mark-repo-notifications-as-read": {
25605 parameters: {
25606 path: {
25607 owner: components["parameters"]["owner"];
25608 repo: components["parameters"]["repo"];
25609 };
25610 };
25611 responses: {
25612 /** Response */
25613 202: {
25614 content: {
25615 "application/json": {
25616 message?: string;
25617 url?: string;
25618 };
25619 };
25620 };
25621 /** Reset Content */
25622 205: unknown;
25623 };
25624 requestBody: {
25625 content: {
25626 "application/json": {
25627 /** Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */
25628 last_read_at?: string;
25629 };
25630 };
25631 };
25632 };
25633 "repos/get-pages": {
25634 parameters: {
25635 path: {
25636 owner: components["parameters"]["owner"];
25637 repo: components["parameters"]["repo"];
25638 };
25639 };
25640 responses: {
25641 /** Response */
25642 200: {
25643 content: {
25644 "application/json": components["schemas"]["page"];
25645 };
25646 };
25647 404: components["responses"]["not_found"];
25648 };
25649 };
25650 /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */
25651 "repos/update-information-about-pages-site": {
25652 parameters: {
25653 path: {
25654 owner: components["parameters"]["owner"];
25655 repo: components["parameters"]["repo"];
25656 };
25657 };
25658 responses: {
25659 /** Response */
25660 204: never;
25661 400: components["responses"]["bad_request"];
25662 422: components["responses"]["validation_failed"];
25663 };
25664 requestBody: {
25665 content: {
25666 "application/json": {
25667 /** Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." */
25668 cname?: string | null;
25669 /** Specify whether HTTPS should be enforced for the repository. */
25670 https_enforced?: boolean;
25671 /** Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */
25672 public?: boolean;
25673 source?: Partial<"gh-pages" | "master" | "master /docs"> &
25674 Partial<{
25675 /** The repository branch used to publish your site's source files. */
25676 branch: string;
25677 /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */
25678 path: "/" | "/docs";
25679 }>;
25680 };
25681 };
25682 };
25683 };
25684 /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */
25685 "repos/create-pages-site": {
25686 parameters: {
25687 path: {
25688 owner: components["parameters"]["owner"];
25689 repo: components["parameters"]["repo"];
25690 };
25691 };
25692 responses: {
25693 /** Response */
25694 201: {
25695 content: {
25696 "application/json": components["schemas"]["page"];
25697 };
25698 };
25699 409: components["responses"]["conflict"];
25700 415: components["responses"]["preview_header_missing"];
25701 422: components["responses"]["validation_failed"];
25702 };
25703 requestBody: {
25704 content: {
25705 "application/json": {
25706 /** The source branch and directory used to publish your Pages site. */
25707 source: {
25708 /** The repository branch used to publish your site's source files. */
25709 branch: string;
25710 /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` */
25711 path?: "/" | "/docs";
25712 };
25713 } | null;
25714 };
25715 };
25716 };
25717 "repos/delete-pages-site": {
25718 parameters: {
25719 path: {
25720 owner: components["parameters"]["owner"];
25721 repo: components["parameters"]["repo"];
25722 };
25723 };
25724 responses: {
25725 /** Response */
25726 204: never;
25727 404: components["responses"]["not_found"];
25728 415: components["responses"]["preview_header_missing"];
25729 422: components["responses"]["validation_failed"];
25730 };
25731 };
25732 "repos/list-pages-builds": {
25733 parameters: {
25734 path: {
25735 owner: components["parameters"]["owner"];
25736 repo: components["parameters"]["repo"];
25737 };
25738 query: {
25739 /** Results per page (max 100). */
25740 per_page?: components["parameters"]["per_page"];
25741 /** Page number of the results to fetch. */
25742 page?: components["parameters"]["page"];
25743 };
25744 };
25745 responses: {
25746 /** Response */
25747 200: {
25748 headers: {};
25749 content: {
25750 "application/json": components["schemas"]["page-build"][];
25751 };
25752 };
25753 };
25754 };
25755 /**
25756 * 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.
25757 *
25758 * 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.
25759 */
25760 "repos/request-pages-build": {
25761 parameters: {
25762 path: {
25763 owner: components["parameters"]["owner"];
25764 repo: components["parameters"]["repo"];
25765 };
25766 };
25767 responses: {
25768 /** Response */
25769 201: {
25770 content: {
25771 "application/json": components["schemas"]["page-build-status"];
25772 };
25773 };
25774 };
25775 };
25776 "repos/get-latest-pages-build": {
25777 parameters: {
25778 path: {
25779 owner: components["parameters"]["owner"];
25780 repo: components["parameters"]["repo"];
25781 };
25782 };
25783 responses: {
25784 /** Response */
25785 200: {
25786 content: {
25787 "application/json": components["schemas"]["page-build"];
25788 };
25789 };
25790 };
25791 };
25792 "repos/get-pages-build": {
25793 parameters: {
25794 path: {
25795 owner: components["parameters"]["owner"];
25796 repo: components["parameters"]["repo"];
25797 build_id: number;
25798 };
25799 };
25800 responses: {
25801 /** Response */
25802 200: {
25803 content: {
25804 "application/json": components["schemas"]["page-build"];
25805 };
25806 };
25807 };
25808 };
25809 /**
25810 * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.
25811 *
25812 * 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.
25813 *
25814 * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.
25815 */
25816 "repos/get-pages-health-check": {
25817 parameters: {
25818 path: {
25819 owner: components["parameters"]["owner"];
25820 repo: components["parameters"]["repo"];
25821 };
25822 };
25823 responses: {
25824 /** Response */
25825 200: {
25826 content: {
25827 "application/json": components["schemas"]["pages-health-check"];
25828 };
25829 };
25830 /** Empty response */
25831 202: {
25832 content: {
25833 "application/json": components["schemas"]["empty-object"];
25834 };
25835 };
25836 /** Custom domains are not available for GitHub Pages */
25837 400: unknown;
25838 404: components["responses"]["not_found"];
25839 /** There isn't a CNAME for this page */
25840 422: unknown;
25841 };
25842 };
25843 /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
25844 "projects/list-for-repo": {
25845 parameters: {
25846 path: {
25847 owner: components["parameters"]["owner"];
25848 repo: components["parameters"]["repo"];
25849 };
25850 query: {
25851 /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */
25852 state?: "open" | "closed" | "all";
25853 /** Results per page (max 100). */
25854 per_page?: components["parameters"]["per_page"];
25855 /** Page number of the results to fetch. */
25856 page?: components["parameters"]["page"];
25857 };
25858 };
25859 responses: {
25860 /** Response */
25861 200: {
25862 headers: {};
25863 content: {
25864 "application/json": components["schemas"]["project"][];
25865 };
25866 };
25867 401: components["responses"]["requires_authentication"];
25868 403: components["responses"]["forbidden"];
25869 404: components["responses"]["not_found"];
25870 410: components["responses"]["gone"];
25871 422: components["responses"]["validation_failed_simple"];
25872 };
25873 };
25874 /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */
25875 "projects/create-for-repo": {
25876 parameters: {
25877 path: {
25878 owner: components["parameters"]["owner"];
25879 repo: components["parameters"]["repo"];
25880 };
25881 };
25882 responses: {
25883 /** Response */
25884 201: {
25885 content: {
25886 "application/json": components["schemas"]["project"];
25887 };
25888 };
25889 401: components["responses"]["requires_authentication"];
25890 403: components["responses"]["forbidden"];
25891 404: components["responses"]["not_found"];
25892 410: components["responses"]["gone"];
25893 422: components["responses"]["validation_failed_simple"];
25894 };
25895 requestBody: {
25896 content: {
25897 "application/json": {
25898 /** The name of the project. */
25899 name: string;
25900 /** The description of the project. */
25901 body?: string;
25902 };
25903 };
25904 };
25905 };
25906 /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */
25907 "pulls/list": {
25908 parameters: {
25909 path: {
25910 owner: components["parameters"]["owner"];
25911 repo: components["parameters"]["repo"];
25912 };
25913 query: {
25914 /** Either `open`, `closed`, or `all` to filter by state. */
25915 state?: "open" | "closed" | "all";
25916 /** Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */
25917 head?: string;
25918 /** Filter pulls by base branch name. Example: `gh-pages`. */
25919 base?: string;
25920 /** What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */
25921 sort?: "created" | "updated" | "popularity" | "long-running";
25922 /** The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */
25923 direction?: "asc" | "desc";
25924 /** Results per page (max 100). */
25925 per_page?: components["parameters"]["per_page"];
25926 /** Page number of the results to fetch. */
25927 page?: components["parameters"]["page"];
25928 };
25929 };
25930 responses: {
25931 /** Response */
25932 200: {
25933 headers: {};
25934 content: {
25935 "application/json": components["schemas"]["pull-request-simple"][];
25936 };
25937 };
25938 304: components["responses"]["not_modified"];
25939 422: components["responses"]["validation_failed"];
25940 };
25941 };
25942 /**
25943 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
25944 *
25945 * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
25946 *
25947 * You can create a new pull request.
25948 *
25949 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
25950 */
25951 "pulls/create": {
25952 parameters: {
25953 path: {
25954 owner: components["parameters"]["owner"];
25955 repo: components["parameters"]["repo"];
25956 };
25957 };
25958 responses: {
25959 /** Response */
25960 201: {
25961 headers: {
25962 Location?: string;
25963 };
25964 content: {
25965 "application/json": components["schemas"]["pull-request"];
25966 };
25967 };
25968 403: components["responses"]["forbidden"];
25969 422: components["responses"]["validation_failed"];
25970 };
25971 requestBody: {
25972 content: {
25973 "application/json": {
25974 /** The title of the new pull request. */
25975 title?: string;
25976 /** The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */
25977 head: string;
25978 /** The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */
25979 base: string;
25980 /** The contents of the pull request. */
25981 body?: string;
25982 /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */
25983 maintainer_can_modify?: boolean;
25984 /** Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */
25985 draft?: boolean;
25986 issue?: number;
25987 };
25988 };
25989 };
25990 };
25991 /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */
25992 "pulls/list-review-comments-for-repo": {
25993 parameters: {
25994 path: {
25995 owner: components["parameters"]["owner"];
25996 repo: components["parameters"]["repo"];
25997 };
25998 query: {
25999 sort?: "created" | "updated" | "created_at";
26000 /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */
26001 direction?: "asc" | "desc";
26002 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
26003 since?: components["parameters"]["since"];
26004 /** Results per page (max 100). */
26005 per_page?: components["parameters"]["per_page"];
26006 /** Page number of the results to fetch. */
26007 page?: components["parameters"]["page"];
26008 };
26009 };
26010 responses: {
26011 /** Response */
26012 200: {
26013 headers: {};
26014 content: {
26015 "application/json": components["schemas"]["pull-request-review-comment"][];
26016 };
26017 };
26018 };
26019 };
26020 /** Provides details for a review comment. */
26021 "pulls/get-review-comment": {
26022 parameters: {
26023 path: {
26024 owner: components["parameters"]["owner"];
26025 repo: components["parameters"]["repo"];
26026 /** comment_id parameter */
26027 comment_id: components["parameters"]["comment_id"];
26028 };
26029 };
26030 responses: {
26031 /** Response */
26032 200: {
26033 content: {
26034 "application/json": components["schemas"]["pull-request-review-comment"];
26035 };
26036 };
26037 404: components["responses"]["not_found"];
26038 };
26039 };
26040 /** Deletes a review comment. */
26041 "pulls/delete-review-comment": {
26042 parameters: {
26043 path: {
26044 owner: components["parameters"]["owner"];
26045 repo: components["parameters"]["repo"];
26046 /** comment_id parameter */
26047 comment_id: components["parameters"]["comment_id"];
26048 };
26049 };
26050 responses: {
26051 /** Response */
26052 204: never;
26053 404: components["responses"]["not_found"];
26054 };
26055 };
26056 /** Enables you to edit a review comment. */
26057 "pulls/update-review-comment": {
26058 parameters: {
26059 path: {
26060 owner: components["parameters"]["owner"];
26061 repo: components["parameters"]["repo"];
26062 /** comment_id parameter */
26063 comment_id: components["parameters"]["comment_id"];
26064 };
26065 };
26066 responses: {
26067 /** Response */
26068 200: {
26069 content: {
26070 "application/json": components["schemas"]["pull-request-review-comment"];
26071 };
26072 };
26073 };
26074 requestBody: {
26075 content: {
26076 "application/json": {
26077 /** The text of the reply to the review comment. */
26078 body: string;
26079 };
26080 };
26081 };
26082 };
26083 /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */
26084 "reactions/list-for-pull-request-review-comment": {
26085 parameters: {
26086 path: {
26087 owner: components["parameters"]["owner"];
26088 repo: components["parameters"]["repo"];
26089 /** comment_id parameter */
26090 comment_id: components["parameters"]["comment_id"];
26091 };
26092 query: {
26093 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */
26094 content?:
26095 | "+1"
26096 | "-1"
26097 | "laugh"
26098 | "confused"
26099 | "heart"
26100 | "hooray"
26101 | "rocket"
26102 | "eyes";
26103 /** Results per page (max 100). */
26104 per_page?: components["parameters"]["per_page"];
26105 /** Page number of the results to fetch. */
26106 page?: components["parameters"]["page"];
26107 };
26108 };
26109 responses: {
26110 /** Response */
26111 200: {
26112 headers: {};
26113 content: {
26114 "application/json": components["schemas"]["reaction"][];
26115 };
26116 };
26117 404: components["responses"]["not_found"];
26118 415: components["responses"]["preview_header_missing"];
26119 };
26120 };
26121 /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */
26122 "reactions/create-for-pull-request-review-comment": {
26123 parameters: {
26124 path: {
26125 owner: components["parameters"]["owner"];
26126 repo: components["parameters"]["repo"];
26127 /** comment_id parameter */
26128 comment_id: components["parameters"]["comment_id"];
26129 };
26130 };
26131 responses: {
26132 /** Reaction exists */
26133 200: {
26134 content: {
26135 "application/json": components["schemas"]["reaction"];
26136 };
26137 };
26138 /** Reaction created */
26139 201: {
26140 content: {
26141 "application/json": components["schemas"]["reaction"];
26142 };
26143 };
26144 415: components["responses"]["preview_header_missing"];
26145 422: components["responses"]["validation_failed"];
26146 };
26147 requestBody: {
26148 content: {
26149 "application/json": {
26150 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. */
26151 content:
26152 | "+1"
26153 | "-1"
26154 | "laugh"
26155 | "confused"
26156 | "heart"
26157 | "hooray"
26158 | "rocket"
26159 | "eyes";
26160 };
26161 };
26162 };
26163 };
26164 /**
26165 * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`
26166 *
26167 * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).
26168 */
26169 "reactions/delete-for-pull-request-comment": {
26170 parameters: {
26171 path: {
26172 owner: components["parameters"]["owner"];
26173 repo: components["parameters"]["repo"];
26174 /** comment_id parameter */
26175 comment_id: components["parameters"]["comment_id"];
26176 reaction_id: components["parameters"]["reaction-id"];
26177 };
26178 };
26179 responses: {
26180 /** Response */
26181 204: never;
26182 };
26183 };
26184 /**
26185 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
26186 *
26187 * Lists details of a pull request by providing its number.
26188 *
26189 * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
26190 *
26191 * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.
26192 *
26193 * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:
26194 *
26195 * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.
26196 * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.
26197 * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.
26198 *
26199 * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
26200 */
26201 "pulls/get": {
26202 parameters: {
26203 path: {
26204 owner: components["parameters"]["owner"];
26205 repo: components["parameters"]["repo"];
26206 pull_number: components["parameters"]["pull-number"];
26207 };
26208 };
26209 responses: {
26210 /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */
26211 200: {
26212 content: {
26213 "application/json": components["schemas"]["pull-request"];
26214 };
26215 };
26216 304: components["responses"]["not_modified"];
26217 404: components["responses"]["not_found"];
26218 500: components["responses"]["internal_error"];
26219 };
26220 };
26221 /**
26222 * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
26223 *
26224 * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
26225 */
26226 "pulls/update": {
26227 parameters: {
26228 path: {
26229 owner: components["parameters"]["owner"];
26230 repo: components["parameters"]["repo"];
26231 pull_number: components["parameters"]["pull-number"];
26232 };
26233 };
26234 responses: {
26235 /** Response */
26236 200: {
26237 content: {
26238 "application/json": components["schemas"]["pull-request"];
26239 };
26240 };
26241 403: components["responses"]["forbidden"];
26242 422: components["responses"]["validation_failed"];
26243 };
26244 requestBody: {
26245 content: {
26246 "application/json": {
26247 /** The title of the pull request. */
26248 title?: string;
26249 /** The contents of the pull request. */
26250 body?: string;
26251 /** State of this Pull Request. Either `open` or `closed`. */
26252 state?: "open" | "closed";
26253 /** The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */
26254 base?: string;
26255 /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */
26256 maintainer_can_modify?: boolean;
26257 };
26258 };
26259 };
26260 };
26261 /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */
26262 "pulls/list-review-comments": {
26263 parameters: {
26264 path: {
26265 owner: components["parameters"]["owner"];
26266 repo: components["parameters"]["repo"];
26267 pull_number: components["parameters"]["pull-number"];
26268 };
26269 query: {
26270 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
26271 sort?: components["parameters"]["sort"];
26272 /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */
26273 direction?: "asc" | "desc";
26274 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
26275 since?: components["parameters"]["since"];
26276 /** Results per page (max 100). */
26277 per_page?: components["parameters"]["per_page"];
26278 /** Page number of the results to fetch. */
26279 page?: components["parameters"]["page"];
26280 };
26281 };
26282 responses: {
26283 /** Response */
26284 200: {
26285 headers: {};
26286 content: {
26287 "application/json": components["schemas"]["pull-request-review-comment"][];
26288 };
26289 };
26290 };
26291 };
26292 /**
26293 * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff.
26294 *
26295 * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices).
26296 *
26297 * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
26298 *
26299 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
26300 */
26301 "pulls/create-review-comment": {
26302 parameters: {
26303 path: {
26304 owner: components["parameters"]["owner"];
26305 repo: components["parameters"]["repo"];
26306 pull_number: components["parameters"]["pull-number"];
26307 };
26308 };
26309 responses: {
26310 /** Response */
26311 201: {
26312 headers: {
26313 Location?: string;
26314 };
26315 content: {
26316 "application/json": components["schemas"]["pull-request-review-comment"];
26317 };
26318 };
26319 403: components["responses"]["forbidden"];
26320 422: components["responses"]["validation_failed"];
26321 };
26322 requestBody: {
26323 content: {
26324 "application/json": {
26325 /** The text of the review comment. */
26326 body: string;
26327 /** The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */
26328 commit_id?: string;
26329 /** The relative path to the file that necessitates a comment. */
26330 path?: string;
26331 /** **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */
26332 position?: number;
26333 /** **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */
26334 side?: "LEFT" | "RIGHT";
26335 /** **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */
26336 line?: number;
26337 /** **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */
26338 start_line?: number;
26339 /** **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */
26340 start_side?: "LEFT" | "RIGHT" | "side";
26341 in_reply_to?: number;
26342 };
26343 };
26344 };
26345 };
26346 /**
26347 * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.
26348 *
26349 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
26350 */
26351 "pulls/create-reply-for-review-comment": {
26352 parameters: {
26353 path: {
26354 owner: components["parameters"]["owner"];
26355 repo: components["parameters"]["repo"];
26356 pull_number: components["parameters"]["pull-number"];
26357 /** comment_id parameter */
26358 comment_id: components["parameters"]["comment_id"];
26359 };
26360 };
26361 responses: {
26362 /** Response */
26363 201: {
26364 headers: {
26365 Location?: string;
26366 };
26367 content: {
26368 "application/json": components["schemas"]["pull-request-review-comment"];
26369 };
26370 };
26371 404: components["responses"]["not_found"];
26372 };
26373 requestBody: {
26374 content: {
26375 "application/json": {
26376 /** The text of the review comment. */
26377 body: string;
26378 };
26379 };
26380 };
26381 };
26382 /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */
26383 "pulls/list-commits": {
26384 parameters: {
26385 path: {
26386 owner: components["parameters"]["owner"];
26387 repo: components["parameters"]["repo"];
26388 pull_number: components["parameters"]["pull-number"];
26389 };
26390 query: {
26391 /** Results per page (max 100). */
26392 per_page?: components["parameters"]["per_page"];
26393 /** Page number of the results to fetch. */
26394 page?: components["parameters"]["page"];
26395 };
26396 };
26397 responses: {
26398 /** Response */
26399 200: {
26400 headers: {};
26401 content: {
26402 "application/json": components["schemas"]["commit"][];
26403 };
26404 };
26405 };
26406 };
26407 /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */
26408 "pulls/list-files": {
26409 parameters: {
26410 path: {
26411 owner: components["parameters"]["owner"];
26412 repo: components["parameters"]["repo"];
26413 pull_number: components["parameters"]["pull-number"];
26414 };
26415 query: {
26416 /** Results per page (max 100). */
26417 per_page?: components["parameters"]["per_page"];
26418 /** Page number of the results to fetch. */
26419 page?: components["parameters"]["page"];
26420 };
26421 };
26422 responses: {
26423 /** Response */
26424 200: {
26425 headers: {};
26426 content: {
26427 "application/json": components["schemas"]["diff-entry"][];
26428 };
26429 };
26430 422: components["responses"]["validation_failed"];
26431 500: components["responses"]["internal_error"];
26432 };
26433 };
26434 "pulls/check-if-merged": {
26435 parameters: {
26436 path: {
26437 owner: components["parameters"]["owner"];
26438 repo: components["parameters"]["repo"];
26439 pull_number: components["parameters"]["pull-number"];
26440 };
26441 };
26442 responses: {
26443 /** Response if pull request has been merged */
26444 204: never;
26445 /** Not Found if pull request has not been merged */
26446 404: unknown;
26447 };
26448 };
26449 /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
26450 "pulls/merge": {
26451 parameters: {
26452 path: {
26453 owner: components["parameters"]["owner"];
26454 repo: components["parameters"]["repo"];
26455 pull_number: components["parameters"]["pull-number"];
26456 };
26457 };
26458 responses: {
26459 /** if merge was successful */
26460 200: {
26461 content: {
26462 "application/json": components["schemas"]["pull-request-merge-result"];
26463 };
26464 };
26465 403: components["responses"]["forbidden"];
26466 404: components["responses"]["not_found"];
26467 /** Method Not Allowed if merge cannot be performed */
26468 405: {
26469 content: {
26470 "application/json": {
26471 message?: string;
26472 documentation_url?: string;
26473 };
26474 };
26475 };
26476 /** Conflict if sha was provided and pull request head did not match */
26477 409: {
26478 content: {
26479 "application/json": {
26480 message?: string;
26481 documentation_url?: string;
26482 };
26483 };
26484 };
26485 422: components["responses"]["validation_failed"];
26486 };
26487 requestBody: {
26488 content: {
26489 "application/json": {
26490 /** Title for the automatic commit message. */
26491 commit_title?: string;
26492 /** Extra detail to append to automatic commit message. */
26493 commit_message?: string;
26494 /** SHA that pull request head must match to allow merge. */
26495 sha?: string;
26496 /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */
26497 merge_method?: "merge" | "squash" | "rebase";
26498 } | null;
26499 };
26500 };
26501 };
26502 "pulls/list-requested-reviewers": {
26503 parameters: {
26504 path: {
26505 owner: components["parameters"]["owner"];
26506 repo: components["parameters"]["repo"];
26507 pull_number: components["parameters"]["pull-number"];
26508 };
26509 query: {
26510 /** Results per page (max 100). */
26511 per_page?: components["parameters"]["per_page"];
26512 /** Page number of the results to fetch. */
26513 page?: components["parameters"]["page"];
26514 };
26515 };
26516 responses: {
26517 /** Response */
26518 200: {
26519 headers: {};
26520 content: {
26521 "application/json": components["schemas"]["pull-request-review-request"];
26522 };
26523 };
26524 };
26525 };
26526 /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */
26527 "pulls/request-reviewers": {
26528 parameters: {
26529 path: {
26530 owner: components["parameters"]["owner"];
26531 repo: components["parameters"]["repo"];
26532 pull_number: components["parameters"]["pull-number"];
26533 };
26534 };
26535 responses: {
26536 /** Response */
26537 201: {
26538 content: {
26539 "application/json": components["schemas"]["pull-request-simple"];
26540 };
26541 };
26542 403: components["responses"]["forbidden"];
26543 /** Unprocessable Entity if user is not a collaborator */
26544 422: unknown;
26545 };
26546 requestBody: {
26547 content: {
26548 "application/json": {
26549 /** An array of user `login`s that will be requested. */
26550 reviewers?: string[];
26551 /** An array of team `slug`s that will be requested. */
26552 team_reviewers?: string[];
26553 };
26554 };
26555 };
26556 };
26557 "pulls/remove-requested-reviewers": {
26558 parameters: {
26559 path: {
26560 owner: components["parameters"]["owner"];
26561 repo: components["parameters"]["repo"];
26562 pull_number: components["parameters"]["pull-number"];
26563 };
26564 };
26565 responses: {
26566 /** Response */
26567 200: {
26568 content: {
26569 "application/json": components["schemas"]["pull-request-simple"];
26570 };
26571 };
26572 422: components["responses"]["validation_failed"];
26573 };
26574 requestBody: {
26575 content: {
26576 "application/json": {
26577 /** An array of user `login`s that will be removed. */
26578 reviewers: string[];
26579 /** An array of team `slug`s that will be removed. */
26580 team_reviewers?: string[];
26581 };
26582 };
26583 };
26584 };
26585 /** The list of reviews returns in chronological order. */
26586 "pulls/list-reviews": {
26587 parameters: {
26588 path: {
26589 owner: components["parameters"]["owner"];
26590 repo: components["parameters"]["repo"];
26591 pull_number: components["parameters"]["pull-number"];
26592 };
26593 query: {
26594 /** Results per page (max 100). */
26595 per_page?: components["parameters"]["per_page"];
26596 /** Page number of the results to fetch. */
26597 page?: components["parameters"]["page"];
26598 };
26599 };
26600 responses: {
26601 /** The list of reviews returns in chronological order. */
26602 200: {
26603 headers: {};
26604 content: {
26605 "application/json": components["schemas"]["pull-request-review"][];
26606 };
26607 };
26608 };
26609 };
26610 /**
26611 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
26612 *
26613 * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.
26614 *
26615 * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint.
26616 *
26617 * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
26618 */
26619 "pulls/create-review": {
26620 parameters: {
26621 path: {
26622 owner: components["parameters"]["owner"];
26623 repo: components["parameters"]["repo"];
26624 pull_number: components["parameters"]["pull-number"];
26625 };
26626 };
26627 responses: {
26628 /** Response */
26629 200: {
26630 content: {
26631 "application/json": components["schemas"]["pull-request-review"];
26632 };
26633 };
26634 403: components["responses"]["forbidden"];
26635 422: components["responses"]["validation_failed_simple"];
26636 };
26637 requestBody: {
26638 content: {
26639 "application/json": {
26640 /** The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */
26641 commit_id?: string;
26642 /** **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */
26643 body?: string;
26644 /** The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. */
26645 event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
26646 /** Use the following table to specify the location, destination, and contents of the draft review comment. */
26647 comments?: {
26648 /** The relative path to the file that necessitates a review comment. */
26649 path: string;
26650 /** The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */
26651 position?: number;
26652 /** Text of the review comment. */
26653 body: string;
26654 line?: number;
26655 side?: string;
26656 start_line?: number;
26657 start_side?: string;
26658 }[];
26659 };
26660 };
26661 };
26662 };
26663 "pulls/get-review": {
26664 parameters: {
26665 path: {
26666 owner: components["parameters"]["owner"];
26667 repo: components["parameters"]["repo"];
26668 pull_number: components["parameters"]["pull-number"];
26669 /** review_id parameter */
26670 review_id: components["parameters"]["review_id"];
26671 };
26672 };
26673 responses: {
26674 /** Response */
26675 200: {
26676 content: {
26677 "application/json": components["schemas"]["pull-request-review"];
26678 };
26679 };
26680 404: components["responses"]["not_found"];
26681 };
26682 };
26683 /** Update the review summary comment with new text. */
26684 "pulls/update-review": {
26685 parameters: {
26686 path: {
26687 owner: components["parameters"]["owner"];
26688 repo: components["parameters"]["repo"];
26689 pull_number: components["parameters"]["pull-number"];
26690 /** review_id parameter */
26691 review_id: components["parameters"]["review_id"];
26692 };
26693 };
26694 responses: {
26695 /** Response */
26696 200: {
26697 content: {
26698 "application/json": components["schemas"]["pull-request-review"];
26699 };
26700 };
26701 422: components["responses"]["validation_failed_simple"];
26702 };
26703 requestBody: {
26704 content: {
26705 "application/json": {
26706 /** The body text of the pull request review. */
26707 body: string;
26708 };
26709 };
26710 };
26711 };
26712 "pulls/delete-pending-review": {
26713 parameters: {
26714 path: {
26715 owner: components["parameters"]["owner"];
26716 repo: components["parameters"]["repo"];
26717 pull_number: components["parameters"]["pull-number"];
26718 /** review_id parameter */
26719 review_id: components["parameters"]["review_id"];
26720 };
26721 };
26722 responses: {
26723 /** Response */
26724 200: {
26725 content: {
26726 "application/json": components["schemas"]["pull-request-review"];
26727 };
26728 };
26729 404: components["responses"]["not_found"];
26730 422: components["responses"]["validation_failed_simple"];
26731 };
26732 };
26733 /** List comments for a specific pull request review. */
26734 "pulls/list-comments-for-review": {
26735 parameters: {
26736 path: {
26737 owner: components["parameters"]["owner"];
26738 repo: components["parameters"]["repo"];
26739 pull_number: components["parameters"]["pull-number"];
26740 /** review_id parameter */
26741 review_id: components["parameters"]["review_id"];
26742 };
26743 query: {
26744 /** Results per page (max 100). */
26745 per_page?: components["parameters"]["per_page"];
26746 /** Page number of the results to fetch. */
26747 page?: components["parameters"]["page"];
26748 };
26749 };
26750 responses: {
26751 /** Response */
26752 200: {
26753 headers: {};
26754 content: {
26755 "application/json": components["schemas"]["review-comment"][];
26756 };
26757 };
26758 404: components["responses"]["not_found"];
26759 };
26760 };
26761 /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */
26762 "pulls/dismiss-review": {
26763 parameters: {
26764 path: {
26765 owner: components["parameters"]["owner"];
26766 repo: components["parameters"]["repo"];
26767 pull_number: components["parameters"]["pull-number"];
26768 /** review_id parameter */
26769 review_id: components["parameters"]["review_id"];
26770 };
26771 };
26772 responses: {
26773 /** Response */
26774 200: {
26775 content: {
26776 "application/json": components["schemas"]["pull-request-review"];
26777 };
26778 };
26779 404: components["responses"]["not_found"];
26780 422: components["responses"]["validation_failed_simple"];
26781 };
26782 requestBody: {
26783 content: {
26784 "application/json": {
26785 /** The message for the pull request review dismissal */
26786 message: string;
26787 event?: string;
26788 };
26789 };
26790 };
26791 };
26792 "pulls/submit-review": {
26793 parameters: {
26794 path: {
26795 owner: components["parameters"]["owner"];
26796 repo: components["parameters"]["repo"];
26797 pull_number: components["parameters"]["pull-number"];
26798 /** review_id parameter */
26799 review_id: components["parameters"]["review_id"];
26800 };
26801 };
26802 responses: {
26803 /** Response */
26804 200: {
26805 content: {
26806 "application/json": components["schemas"]["pull-request-review"];
26807 };
26808 };
26809 403: components["responses"]["forbidden"];
26810 404: components["responses"]["not_found"];
26811 422: components["responses"]["validation_failed_simple"];
26812 };
26813 requestBody: {
26814 content: {
26815 "application/json": {
26816 /** The body text of the pull request review */
26817 body?: string;
26818 /** The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. */
26819 event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
26820 };
26821 };
26822 };
26823 };
26824 /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */
26825 "pulls/update-branch": {
26826 parameters: {
26827 path: {
26828 owner: components["parameters"]["owner"];
26829 repo: components["parameters"]["repo"];
26830 pull_number: components["parameters"]["pull-number"];
26831 };
26832 };
26833 responses: {
26834 /** Response */
26835 202: {
26836 content: {
26837 "application/json": {
26838 message?: string;
26839 url?: string;
26840 };
26841 };
26842 };
26843 403: components["responses"]["forbidden"];
26844 415: components["responses"]["preview_header_missing"];
26845 422: components["responses"]["validation_failed"];
26846 };
26847 requestBody: {
26848 content: {
26849 "application/json": {
26850 /** The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */
26851 expected_head_sha?: string;
26852 } | null;
26853 };
26854 };
26855 };
26856 /**
26857 * Gets the preferred README for a repository.
26858 *
26859 * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
26860 */
26861 "repos/get-readme": {
26862 parameters: {
26863 path: {
26864 owner: components["parameters"]["owner"];
26865 repo: components["parameters"]["repo"];
26866 };
26867 query: {
26868 /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */
26869 ref?: string;
26870 };
26871 };
26872 responses: {
26873 /** Response */
26874 200: {
26875 content: {
26876 "application/json": components["schemas"]["content-file"];
26877 };
26878 };
26879 404: components["responses"]["not_found"];
26880 422: components["responses"]["validation_failed"];
26881 };
26882 };
26883 /**
26884 * Gets the README from a repository directory.
26885 *
26886 * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
26887 */
26888 "repos/get-readme-in-directory": {
26889 parameters: {
26890 path: {
26891 owner: components["parameters"]["owner"];
26892 repo: components["parameters"]["repo"];
26893 /** The alternate path to look for a README file */
26894 dir: string;
26895 };
26896 query: {
26897 /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */
26898 ref?: string;
26899 };
26900 };
26901 responses: {
26902 /** Response */
26903 200: {
26904 content: {
26905 "application/json": components["schemas"]["content-file"];
26906 };
26907 };
26908 404: components["responses"]["not_found"];
26909 422: components["responses"]["validation_failed"];
26910 };
26911 };
26912 /**
26913 * 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](https://docs.github.com/rest/reference/repos#list-repository-tags).
26914 *
26915 * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
26916 */
26917 "repos/list-releases": {
26918 parameters: {
26919 path: {
26920 owner: components["parameters"]["owner"];
26921 repo: components["parameters"]["repo"];
26922 };
26923 query: {
26924 /** Results per page (max 100). */
26925 per_page?: components["parameters"]["per_page"];
26926 /** Page number of the results to fetch. */
26927 page?: components["parameters"]["page"];
26928 };
26929 };
26930 responses: {
26931 /** Response */
26932 200: {
26933 headers: {};
26934 content: {
26935 "application/json": components["schemas"]["release"][];
26936 };
26937 };
26938 404: components["responses"]["not_found"];
26939 };
26940 };
26941 /**
26942 * Users with push access to the repository can create a release.
26943 *
26944 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
26945 */
26946 "repos/create-release": {
26947 parameters: {
26948 path: {
26949 owner: components["parameters"]["owner"];
26950 repo: components["parameters"]["repo"];
26951 };
26952 };
26953 responses: {
26954 /** Response */
26955 201: {
26956 headers: {
26957 Location?: string;
26958 };
26959 content: {
26960 "application/json": components["schemas"]["release"];
26961 };
26962 };
26963 /** Not Found if the discussion category name is invalid */
26964 404: {
26965 content: {
26966 "application/json": components["schemas"]["basic-error"];
26967 };
26968 };
26969 422: components["responses"]["validation_failed"];
26970 };
26971 requestBody: {
26972 content: {
26973 "application/json": {
26974 /** The name of the tag. */
26975 tag_name: string;
26976 /** Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */
26977 target_commitish?: string;
26978 /** The name of the release. */
26979 name?: string;
26980 /** Text describing the contents of the tag. */
26981 body?: string;
26982 /** `true` to create a draft (unpublished) release, `false` to create a published one. */
26983 draft?: boolean;
26984 /** `true` to identify the release as a prerelease. `false` to identify the release as a full release. */
26985 prerelease?: boolean;
26986 /** If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */
26987 discussion_category_name?: string;
26988 };
26989 };
26990 };
26991 };
26992 /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). 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. */
26993 "repos/get-release-asset": {
26994 parameters: {
26995 path: {
26996 owner: components["parameters"]["owner"];
26997 repo: components["parameters"]["repo"];
26998 /** asset_id parameter */
26999 asset_id: components["parameters"]["asset_id"];
27000 };
27001 };
27002 responses: {
27003 /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). 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. */
27004 200: {
27005 content: {
27006 "application/json": components["schemas"]["release-asset"];
27007 };
27008 };
27009 302: components["responses"]["found"];
27010 404: components["responses"]["not_found"];
27011 415: components["responses"]["preview_header_missing"];
27012 };
27013 };
27014 "repos/delete-release-asset": {
27015 parameters: {
27016 path: {
27017 owner: components["parameters"]["owner"];
27018 repo: components["parameters"]["repo"];
27019 /** asset_id parameter */
27020 asset_id: components["parameters"]["asset_id"];
27021 };
27022 };
27023 responses: {
27024 /** Response */
27025 204: never;
27026 };
27027 };
27028 /** Users with push access to the repository can edit a release asset. */
27029 "repos/update-release-asset": {
27030 parameters: {
27031 path: {
27032 owner: components["parameters"]["owner"];
27033 repo: components["parameters"]["repo"];
27034 /** asset_id parameter */
27035 asset_id: components["parameters"]["asset_id"];
27036 };
27037 };
27038 responses: {
27039 /** Response */
27040 200: {
27041 content: {
27042 "application/json": components["schemas"]["release-asset"];
27043 };
27044 };
27045 };
27046 requestBody: {
27047 content: {
27048 "application/json": {
27049 /** The file name of the asset. */
27050 name?: string;
27051 /** An alternate short description of the asset. Used in place of the filename. */
27052 label?: string;
27053 state?: string;
27054 };
27055 };
27056 };
27057 };
27058 /**
27059 * View the latest published full release for the repository.
27060 *
27061 * 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.
27062 */
27063 "repos/get-latest-release": {
27064 parameters: {
27065 path: {
27066 owner: components["parameters"]["owner"];
27067 repo: components["parameters"]["repo"];
27068 };
27069 };
27070 responses: {
27071 /** Response */
27072 200: {
27073 content: {
27074 "application/json": components["schemas"]["release"];
27075 };
27076 };
27077 };
27078 };
27079 /** Get a published release with the specified tag. */
27080 "repos/get-release-by-tag": {
27081 parameters: {
27082 path: {
27083 owner: components["parameters"]["owner"];
27084 repo: components["parameters"]["repo"];
27085 /** tag parameter */
27086 tag: string;
27087 };
27088 };
27089 responses: {
27090 /** Response */
27091 200: {
27092 content: {
27093 "application/json": components["schemas"]["release"];
27094 };
27095 };
27096 404: components["responses"]["not_found"];
27097 };
27098 };
27099 /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */
27100 "repos/get-release": {
27101 parameters: {
27102 path: {
27103 owner: components["parameters"]["owner"];
27104 repo: components["parameters"]["repo"];
27105 /** release_id parameter */
27106 release_id: components["parameters"]["release_id"];
27107 };
27108 };
27109 responses: {
27110 /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */
27111 200: {
27112 content: {
27113 "application/json": components["schemas"]["release"];
27114 };
27115 };
27116 404: components["responses"]["not_found"];
27117 };
27118 };
27119 /** Users with push access to the repository can delete a release. */
27120 "repos/delete-release": {
27121 parameters: {
27122 path: {
27123 owner: components["parameters"]["owner"];
27124 repo: components["parameters"]["repo"];
27125 /** release_id parameter */
27126 release_id: components["parameters"]["release_id"];
27127 };
27128 };
27129 responses: {
27130 /** Response */
27131 204: never;
27132 };
27133 };
27134 /** Users with push access to the repository can edit a release. */
27135 "repos/update-release": {
27136 parameters: {
27137 path: {
27138 owner: components["parameters"]["owner"];
27139 repo: components["parameters"]["repo"];
27140 /** release_id parameter */
27141 release_id: components["parameters"]["release_id"];
27142 };
27143 };
27144 responses: {
27145 /** Response */
27146 200: {
27147 content: {
27148 "application/json": components["schemas"]["release"];
27149 };
27150 };
27151 /** Not Found if the discussion category name is invalid */
27152 404: {
27153 content: {
27154 "application/json": components["schemas"]["basic-error"];
27155 };
27156 };
27157 };
27158 requestBody: {
27159 content: {
27160 "application/json": {
27161 /** The name of the tag. */
27162 tag_name?: string;
27163 /** Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */
27164 target_commitish?: string;
27165 /** The name of the release. */
27166 name?: string;
27167 /** Text describing the contents of the tag. */
27168 body?: string;
27169 /** `true` makes the release a draft, and `false` publishes the release. */
27170 draft?: boolean;
27171 /** `true` to identify the release as a prerelease, `false` to identify the release as a full release. */
27172 prerelease?: boolean;
27173 /** If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */
27174 discussion_category_name?: string;
27175 };
27176 };
27177 };
27178 };
27179 "repos/list-release-assets": {
27180 parameters: {
27181 path: {
27182 owner: components["parameters"]["owner"];
27183 repo: components["parameters"]["repo"];
27184 /** release_id parameter */
27185 release_id: components["parameters"]["release_id"];
27186 };
27187 query: {
27188 /** Results per page (max 100). */
27189 per_page?: components["parameters"]["per_page"];
27190 /** Page number of the results to fetch. */
27191 page?: components["parameters"]["page"];
27192 };
27193 };
27194 responses: {
27195 /** Response */
27196 200: {
27197 headers: {};
27198 content: {
27199 "application/json": components["schemas"]["release-asset"][];
27200 };
27201 };
27202 };
27203 };
27204 /**
27205 * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in
27206 * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset.
27207 *
27208 * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.
27209 *
27210 * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example:
27211 *
27212 * `application/zip`
27213 *
27214 * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,
27215 * you'll still need to pass your authentication to be able to upload an asset.
27216 *
27217 * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.
27218 *
27219 * **Notes:**
27220 * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)"
27221 * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact).
27222 * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.
27223 */
27224 "repos/upload-release-asset": {
27225 parameters: {
27226 path: {
27227 owner: components["parameters"]["owner"];
27228 repo: components["parameters"]["repo"];
27229 /** release_id parameter */
27230 release_id: components["parameters"]["release_id"];
27231 };
27232 query: {
27233 name?: string;
27234 label?: string;
27235 };
27236 };
27237 responses: {
27238 /** Response for successful upload */
27239 201: {
27240 content: {
27241 "application/json": components["schemas"]["release-asset"];
27242 };
27243 };
27244 };
27245 requestBody: {
27246 content: {
27247 "*/*": string;
27248 };
27249 };
27250 };
27251 /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */
27252 "reactions/create-for-release": {
27253 parameters: {
27254 path: {
27255 owner: components["parameters"]["owner"];
27256 repo: components["parameters"]["repo"];
27257 /** release_id parameter */
27258 release_id: components["parameters"]["release_id"];
27259 };
27260 };
27261 responses: {
27262 /** Reaction exists */
27263 200: {
27264 content: {
27265 "application/json": components["schemas"]["reaction"];
27266 };
27267 };
27268 /** Reaction created */
27269 201: {
27270 content: {
27271 "application/json": components["schemas"]["reaction"];
27272 };
27273 };
27274 415: components["responses"]["preview_header_missing"];
27275 422: components["responses"]["validation_failed"];
27276 };
27277 requestBody: {
27278 content: {
27279 "application/json": {
27280 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. */
27281 content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes";
27282 };
27283 };
27284 };
27285 };
27286 /**
27287 * Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
27288 *
27289 * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
27290 */
27291 "secret-scanning/list-alerts-for-repo": {
27292 parameters: {
27293 path: {
27294 owner: components["parameters"]["owner"];
27295 repo: components["parameters"]["repo"];
27296 };
27297 query: {
27298 /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */
27299 state?: "open" | "resolved";
27300 /** A comma separated list of secret types to return. By default all secret types are returned. */
27301 secret_type?: string;
27302 /** Page number of the results to fetch. */
27303 page?: components["parameters"]["page"];
27304 /** Results per page (max 100). */
27305 per_page?: components["parameters"]["per_page"];
27306 };
27307 };
27308 responses: {
27309 /** Response */
27310 200: {
27311 content: {
27312 "application/json": components["schemas"]["secret-scanning-alert"][];
27313 };
27314 };
27315 /** Repository is public or secret scanning is disabled for the repository */
27316 404: unknown;
27317 503: components["responses"]["service_unavailable"];
27318 };
27319 };
27320 /**
27321 * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
27322 *
27323 * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
27324 */
27325 "secret-scanning/get-alert": {
27326 parameters: {
27327 path: {
27328 owner: components["parameters"]["owner"];
27329 repo: components["parameters"]["repo"];
27330 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
27331 alert_number: components["parameters"]["alert_number"];
27332 };
27333 };
27334 responses: {
27335 /** Response */
27336 200: {
27337 content: {
27338 "application/json": components["schemas"]["secret-scanning-alert"];
27339 };
27340 };
27341 /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */
27342 404: unknown;
27343 503: components["responses"]["service_unavailable"];
27344 };
27345 };
27346 /**
27347 * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
27348 *
27349 * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.
27350 */
27351 "secret-scanning/update-alert": {
27352 parameters: {
27353 path: {
27354 owner: components["parameters"]["owner"];
27355 repo: components["parameters"]["repo"];
27356 /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */
27357 alert_number: components["parameters"]["alert_number"];
27358 };
27359 };
27360 responses: {
27361 /** Response */
27362 200: {
27363 content: {
27364 "application/json": components["schemas"]["secret-scanning-alert"];
27365 };
27366 };
27367 /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */
27368 404: unknown;
27369 /** State does not match the resolution */
27370 422: unknown;
27371 503: components["responses"]["service_unavailable"];
27372 };
27373 requestBody: {
27374 content: {
27375 "application/json": {
27376 state: components["schemas"]["secret-scanning-alert-state"];
27377 resolution?: components["schemas"]["secret-scanning-alert-resolution"];
27378 };
27379 };
27380 };
27381 };
27382 /**
27383 * Lists the people that have starred the repository.
27384 *
27385 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
27386 */
27387 "activity/list-stargazers-for-repo": {
27388 parameters: {
27389 path: {
27390 owner: components["parameters"]["owner"];
27391 repo: components["parameters"]["repo"];
27392 };
27393 query: {
27394 /** Results per page (max 100). */
27395 per_page?: components["parameters"]["per_page"];
27396 /** Page number of the results to fetch. */
27397 page?: components["parameters"]["page"];
27398 };
27399 };
27400 responses: {
27401 /** Response */
27402 200: {
27403 headers: {};
27404 content: {
27405 "application/json": Partial<components["schemas"]["simple-user"][]> &
27406 Partial<components["schemas"]["stargazer"][]>;
27407 };
27408 };
27409 422: components["responses"]["validation_failed"];
27410 };
27411 };
27412 /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */
27413 "repos/get-code-frequency-stats": {
27414 parameters: {
27415 path: {
27416 owner: components["parameters"]["owner"];
27417 repo: components["parameters"]["repo"];
27418 };
27419 };
27420 responses: {
27421 /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */
27422 200: {
27423 content: {
27424 "application/json": components["schemas"]["code-frequency-stat"][];
27425 };
27426 };
27427 202: components["responses"]["accepted"];
27428 204: components["responses"]["no_content"];
27429 };
27430 };
27431 /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */
27432 "repos/get-commit-activity-stats": {
27433 parameters: {
27434 path: {
27435 owner: components["parameters"]["owner"];
27436 repo: components["parameters"]["repo"];
27437 };
27438 };
27439 responses: {
27440 /** Response */
27441 200: {
27442 content: {
27443 "application/json": components["schemas"]["commit-activity"][];
27444 };
27445 };
27446 202: components["responses"]["accepted"];
27447 204: components["responses"]["no_content"];
27448 };
27449 };
27450 /**
27451 * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:
27452 *
27453 * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
27454 * * `a` - Number of additions
27455 * * `d` - Number of deletions
27456 * * `c` - Number of commits
27457 */
27458 "repos/get-contributors-stats": {
27459 parameters: {
27460 path: {
27461 owner: components["parameters"]["owner"];
27462 repo: components["parameters"]["repo"];
27463 };
27464 };
27465 responses: {
27466 /**
27467 * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
27468 * * `a` - Number of additions
27469 * * `d` - Number of deletions
27470 * * `c` - Number of commits
27471 */
27472 200: {
27473 content: {
27474 "application/json": components["schemas"]["contributor-activity"][];
27475 };
27476 };
27477 202: components["responses"]["accepted"];
27478 204: components["responses"]["no_content"];
27479 };
27480 };
27481 /**
27482 * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.
27483 *
27484 * The array order is oldest week (index 0) to most recent week.
27485 */
27486 "repos/get-participation-stats": {
27487 parameters: {
27488 path: {
27489 owner: components["parameters"]["owner"];
27490 repo: components["parameters"]["repo"];
27491 };
27492 };
27493 responses: {
27494 /** The array order is oldest week (index 0) to most recent week. */
27495 200: {
27496 content: {
27497 "application/json": components["schemas"]["participation-stats"];
27498 };
27499 };
27500 404: components["responses"]["not_found"];
27501 };
27502 };
27503 /**
27504 * Each array contains the day number, hour number, and number of commits:
27505 *
27506 * * `0-6`: Sunday - Saturday
27507 * * `0-23`: Hour of day
27508 * * Number of commits
27509 *
27510 * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
27511 */
27512 "repos/get-punch-card-stats": {
27513 parameters: {
27514 path: {
27515 owner: components["parameters"]["owner"];
27516 repo: components["parameters"]["repo"];
27517 };
27518 };
27519 responses: {
27520 /** For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. */
27521 200: {
27522 content: {
27523 "application/json": components["schemas"]["code-frequency-stat"][];
27524 };
27525 };
27526 204: components["responses"]["no_content"];
27527 };
27528 };
27529 /**
27530 * Users with push access in a repository can create commit statuses for a given SHA.
27531 *
27532 * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.
27533 */
27534 "repos/create-commit-status": {
27535 parameters: {
27536 path: {
27537 owner: components["parameters"]["owner"];
27538 repo: components["parameters"]["repo"];
27539 sha: string;
27540 };
27541 };
27542 responses: {
27543 /** Response */
27544 201: {
27545 headers: {
27546 Location?: string;
27547 };
27548 content: {
27549 "application/json": components["schemas"]["status"];
27550 };
27551 };
27552 };
27553 requestBody: {
27554 content: {
27555 "application/json": {
27556 /** The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. */
27557 state: "error" | "failure" | "pending" | "success";
27558 /**
27559 * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
27560 * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
27561 * `http://ci.example.com/user/repo/build/sha`
27562 */
27563 target_url?: string;
27564 /** A short description of the status. */
27565 description?: string;
27566 /** A string label to differentiate this status from the status of other systems. This field is case-insensitive. */
27567 context?: string;
27568 };
27569 };
27570 };
27571 };
27572 /** Lists the people watching the specified repository. */
27573 "activity/list-watchers-for-repo": {
27574 parameters: {
27575 path: {
27576 owner: components["parameters"]["owner"];
27577 repo: components["parameters"]["repo"];
27578 };
27579 query: {
27580 /** Results per page (max 100). */
27581 per_page?: components["parameters"]["per_page"];
27582 /** Page number of the results to fetch. */
27583 page?: components["parameters"]["page"];
27584 };
27585 };
27586 responses: {
27587 /** Response */
27588 200: {
27589 headers: {};
27590 content: {
27591 "application/json": components["schemas"]["simple-user"][];
27592 };
27593 };
27594 };
27595 };
27596 "activity/get-repo-subscription": {
27597 parameters: {
27598 path: {
27599 owner: components["parameters"]["owner"];
27600 repo: components["parameters"]["repo"];
27601 };
27602 };
27603 responses: {
27604 /** if you subscribe to the repository */
27605 200: {
27606 content: {
27607 "application/json": components["schemas"]["repository-subscription"];
27608 };
27609 };
27610 403: components["responses"]["forbidden"];
27611 /** Not Found if you don't subscribe to the repository */
27612 404: unknown;
27613 };
27614 };
27615 /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */
27616 "activity/set-repo-subscription": {
27617 parameters: {
27618 path: {
27619 owner: components["parameters"]["owner"];
27620 repo: components["parameters"]["repo"];
27621 };
27622 };
27623 responses: {
27624 /** Response */
27625 200: {
27626 content: {
27627 "application/json": components["schemas"]["repository-subscription"];
27628 };
27629 };
27630 };
27631 requestBody: {
27632 content: {
27633 "application/json": {
27634 /** Determines if notifications should be received from this repository. */
27635 subscribed?: boolean;
27636 /** Determines if all notifications should be blocked from this repository. */
27637 ignored?: boolean;
27638 };
27639 };
27640 };
27641 };
27642 /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */
27643 "activity/delete-repo-subscription": {
27644 parameters: {
27645 path: {
27646 owner: components["parameters"]["owner"];
27647 repo: components["parameters"]["repo"];
27648 };
27649 };
27650 responses: {
27651 /** Response */
27652 204: never;
27653 };
27654 };
27655 "repos/list-tags": {
27656 parameters: {
27657 path: {
27658 owner: components["parameters"]["owner"];
27659 repo: components["parameters"]["repo"];
27660 };
27661 query: {
27662 /** Results per page (max 100). */
27663 per_page?: components["parameters"]["per_page"];
27664 /** Page number of the results to fetch. */
27665 page?: components["parameters"]["page"];
27666 };
27667 };
27668 responses: {
27669 /** Response */
27670 200: {
27671 headers: {};
27672 content: {
27673 "application/json": components["schemas"]["tag"][];
27674 };
27675 };
27676 };
27677 };
27678 /**
27679 * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually
27680 * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
27681 * the `Location` header to make a second `GET` request.
27682 * **Note**: For private repositories, these links are temporary and expire after five minutes.
27683 */
27684 "repos/download-tarball-archive": {
27685 parameters: {
27686 path: {
27687 owner: components["parameters"]["owner"];
27688 repo: components["parameters"]["repo"];
27689 ref: string;
27690 };
27691 };
27692 responses: {
27693 /** Response */
27694 302: never;
27695 };
27696 };
27697 "repos/list-teams": {
27698 parameters: {
27699 path: {
27700 owner: components["parameters"]["owner"];
27701 repo: components["parameters"]["repo"];
27702 };
27703 query: {
27704 /** Results per page (max 100). */
27705 per_page?: components["parameters"]["per_page"];
27706 /** Page number of the results to fetch. */
27707 page?: components["parameters"]["page"];
27708 };
27709 };
27710 responses: {
27711 /** Response */
27712 200: {
27713 headers: {};
27714 content: {
27715 "application/json": components["schemas"]["team"][];
27716 };
27717 };
27718 };
27719 };
27720 "repos/get-all-topics": {
27721 parameters: {
27722 path: {
27723 owner: components["parameters"]["owner"];
27724 repo: components["parameters"]["repo"];
27725 };
27726 query: {
27727 /** Page number of the results to fetch. */
27728 page?: components["parameters"]["page"];
27729 /** Results per page (max 100). */
27730 per_page?: components["parameters"]["per_page"];
27731 };
27732 };
27733 responses: {
27734 /** Response */
27735 200: {
27736 content: {
27737 "application/json": components["schemas"]["topic"];
27738 };
27739 };
27740 404: components["responses"]["not_found"];
27741 415: components["responses"]["preview_header_missing"];
27742 };
27743 };
27744 "repos/replace-all-topics": {
27745 parameters: {
27746 path: {
27747 owner: components["parameters"]["owner"];
27748 repo: components["parameters"]["repo"];
27749 };
27750 };
27751 responses: {
27752 /** Response */
27753 200: {
27754 content: {
27755 "application/json": components["schemas"]["topic"];
27756 };
27757 };
27758 404: components["responses"]["not_found"];
27759 415: components["responses"]["preview_header_missing"];
27760 422: components["responses"]["validation_failed_simple"];
27761 };
27762 requestBody: {
27763 content: {
27764 "application/json": {
27765 /** An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */
27766 names: string[];
27767 };
27768 };
27769 };
27770 };
27771 /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */
27772 "repos/get-clones": {
27773 parameters: {
27774 path: {
27775 owner: components["parameters"]["owner"];
27776 repo: components["parameters"]["repo"];
27777 };
27778 query: {
27779 /** Must be one of: `day`, `week`. */
27780 per?: components["parameters"]["per"];
27781 };
27782 };
27783 responses: {
27784 /** Response */
27785 200: {
27786 content: {
27787 "application/json": components["schemas"]["clone-traffic"];
27788 };
27789 };
27790 403: components["responses"]["forbidden"];
27791 };
27792 };
27793 /** Get the top 10 popular contents over the last 14 days. */
27794 "repos/get-top-paths": {
27795 parameters: {
27796 path: {
27797 owner: components["parameters"]["owner"];
27798 repo: components["parameters"]["repo"];
27799 };
27800 };
27801 responses: {
27802 /** Response */
27803 200: {
27804 content: {
27805 "application/json": components["schemas"]["content-traffic"][];
27806 };
27807 };
27808 403: components["responses"]["forbidden"];
27809 };
27810 };
27811 /** Get the top 10 referrers over the last 14 days. */
27812 "repos/get-top-referrers": {
27813 parameters: {
27814 path: {
27815 owner: components["parameters"]["owner"];
27816 repo: components["parameters"]["repo"];
27817 };
27818 };
27819 responses: {
27820 /** Response */
27821 200: {
27822 content: {
27823 "application/json": components["schemas"]["referrer-traffic"][];
27824 };
27825 };
27826 403: components["responses"]["forbidden"];
27827 };
27828 };
27829 /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */
27830 "repos/get-views": {
27831 parameters: {
27832 path: {
27833 owner: components["parameters"]["owner"];
27834 repo: components["parameters"]["repo"];
27835 };
27836 query: {
27837 /** Must be one of: `day`, `week`. */
27838 per?: components["parameters"]["per"];
27839 };
27840 };
27841 responses: {
27842 /** Response */
27843 200: {
27844 content: {
27845 "application/json": components["schemas"]["view-traffic"];
27846 };
27847 };
27848 403: components["responses"]["forbidden"];
27849 };
27850 };
27851 /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). */
27852 "repos/transfer": {
27853 parameters: {
27854 path: {
27855 owner: components["parameters"]["owner"];
27856 repo: components["parameters"]["repo"];
27857 };
27858 };
27859 responses: {
27860 /** Response */
27861 202: {
27862 content: {
27863 "application/json": components["schemas"]["minimal-repository"];
27864 };
27865 };
27866 };
27867 requestBody: {
27868 content: {
27869 "application/json": {
27870 /** The username or organization name the repository will be transferred to. */
27871 new_owner: string;
27872 /** ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */
27873 team_ids?: number[];
27874 };
27875 };
27876 };
27877 };
27878 /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
27879 "repos/check-vulnerability-alerts": {
27880 parameters: {
27881 path: {
27882 owner: components["parameters"]["owner"];
27883 repo: components["parameters"]["repo"];
27884 };
27885 };
27886 responses: {
27887 /** Response if repository is enabled with vulnerability alerts */
27888 204: never;
27889 /** Not Found if repository is not enabled with vulnerability alerts */
27890 404: unknown;
27891 };
27892 };
27893 /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
27894 "repos/enable-vulnerability-alerts": {
27895 parameters: {
27896 path: {
27897 owner: components["parameters"]["owner"];
27898 repo: components["parameters"]["repo"];
27899 };
27900 };
27901 responses: {
27902 /** Response */
27903 204: never;
27904 };
27905 };
27906 /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */
27907 "repos/disable-vulnerability-alerts": {
27908 parameters: {
27909 path: {
27910 owner: components["parameters"]["owner"];
27911 repo: components["parameters"]["repo"];
27912 };
27913 };
27914 responses: {
27915 /** Response */
27916 204: never;
27917 };
27918 };
27919 /**
27920 * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
27921 * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
27922 * the `Location` header to make a second `GET` request.
27923 * **Note**: For private repositories, these links are temporary and expire after five minutes.
27924 */
27925 "repos/download-zipball-archive": {
27926 parameters: {
27927 path: {
27928 owner: components["parameters"]["owner"];
27929 repo: components["parameters"]["repo"];
27930 ref: string;
27931 };
27932 };
27933 responses: {
27934 /** Response */
27935 302: never;
27936 };
27937 };
27938 /**
27939 * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.
27940 *
27941 * **OAuth scope requirements**
27942 *
27943 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
27944 *
27945 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
27946 * * `repo` scope to create a private repository
27947 */
27948 "repos/create-using-template": {
27949 parameters: {
27950 path: {
27951 template_owner: string;
27952 template_repo: string;
27953 };
27954 };
27955 responses: {
27956 /** Response */
27957 201: {
27958 headers: {
27959 Location?: string;
27960 };
27961 content: {
27962 "application/json": components["schemas"]["repository"];
27963 };
27964 };
27965 };
27966 requestBody: {
27967 content: {
27968 "application/json": {
27969 /** The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */
27970 owner?: string;
27971 /** The name of the new repository. */
27972 name: string;
27973 /** A short description of the new repository. */
27974 description?: string;
27975 /** Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. */
27976 include_all_branches?: boolean;
27977 /** Either `true` to create a new private repository or `false` to create a new public one. */
27978 private?: boolean;
27979 };
27980 };
27981 };
27982 };
27983 /**
27984 * Lists all public repositories in the order that they were created.
27985 *
27986 * Note:
27987 * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
27988 * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.
27989 */
27990 "repos/list-public": {
27991 parameters: {
27992 query: {
27993 /** A repository ID. Only return repositories with an ID greater than this ID. */
27994 since?: components["parameters"]["since-repo"];
27995 };
27996 };
27997 responses: {
27998 /** Response */
27999 200: {
28000 headers: {
28001 Link?: string;
28002 };
28003 content: {
28004 "application/json": components["schemas"]["minimal-repository"][];
28005 };
28006 };
28007 304: components["responses"]["not_modified"];
28008 422: components["responses"]["validation_failed"];
28009 };
28010 };
28011 /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
28012 "actions/list-environment-secrets": {
28013 parameters: {
28014 path: {
28015 repository_id: components["parameters"]["repository_id"];
28016 /** The name of the environment */
28017 environment_name: components["parameters"]["environment_name"];
28018 };
28019 query: {
28020 /** Results per page (max 100). */
28021 per_page?: components["parameters"]["per_page"];
28022 /** Page number of the results to fetch. */
28023 page?: components["parameters"]["page"];
28024 };
28025 };
28026 responses: {
28027 /** Response */
28028 200: {
28029 headers: {};
28030 content: {
28031 "application/json": {
28032 total_count: number;
28033 secrets: components["schemas"]["actions-secret"][];
28034 };
28035 };
28036 };
28037 };
28038 };
28039 /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
28040 "actions/get-environment-public-key": {
28041 parameters: {
28042 path: {
28043 repository_id: components["parameters"]["repository_id"];
28044 /** The name of the environment */
28045 environment_name: components["parameters"]["environment_name"];
28046 };
28047 };
28048 responses: {
28049 /** Response */
28050 200: {
28051 content: {
28052 "application/json": components["schemas"]["actions-public-key"];
28053 };
28054 };
28055 };
28056 };
28057 /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
28058 "actions/get-environment-secret": {
28059 parameters: {
28060 path: {
28061 repository_id: components["parameters"]["repository_id"];
28062 /** The name of the environment */
28063 environment_name: components["parameters"]["environment_name"];
28064 /** secret_name parameter */
28065 secret_name: components["parameters"]["secret_name"];
28066 };
28067 };
28068 responses: {
28069 /** Response */
28070 200: {
28071 content: {
28072 "application/json": components["schemas"]["actions-secret"];
28073 };
28074 };
28075 };
28076 };
28077 /**
28078 * Creates or updates an environment secret with an encrypted value. Encrypt your secret using
28079 * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
28080 * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
28081 * this endpoint.
28082 *
28083 * #### Example encrypting a secret using Node.js
28084 *
28085 * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
28086 *
28087 * ```
28088 * const sodium = require('tweetsodium');
28089 *
28090 * const key = "base64-encoded-public-key";
28091 * const value = "plain-text-secret";
28092 *
28093 * // Convert the message and key to Uint8Array's (Buffer implements that interface)
28094 * const messageBytes = Buffer.from(value);
28095 * const keyBytes = Buffer.from(key, 'base64');
28096 *
28097 * // Encrypt using LibSodium.
28098 * const encryptedBytes = sodium.seal(messageBytes, keyBytes);
28099 *
28100 * // Base64 the encrypted secret
28101 * const encrypted = Buffer.from(encryptedBytes).toString('base64');
28102 *
28103 * console.log(encrypted);
28104 * ```
28105 *
28106 *
28107 * #### Example encrypting a secret using Python
28108 *
28109 * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
28110 *
28111 * ```
28112 * from base64 import b64encode
28113 * from nacl import encoding, public
28114 *
28115 * def encrypt(public_key: str, secret_value: str) -> str:
28116 * """Encrypt a Unicode string using the public key."""
28117 * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
28118 * sealed_box = public.SealedBox(public_key)
28119 * encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
28120 * return b64encode(encrypted).decode("utf-8")
28121 * ```
28122 *
28123 * #### Example encrypting a secret using C#
28124 *
28125 * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
28126 *
28127 * ```
28128 * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
28129 * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
28130 *
28131 * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
28132 *
28133 * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
28134 * ```
28135 *
28136 * #### Example encrypting a secret using Ruby
28137 *
28138 * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
28139 *
28140 * ```ruby
28141 * require "rbnacl"
28142 * require "base64"
28143 *
28144 * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
28145 * public_key = RbNaCl::PublicKey.new(key)
28146 *
28147 * box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
28148 * encrypted_secret = box.encrypt("my_secret")
28149 *
28150 * # Print the base64 encoded secret
28151 * puts Base64.strict_encode64(encrypted_secret)
28152 * ```
28153 */
28154 "actions/create-or-update-environment-secret": {
28155 parameters: {
28156 path: {
28157 repository_id: components["parameters"]["repository_id"];
28158 /** The name of the environment */
28159 environment_name: components["parameters"]["environment_name"];
28160 /** secret_name parameter */
28161 secret_name: components["parameters"]["secret_name"];
28162 };
28163 };
28164 responses: {
28165 /** Response when creating a secret */
28166 201: {
28167 content: {
28168 "application/json": components["schemas"]["empty-object"];
28169 };
28170 };
28171 /** Response when updating a secret */
28172 204: never;
28173 };
28174 requestBody: {
28175 content: {
28176 "application/json": {
28177 /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */
28178 encrypted_value?: string;
28179 /** ID of the key you used to encrypt the secret. */
28180 key_id?: string;
28181 };
28182 };
28183 };
28184 };
28185 /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */
28186 "actions/delete-environment-secret": {
28187 parameters: {
28188 path: {
28189 repository_id: components["parameters"]["repository_id"];
28190 /** The name of the environment */
28191 environment_name: components["parameters"]["environment_name"];
28192 /** secret_name parameter */
28193 secret_name: components["parameters"]["secret_name"];
28194 };
28195 };
28196 responses: {
28197 /** Default response */
28198 204: never;
28199 };
28200 };
28201 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
28202 "enterprise-admin/list-provisioned-groups-enterprise": {
28203 parameters: {
28204 path: {
28205 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28206 enterprise: components["parameters"]["enterprise"];
28207 };
28208 query: {
28209 /** Used for pagination: the index of the first result to return. */
28210 startIndex?: components["parameters"]["start_index"];
28211 /** Used for pagination: the number of results to return. */
28212 count?: components["parameters"]["count"];
28213 /** filter results */
28214 filter?: string;
28215 /** attributes to exclude */
28216 excludedAttributes?: string;
28217 };
28218 };
28219 responses: {
28220 /** Response */
28221 200: {
28222 content: {
28223 "application/json": components["schemas"]["scim-group-list-enterprise"];
28224 };
28225 };
28226 };
28227 };
28228 /**
28229 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28230 *
28231 * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.
28232 */
28233 "enterprise-admin/provision-and-invite-enterprise-group": {
28234 parameters: {
28235 path: {
28236 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28237 enterprise: components["parameters"]["enterprise"];
28238 };
28239 };
28240 responses: {
28241 /** Response */
28242 201: {
28243 content: {
28244 "application/json": components["schemas"]["scim-enterprise-group"];
28245 };
28246 };
28247 };
28248 requestBody: {
28249 content: {
28250 "application/json": {
28251 /** The SCIM schema URIs. */
28252 schemas: string[];
28253 /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */
28254 displayName: string;
28255 members?: {
28256 /** The SCIM user ID for a user. */
28257 value: string;
28258 }[];
28259 };
28260 };
28261 };
28262 };
28263 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
28264 "enterprise-admin/get-provisioning-information-for-enterprise-group": {
28265 parameters: {
28266 path: {
28267 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28268 enterprise: components["parameters"]["enterprise"];
28269 /** Identifier generated by the GitHub SCIM endpoint. */
28270 scim_group_id: components["parameters"]["scim_group_id"];
28271 };
28272 query: {
28273 /** Attributes to exclude. */
28274 excludedAttributes?: string;
28275 };
28276 };
28277 responses: {
28278 /** Response */
28279 200: {
28280 content: {
28281 "application/json": components["schemas"]["scim-enterprise-group"];
28282 };
28283 };
28284 };
28285 };
28286 /**
28287 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28288 *
28289 * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead.
28290 */
28291 "enterprise-admin/set-information-for-provisioned-enterprise-group": {
28292 parameters: {
28293 path: {
28294 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28295 enterprise: components["parameters"]["enterprise"];
28296 /** Identifier generated by the GitHub SCIM endpoint. */
28297 scim_group_id: components["parameters"]["scim_group_id"];
28298 };
28299 };
28300 responses: {
28301 /** Response */
28302 200: {
28303 content: {
28304 "application/json": components["schemas"]["scim-enterprise-group"];
28305 };
28306 };
28307 };
28308 requestBody: {
28309 content: {
28310 "application/json": {
28311 /** The SCIM schema URIs. */
28312 schemas: string[];
28313 /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */
28314 displayName: string;
28315 members?: {
28316 /** The SCIM user ID for a user. */
28317 value: string;
28318 }[];
28319 };
28320 };
28321 };
28322 };
28323 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
28324 "enterprise-admin/delete-scim-group-from-enterprise": {
28325 parameters: {
28326 path: {
28327 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28328 enterprise: components["parameters"]["enterprise"];
28329 /** Identifier generated by the GitHub SCIM endpoint. */
28330 scim_group_id: components["parameters"]["scim_group_id"];
28331 };
28332 };
28333 responses: {
28334 /** Response */
28335 204: never;
28336 };
28337 };
28338 /**
28339 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28340 *
28341 * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
28342 */
28343 "enterprise-admin/update-attribute-for-enterprise-group": {
28344 parameters: {
28345 path: {
28346 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28347 enterprise: components["parameters"]["enterprise"];
28348 /** Identifier generated by the GitHub SCIM endpoint. */
28349 scim_group_id: components["parameters"]["scim_group_id"];
28350 };
28351 };
28352 responses: {
28353 /** Response */
28354 200: {
28355 content: {
28356 "application/json": components["schemas"]["scim-enterprise-group"];
28357 };
28358 };
28359 };
28360 requestBody: {
28361 content: {
28362 "application/json": {
28363 /** The SCIM schema URIs. */
28364 schemas: string[];
28365 /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */
28366 Operations: {
28367 op: "add" | "Add" | "remove" | "Remove" | "replace" | "Replace";
28368 path?: string;
28369 value?: string | { [key: string]: any } | any[];
28370 }[];
28371 };
28372 };
28373 };
28374 };
28375 /**
28376 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28377 *
28378 * Retrieves a paginated list of all provisioned enterprise members, including pending invitations.
28379 *
28380 * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
28381 * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.
28382 * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
28383 * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
28384 *
28385 * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
28386 *
28387 * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise.
28388 *
28389 * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
28390 *
28391 * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
28392 * - If the user signs in, their GitHub account is linked to this entry.
28393 * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place.
28394 */
28395 "enterprise-admin/list-provisioned-identities-enterprise": {
28396 parameters: {
28397 path: {
28398 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28399 enterprise: components["parameters"]["enterprise"];
28400 };
28401 query: {
28402 /** Used for pagination: the index of the first result to return. */
28403 startIndex?: components["parameters"]["start_index"];
28404 /** Used for pagination: the number of results to return. */
28405 count?: components["parameters"]["count"];
28406 /** filter results */
28407 filter?: string;
28408 };
28409 };
28410 responses: {
28411 /** Response */
28412 200: {
28413 content: {
28414 "application/json": components["schemas"]["scim-user-list-enterprise"];
28415 };
28416 };
28417 };
28418 };
28419 /**
28420 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28421 *
28422 * Provision enterprise membership for a user, and send organization invitation emails to the email address.
28423 *
28424 * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent.
28425 */
28426 "enterprise-admin/provision-and-invite-enterprise-user": {
28427 parameters: {
28428 path: {
28429 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28430 enterprise: components["parameters"]["enterprise"];
28431 };
28432 };
28433 responses: {
28434 /** Response */
28435 201: {
28436 content: {
28437 "application/json": components["schemas"]["scim-enterprise-user"];
28438 };
28439 };
28440 };
28441 requestBody: {
28442 content: {
28443 "application/json": {
28444 /** The SCIM schema URIs. */
28445 schemas: string[];
28446 /** The username for the user. */
28447 userName: string;
28448 name: {
28449 /** The first name of the user. */
28450 givenName: string;
28451 /** The last name of the user. */
28452 familyName: string;
28453 };
28454 /** List of user emails. */
28455 emails: {
28456 /** The email address. */
28457 value: string;
28458 /** The type of email address. */
28459 type: string;
28460 /** Whether this email address is the primary address. */
28461 primary: boolean;
28462 }[];
28463 /** List of SCIM group IDs the user is a member of. */
28464 groups?: {
28465 value?: string;
28466 }[];
28467 };
28468 };
28469 };
28470 };
28471 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
28472 "enterprise-admin/get-provisioning-information-for-enterprise-user": {
28473 parameters: {
28474 path: {
28475 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28476 enterprise: components["parameters"]["enterprise"];
28477 /** scim_user_id parameter */
28478 scim_user_id: components["parameters"]["scim_user_id"];
28479 };
28480 };
28481 responses: {
28482 /** Response */
28483 200: {
28484 content: {
28485 "application/json": components["schemas"]["scim-enterprise-user"];
28486 };
28487 };
28488 };
28489 };
28490 /**
28491 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28492 *
28493 * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead.
28494 *
28495 * You must at least provide the required values for the user: `userName`, `name`, and `emails`.
28496 *
28497 * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`.
28498 */
28499 "enterprise-admin/set-information-for-provisioned-enterprise-user": {
28500 parameters: {
28501 path: {
28502 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28503 enterprise: components["parameters"]["enterprise"];
28504 /** scim_user_id parameter */
28505 scim_user_id: components["parameters"]["scim_user_id"];
28506 };
28507 };
28508 responses: {
28509 /** Response */
28510 200: {
28511 content: {
28512 "application/json": components["schemas"]["scim-enterprise-user"];
28513 };
28514 };
28515 };
28516 requestBody: {
28517 content: {
28518 "application/json": {
28519 /** The SCIM schema URIs. */
28520 schemas: string[];
28521 /** The username for the user. */
28522 userName: string;
28523 name: {
28524 /** The first name of the user. */
28525 givenName: string;
28526 /** The last name of the user. */
28527 familyName: string;
28528 };
28529 /** List of user emails. */
28530 emails: {
28531 /** The email address. */
28532 value: string;
28533 /** The type of email address. */
28534 type: string;
28535 /** Whether this email address is the primary address. */
28536 primary: boolean;
28537 }[];
28538 /** List of SCIM group IDs the user is a member of. */
28539 groups?: {
28540 value?: string;
28541 }[];
28542 };
28543 };
28544 };
28545 };
28546 /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */
28547 "enterprise-admin/delete-user-from-enterprise": {
28548 parameters: {
28549 path: {
28550 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28551 enterprise: components["parameters"]["enterprise"];
28552 /** scim_user_id parameter */
28553 scim_user_id: components["parameters"]["scim_user_id"];
28554 };
28555 };
28556 responses: {
28557 /** Response */
28558 204: never;
28559 };
28560 };
28561 /**
28562 * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
28563 *
28564 * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
28565 *
28566 * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
28567 *
28568 * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`.
28569 *
28570 * ```
28571 * {
28572 * "Operations":[{
28573 * "op":"replace",
28574 * "value":{
28575 * "active":false
28576 * }
28577 * }]
28578 * }
28579 * ```
28580 */
28581 "enterprise-admin/update-attribute-for-enterprise-user": {
28582 parameters: {
28583 path: {
28584 /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */
28585 enterprise: components["parameters"]["enterprise"];
28586 /** scim_user_id parameter */
28587 scim_user_id: components["parameters"]["scim_user_id"];
28588 };
28589 };
28590 responses: {
28591 /** Response */
28592 200: {
28593 content: {
28594 "application/json": components["schemas"]["scim-enterprise-user"];
28595 };
28596 };
28597 };
28598 requestBody: {
28599 content: {
28600 "application/json": {
28601 /** The SCIM schema URIs. */
28602 schemas: string[];
28603 /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */
28604 Operations: { [key: string]: any }[];
28605 };
28606 };
28607 };
28608 };
28609 /**
28610 * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.
28611 *
28612 * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
28613 * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future.
28614 * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
28615 * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
28616 *
28617 * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
28618 *
28619 * 1. The user is granted access by the IdP and is not a member of the GitHub organization.
28620 *
28621 * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
28622 *
28623 * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
28624 * - If the user signs in, their GitHub account is linked to this entry.
28625 * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place.
28626 */
28627 "scim/list-provisioned-identities": {
28628 parameters: {
28629 path: {
28630 org: components["parameters"]["org"];
28631 };
28632 query: {
28633 /** Used for pagination: the index of the first result to return. */
28634 startIndex?: number;
28635 /** Used for pagination: the number of results to return. */
28636 count?: number;
28637 /**
28638 * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query:
28639 *
28640 * `?filter=userName%20eq%20\"Octocat\"`.
28641 *
28642 * To filter results for the identity with the email `octocat@github.com`, you would use this query:
28643 *
28644 * `?filter=emails%20eq%20\"octocat@github.com\"`.
28645 */
28646 filter?: string;
28647 };
28648 };
28649 responses: {
28650 /** Response */
28651 200: {
28652 content: {
28653 "application/scim+json": components["schemas"]["scim-user-list"];
28654 };
28655 };
28656 304: components["responses"]["not_modified"];
28657 400: components["responses"]["scim_bad_request"];
28658 403: components["responses"]["scim_forbidden"];
28659 404: components["responses"]["scim_not_found"];
28660 };
28661 };
28662 /** Provision organization membership for a user, and send an activation email to the email address. */
28663 "scim/provision-and-invite-user": {
28664 parameters: {
28665 path: {
28666 org: components["parameters"]["org"];
28667 };
28668 };
28669 responses: {
28670 /** Response */
28671 201: {
28672 content: {
28673 "application/scim+json": components["schemas"]["scim-user"];
28674 };
28675 };
28676 304: components["responses"]["not_modified"];
28677 400: components["responses"]["scim_bad_request"];
28678 403: components["responses"]["scim_forbidden"];
28679 404: components["responses"]["scim_not_found"];
28680 409: components["responses"]["scim_conflict"];
28681 500: components["responses"]["scim_internal_error"];
28682 };
28683 requestBody: {
28684 content: {
28685 "application/json": {
28686 /** Configured by the admin. Could be an email, login, or username */
28687 userName: string;
28688 /** The name of the user, suitable for display to end-users */
28689 displayName?: string;
28690 name: {
28691 givenName: string;
28692 familyName: string;
28693 formatted?: string;
28694 };
28695 /** user emails */
28696 emails: {
28697 value: string;
28698 primary?: boolean;
28699 type?: string;
28700 }[];
28701 schemas?: string[];
28702 externalId?: string;
28703 groups?: string[];
28704 active?: boolean;
28705 };
28706 };
28707 };
28708 };
28709 "scim/get-provisioning-information-for-user": {
28710 parameters: {
28711 path: {
28712 org: components["parameters"]["org"];
28713 /** scim_user_id parameter */
28714 scim_user_id: components["parameters"]["scim_user_id"];
28715 };
28716 };
28717 responses: {
28718 /** Response */
28719 200: {
28720 content: {
28721 "application/scim+json": components["schemas"]["scim-user"];
28722 };
28723 };
28724 304: components["responses"]["not_modified"];
28725 403: components["responses"]["scim_forbidden"];
28726 404: components["responses"]["scim_not_found"];
28727 };
28728 };
28729 /**
28730 * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead.
28731 *
28732 * You must at least provide the required values for the user: `userName`, `name`, and `emails`.
28733 *
28734 * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`.
28735 */
28736 "scim/set-information-for-provisioned-user": {
28737 parameters: {
28738 path: {
28739 org: components["parameters"]["org"];
28740 /** scim_user_id parameter */
28741 scim_user_id: components["parameters"]["scim_user_id"];
28742 };
28743 };
28744 responses: {
28745 /** Response */
28746 200: {
28747 content: {
28748 "application/scim+json": components["schemas"]["scim-user"];
28749 };
28750 };
28751 304: components["responses"]["not_modified"];
28752 403: components["responses"]["scim_forbidden"];
28753 404: components["responses"]["scim_not_found"];
28754 };
28755 requestBody: {
28756 content: {
28757 "application/json": {
28758 schemas?: string[];
28759 /** The name of the user, suitable for display to end-users */
28760 displayName?: string;
28761 externalId?: string;
28762 groups?: string[];
28763 active?: boolean;
28764 /** Configured by the admin. Could be an email, login, or username */
28765 userName: string;
28766 name: {
28767 givenName: string;
28768 familyName: string;
28769 formatted?: string;
28770 };
28771 /** user emails */
28772 emails: {
28773 type?: string;
28774 value: string;
28775 primary?: boolean;
28776 }[];
28777 };
28778 };
28779 };
28780 };
28781 "scim/delete-user-from-org": {
28782 parameters: {
28783 path: {
28784 org: components["parameters"]["org"];
28785 /** scim_user_id parameter */
28786 scim_user_id: components["parameters"]["scim_user_id"];
28787 };
28788 };
28789 responses: {
28790 /** Response */
28791 204: never;
28792 304: components["responses"]["not_modified"];
28793 403: components["responses"]["scim_forbidden"];
28794 404: components["responses"]["scim_not_found"];
28795 };
28796 };
28797 /**
28798 * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
28799 *
28800 * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
28801 *
28802 * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.
28803 *
28804 * ```
28805 * {
28806 * "Operations":[{
28807 * "op":"replace",
28808 * "value":{
28809 * "active":false
28810 * }
28811 * }]
28812 * }
28813 * ```
28814 */
28815 "scim/update-attribute-for-user": {
28816 parameters: {
28817 path: {
28818 org: components["parameters"]["org"];
28819 /** scim_user_id parameter */
28820 scim_user_id: components["parameters"]["scim_user_id"];
28821 };
28822 };
28823 responses: {
28824 /** Response */
28825 200: {
28826 content: {
28827 "application/scim+json": components["schemas"]["scim-user"];
28828 };
28829 };
28830 304: components["responses"]["not_modified"];
28831 400: components["responses"]["scim_bad_request"];
28832 403: components["responses"]["scim_forbidden"];
28833 404: components["responses"]["scim_not_found"];
28834 /** Response */
28835 429: {
28836 content: {
28837 "application/json": components["schemas"]["basic-error"];
28838 };
28839 };
28840 };
28841 requestBody: {
28842 content: {
28843 "application/json": {
28844 schemas?: string[];
28845 /** Set of operations to be performed */
28846 Operations: {
28847 op: "add" | "remove" | "replace";
28848 path?: string;
28849 value?:
28850 | {
28851 active?: boolean | null;
28852 userName?: string | null;
28853 externalId?: string | null;
28854 givenName?: string | null;
28855 familyName?: string | null;
28856 }
28857 | {
28858 value?: string;
28859 primary?: boolean;
28860 }[]
28861 | string;
28862 }[];
28863 };
28864 };
28865 };
28866 };
28867 /**
28868 * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
28869 *
28870 * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
28871 *
28872 * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:
28873 *
28874 * `q=addClass+in:file+language:js+repo:jquery/jquery`
28875 *
28876 * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.
28877 *
28878 * #### Considerations for code search
28879 *
28880 * Due to the complexity of searching code, there are a few restrictions on how searches are performed:
28881 *
28882 * * Only the _default branch_ is considered. In most cases, this will be the `master` branch.
28883 * * Only files smaller than 384 KB are searchable.
28884 * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing
28885 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.
28886 */
28887 "search/code": {
28888 parameters: {
28889 query: {
28890 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. */
28891 q: string;
28892 /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
28893 sort?: "indexed";
28894 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
28895 order?: components["parameters"]["order"];
28896 /** Results per page (max 100). */
28897 per_page?: components["parameters"]["per_page"];
28898 /** Page number of the results to fetch. */
28899 page?: components["parameters"]["page"];
28900 };
28901 };
28902 responses: {
28903 /** Response */
28904 200: {
28905 content: {
28906 "application/json": {
28907 total_count: number;
28908 incomplete_results: boolean;
28909 items: components["schemas"]["code-search-result-item"][];
28910 };
28911 };
28912 };
28913 304: components["responses"]["not_modified"];
28914 403: components["responses"]["forbidden"];
28915 422: components["responses"]["validation_failed"];
28916 503: components["responses"]["service_unavailable"];
28917 };
28918 };
28919 /**
28920 * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
28921 *
28922 * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match
28923 * metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
28924 *
28925 * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:
28926 *
28927 * `q=repo:octocat/Spoon-Knife+css`
28928 */
28929 "search/commits": {
28930 parameters: {
28931 query: {
28932 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */
28933 q: string;
28934 /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
28935 sort?: "author-date" | "committer-date";
28936 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
28937 order?: components["parameters"]["order"];
28938 /** Results per page (max 100). */
28939 per_page?: components["parameters"]["per_page"];
28940 /** Page number of the results to fetch. */
28941 page?: components["parameters"]["page"];
28942 };
28943 };
28944 responses: {
28945 /** Response */
28946 200: {
28947 content: {
28948 "application/json": {
28949 total_count: number;
28950 incomplete_results: boolean;
28951 items: components["schemas"]["commit-search-result-item"][];
28952 };
28953 };
28954 };
28955 304: components["responses"]["not_modified"];
28956 415: components["responses"]["preview_header_missing"];
28957 };
28958 };
28959 /**
28960 * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
28961 *
28962 * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
28963 * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
28964 *
28965 * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
28966 *
28967 * `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
28968 *
28969 * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
28970 *
28971 * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
28972 */
28973 "search/issues-and-pull-requests": {
28974 parameters: {
28975 query: {
28976 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */
28977 q: string;
28978 /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
28979 sort?:
28980 | "comments"
28981 | "reactions"
28982 | "reactions-+1"
28983 | "reactions--1"
28984 | "reactions-smile"
28985 | "reactions-thinking_face"
28986 | "reactions-heart"
28987 | "reactions-tada"
28988 | "interactions"
28989 | "created"
28990 | "updated";
28991 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
28992 order?: components["parameters"]["order"];
28993 /** Results per page (max 100). */
28994 per_page?: components["parameters"]["per_page"];
28995 /** Page number of the results to fetch. */
28996 page?: components["parameters"]["page"];
28997 };
28998 };
28999 responses: {
29000 /** Response */
29001 200: {
29002 content: {
29003 "application/json": {
29004 total_count: number;
29005 incomplete_results: boolean;
29006 items: components["schemas"]["issue-search-result-item"][];
29007 };
29008 };
29009 };
29010 304: components["responses"]["not_modified"];
29011 403: components["responses"]["forbidden"];
29012 422: components["responses"]["validation_failed"];
29013 503: components["responses"]["service_unavailable"];
29014 };
29015 };
29016 /**
29017 * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
29018 *
29019 * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
29020 *
29021 * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:
29022 *
29023 * `q=bug+defect+enhancement&repository_id=64778136`
29024 *
29025 * The labels that best match the query appear first in the search results.
29026 */
29027 "search/labels": {
29028 parameters: {
29029 query: {
29030 /** The id of the repository. */
29031 repository_id: number;
29032 /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */
29033 q: string;
29034 /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
29035 sort?: "created" | "updated";
29036 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
29037 order?: components["parameters"]["order"];
29038 /** Results per page (max 100). */
29039 per_page?: components["parameters"]["per_page"];
29040 /** Page number of the results to fetch. */
29041 page?: components["parameters"]["page"];
29042 };
29043 };
29044 responses: {
29045 /** Response */
29046 200: {
29047 content: {
29048 "application/json": {
29049 total_count: number;
29050 incomplete_results: boolean;
29051 items: components["schemas"]["label-search-result-item"][];
29052 };
29053 };
29054 };
29055 304: components["responses"]["not_modified"];
29056 403: components["responses"]["forbidden"];
29057 404: components["responses"]["not_found"];
29058 422: components["responses"]["validation_failed"];
29059 };
29060 };
29061 /**
29062 * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
29063 *
29064 * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
29065 *
29066 * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
29067 *
29068 * `q=tetris+language:assembly&sort=stars&order=desc`
29069 *
29070 * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
29071 *
29072 * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this:
29073 *
29074 * `q=topic:ruby+topic:rails`
29075 */
29076 "search/repos": {
29077 parameters: {
29078 query: {
29079 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */
29080 q: string;
29081 /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
29082 sort?: "stars" | "forks" | "help-wanted-issues" | "updated";
29083 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
29084 order?: components["parameters"]["order"];
29085 /** Results per page (max 100). */
29086 per_page?: components["parameters"]["per_page"];
29087 /** Page number of the results to fetch. */
29088 page?: components["parameters"]["page"];
29089 };
29090 };
29091 responses: {
29092 /** Response */
29093 200: {
29094 content: {
29095 "application/json": {
29096 total_count: number;
29097 incomplete_results: boolean;
29098 items: components["schemas"]["repo-search-result-item"][];
29099 };
29100 };
29101 };
29102 304: components["responses"]["not_modified"];
29103 422: components["responses"]["validation_failed"];
29104 503: components["responses"]["service_unavailable"];
29105 };
29106 };
29107 /**
29108 * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers.
29109 *
29110 * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
29111 *
29112 * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
29113 *
29114 * `q=ruby+is:featured`
29115 *
29116 * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
29117 */
29118 "search/topics": {
29119 parameters: {
29120 query: {
29121 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */
29122 q: string;
29123 /** Results per page (max 100). */
29124 per_page?: components["parameters"]["per_page"];
29125 /** Page number of the results to fetch. */
29126 page?: components["parameters"]["page"];
29127 };
29128 };
29129 responses: {
29130 /** Response */
29131 200: {
29132 content: {
29133 "application/json": {
29134 total_count: number;
29135 incomplete_results: boolean;
29136 items: components["schemas"]["topic-search-result-item"][];
29137 };
29138 };
29139 };
29140 304: components["responses"]["not_modified"];
29141 415: components["responses"]["preview_header_missing"];
29142 };
29143 };
29144 /**
29145 * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
29146 *
29147 * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
29148 *
29149 * For example, if you're looking for a list of popular users, you might try this query:
29150 *
29151 * `q=tom+repos:%3E42+followers:%3E1000`
29152 *
29153 * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.
29154 */
29155 "search/users": {
29156 parameters: {
29157 query: {
29158 /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. */
29159 q: string;
29160 /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */
29161 sort?: "followers" | "repositories" | "joined";
29162 /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */
29163 order?: components["parameters"]["order"];
29164 /** Results per page (max 100). */
29165 per_page?: components["parameters"]["per_page"];
29166 /** Page number of the results to fetch. */
29167 page?: components["parameters"]["page"];
29168 };
29169 };
29170 responses: {
29171 /** Response */
29172 200: {
29173 content: {
29174 "application/json": {
29175 total_count: number;
29176 incomplete_results: boolean;
29177 items: components["schemas"]["user-search-result-item"][];
29178 };
29179 };
29180 };
29181 304: components["responses"]["not_modified"];
29182 422: components["responses"]["validation_failed"];
29183 503: components["responses"]["service_unavailable"];
29184 };
29185 };
29186 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */
29187 "teams/get-legacy": {
29188 parameters: {
29189 path: {
29190 team_id: components["parameters"]["team-id"];
29191 };
29192 };
29193 responses: {
29194 /** Response */
29195 200: {
29196 content: {
29197 "application/json": components["schemas"]["team-full"];
29198 };
29199 };
29200 404: components["responses"]["not_found"];
29201 };
29202 };
29203 /**
29204 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint.
29205 *
29206 * To delete a team, the authenticated user must be an organization owner or team maintainer.
29207 *
29208 * If you are an organization owner, deleting a parent team will delete all of its child teams as well.
29209 */
29210 "teams/delete-legacy": {
29211 parameters: {
29212 path: {
29213 team_id: components["parameters"]["team-id"];
29214 };
29215 };
29216 responses: {
29217 /** Response */
29218 204: never;
29219 404: components["responses"]["not_found"];
29220 422: components["responses"]["validation_failed"];
29221 };
29222 };
29223 /**
29224 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint.
29225 *
29226 * To edit a team, the authenticated user must either be an organization owner or a team maintainer.
29227 *
29228 * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.
29229 */
29230 "teams/update-legacy": {
29231 parameters: {
29232 path: {
29233 team_id: components["parameters"]["team-id"];
29234 };
29235 };
29236 responses: {
29237 /** Response */
29238 200: {
29239 content: {
29240 "application/json": components["schemas"]["team-full"];
29241 };
29242 };
29243 /** Response */
29244 201: {
29245 content: {
29246 "application/json": components["schemas"]["team-full"];
29247 };
29248 };
29249 403: components["responses"]["forbidden"];
29250 404: components["responses"]["not_found"];
29251 422: components["responses"]["validation_failed"];
29252 };
29253 requestBody: {
29254 content: {
29255 "application/json": {
29256 /** The name of the team. */
29257 name: string;
29258 /** The description of the team. */
29259 description?: string;
29260 /**
29261 * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are:
29262 * **For a non-nested team:**
29263 * \* `secret` - only visible to organization owners and members of this team.
29264 * \* `closed` - visible to all members of this organization.
29265 * **For a parent or child team:**
29266 * \* `closed` - visible to all members of this organization.
29267 */
29268 privacy?: "secret" | "closed";
29269 /**
29270 * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:
29271 * \* `pull` - team members can pull, but not push to or administer newly-added repositories.
29272 * \* `push` - team members can pull and push, but not administer newly-added repositories.
29273 * \* `admin` - team members can pull, push and administer newly-added repositories.
29274 */
29275 permission?: "pull" | "push" | "admin";
29276 /** The ID of a team to set as the parent team. */
29277 parent_team_id?: number | null;
29278 };
29279 };
29280 };
29281 };
29282 /**
29283 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint.
29284 *
29285 * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29286 */
29287 "teams/list-discussions-legacy": {
29288 parameters: {
29289 path: {
29290 team_id: components["parameters"]["team-id"];
29291 };
29292 query: {
29293 /** One of `asc` (ascending) or `desc` (descending). */
29294 direction?: components["parameters"]["direction"];
29295 /** Results per page (max 100). */
29296 per_page?: components["parameters"]["per_page"];
29297 /** Page number of the results to fetch. */
29298 page?: components["parameters"]["page"];
29299 };
29300 };
29301 responses: {
29302 /** Response */
29303 200: {
29304 headers: {};
29305 content: {
29306 "application/json": components["schemas"]["team-discussion"][];
29307 };
29308 };
29309 };
29310 };
29311 /**
29312 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint.
29313 *
29314 * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29315 *
29316 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
29317 */
29318 "teams/create-discussion-legacy": {
29319 parameters: {
29320 path: {
29321 team_id: components["parameters"]["team-id"];
29322 };
29323 };
29324 responses: {
29325 /** Response */
29326 201: {
29327 content: {
29328 "application/json": components["schemas"]["team-discussion"];
29329 };
29330 };
29331 };
29332 requestBody: {
29333 content: {
29334 "application/json": {
29335 /** The discussion post's title. */
29336 title: string;
29337 /** The discussion post's body text. */
29338 body: string;
29339 /** Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. */
29340 private?: boolean;
29341 };
29342 };
29343 };
29344 };
29345 /**
29346 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint.
29347 *
29348 * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29349 */
29350 "teams/get-discussion-legacy": {
29351 parameters: {
29352 path: {
29353 team_id: components["parameters"]["team-id"];
29354 discussion_number: components["parameters"]["discussion-number"];
29355 };
29356 };
29357 responses: {
29358 /** Response */
29359 200: {
29360 content: {
29361 "application/json": components["schemas"]["team-discussion"];
29362 };
29363 };
29364 };
29365 };
29366 /**
29367 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint.
29368 *
29369 * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29370 */
29371 "teams/delete-discussion-legacy": {
29372 parameters: {
29373 path: {
29374 team_id: components["parameters"]["team-id"];
29375 discussion_number: components["parameters"]["discussion-number"];
29376 };
29377 };
29378 responses: {
29379 /** Response */
29380 204: never;
29381 };
29382 };
29383 /**
29384 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint.
29385 *
29386 * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29387 */
29388 "teams/update-discussion-legacy": {
29389 parameters: {
29390 path: {
29391 team_id: components["parameters"]["team-id"];
29392 discussion_number: components["parameters"]["discussion-number"];
29393 };
29394 };
29395 responses: {
29396 /** Response */
29397 200: {
29398 content: {
29399 "application/json": components["schemas"]["team-discussion"];
29400 };
29401 };
29402 };
29403 requestBody: {
29404 content: {
29405 "application/json": {
29406 /** The discussion post's title. */
29407 title?: string;
29408 /** The discussion post's body text. */
29409 body?: string;
29410 };
29411 };
29412 };
29413 };
29414 /**
29415 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint.
29416 *
29417 * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29418 */
29419 "teams/list-discussion-comments-legacy": {
29420 parameters: {
29421 path: {
29422 team_id: components["parameters"]["team-id"];
29423 discussion_number: components["parameters"]["discussion-number"];
29424 };
29425 query: {
29426 /** One of `asc` (ascending) or `desc` (descending). */
29427 direction?: components["parameters"]["direction"];
29428 /** Results per page (max 100). */
29429 per_page?: components["parameters"]["per_page"];
29430 /** Page number of the results to fetch. */
29431 page?: components["parameters"]["page"];
29432 };
29433 };
29434 responses: {
29435 /** Response */
29436 200: {
29437 headers: {};
29438 content: {
29439 "application/json": components["schemas"]["team-discussion-comment"][];
29440 };
29441 };
29442 };
29443 };
29444 /**
29445 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint.
29446 *
29447 * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29448 *
29449 * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
29450 */
29451 "teams/create-discussion-comment-legacy": {
29452 parameters: {
29453 path: {
29454 team_id: components["parameters"]["team-id"];
29455 discussion_number: components["parameters"]["discussion-number"];
29456 };
29457 };
29458 responses: {
29459 /** Response */
29460 201: {
29461 content: {
29462 "application/json": components["schemas"]["team-discussion-comment"];
29463 };
29464 };
29465 };
29466 requestBody: {
29467 content: {
29468 "application/json": {
29469 /** The discussion comment's body text. */
29470 body: string;
29471 };
29472 };
29473 };
29474 };
29475 /**
29476 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint.
29477 *
29478 * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29479 */
29480 "teams/get-discussion-comment-legacy": {
29481 parameters: {
29482 path: {
29483 team_id: components["parameters"]["team-id"];
29484 discussion_number: components["parameters"]["discussion-number"];
29485 comment_number: components["parameters"]["comment-number"];
29486 };
29487 };
29488 responses: {
29489 /** Response */
29490 200: {
29491 content: {
29492 "application/json": components["schemas"]["team-discussion-comment"];
29493 };
29494 };
29495 };
29496 };
29497 /**
29498 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint.
29499 *
29500 * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29501 */
29502 "teams/delete-discussion-comment-legacy": {
29503 parameters: {
29504 path: {
29505 team_id: components["parameters"]["team-id"];
29506 discussion_number: components["parameters"]["discussion-number"];
29507 comment_number: components["parameters"]["comment-number"];
29508 };
29509 };
29510 responses: {
29511 /** Response */
29512 204: never;
29513 };
29514 };
29515 /**
29516 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint.
29517 *
29518 * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29519 */
29520 "teams/update-discussion-comment-legacy": {
29521 parameters: {
29522 path: {
29523 team_id: components["parameters"]["team-id"];
29524 discussion_number: components["parameters"]["discussion-number"];
29525 comment_number: components["parameters"]["comment-number"];
29526 };
29527 };
29528 responses: {
29529 /** Response */
29530 200: {
29531 content: {
29532 "application/json": components["schemas"]["team-discussion-comment"];
29533 };
29534 };
29535 };
29536 requestBody: {
29537 content: {
29538 "application/json": {
29539 /** The discussion comment's body text. */
29540 body: string;
29541 };
29542 };
29543 };
29544 };
29545 /**
29546 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint.
29547 *
29548 * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29549 */
29550 "reactions/list-for-team-discussion-comment-legacy": {
29551 parameters: {
29552 path: {
29553 team_id: components["parameters"]["team-id"];
29554 discussion_number: components["parameters"]["discussion-number"];
29555 comment_number: components["parameters"]["comment-number"];
29556 };
29557 query: {
29558 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */
29559 content?:
29560 | "+1"
29561 | "-1"
29562 | "laugh"
29563 | "confused"
29564 | "heart"
29565 | "hooray"
29566 | "rocket"
29567 | "eyes";
29568 /** Results per page (max 100). */
29569 per_page?: components["parameters"]["per_page"];
29570 /** Page number of the results to fetch. */
29571 page?: components["parameters"]["page"];
29572 };
29573 };
29574 responses: {
29575 /** Response */
29576 200: {
29577 headers: {};
29578 content: {
29579 "application/json": components["schemas"]["reaction"][];
29580 };
29581 };
29582 };
29583 };
29584 /**
29585 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.
29586 *
29587 * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
29588 */
29589 "reactions/create-for-team-discussion-comment-legacy": {
29590 parameters: {
29591 path: {
29592 team_id: components["parameters"]["team-id"];
29593 discussion_number: components["parameters"]["discussion-number"];
29594 comment_number: components["parameters"]["comment-number"];
29595 };
29596 };
29597 responses: {
29598 /** Response */
29599 201: {
29600 content: {
29601 "application/json": components["schemas"]["reaction"];
29602 };
29603 };
29604 };
29605 requestBody: {
29606 content: {
29607 "application/json": {
29608 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */
29609 content:
29610 | "+1"
29611 | "-1"
29612 | "laugh"
29613 | "confused"
29614 | "heart"
29615 | "hooray"
29616 | "rocket"
29617 | "eyes";
29618 };
29619 };
29620 };
29621 };
29622 /**
29623 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint.
29624 *
29625 * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
29626 */
29627 "reactions/list-for-team-discussion-legacy": {
29628 parameters: {
29629 path: {
29630 team_id: components["parameters"]["team-id"];
29631 discussion_number: components["parameters"]["discussion-number"];
29632 };
29633 query: {
29634 /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */
29635 content?:
29636 | "+1"
29637 | "-1"
29638 | "laugh"
29639 | "confused"
29640 | "heart"
29641 | "hooray"
29642 | "rocket"
29643 | "eyes";
29644 /** Results per page (max 100). */
29645 per_page?: components["parameters"]["per_page"];
29646 /** Page number of the results to fetch. */
29647 page?: components["parameters"]["page"];
29648 };
29649 };
29650 responses: {
29651 /** Response */
29652 200: {
29653 headers: {};
29654 content: {
29655 "application/json": components["schemas"]["reaction"][];
29656 };
29657 };
29658 };
29659 };
29660 /**
29661 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint.
29662 *
29663 * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
29664 */
29665 "reactions/create-for-team-discussion-legacy": {
29666 parameters: {
29667 path: {
29668 team_id: components["parameters"]["team-id"];
29669 discussion_number: components["parameters"]["discussion-number"];
29670 };
29671 };
29672 responses: {
29673 /** Response */
29674 201: {
29675 content: {
29676 "application/json": components["schemas"]["reaction"];
29677 };
29678 };
29679 };
29680 requestBody: {
29681 content: {
29682 "application/json": {
29683 /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */
29684 content:
29685 | "+1"
29686 | "-1"
29687 | "laugh"
29688 | "confused"
29689 | "heart"
29690 | "hooray"
29691 | "rocket"
29692 | "eyes";
29693 };
29694 };
29695 };
29696 };
29697 /**
29698 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint.
29699 *
29700 * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
29701 */
29702 "teams/list-pending-invitations-legacy": {
29703 parameters: {
29704 path: {
29705 team_id: components["parameters"]["team-id"];
29706 };
29707 query: {
29708 /** Results per page (max 100). */
29709 per_page?: components["parameters"]["per_page"];
29710 /** Page number of the results to fetch. */
29711 page?: components["parameters"]["page"];
29712 };
29713 };
29714 responses: {
29715 /** Response */
29716 200: {
29717 headers: {};
29718 content: {
29719 "application/json": components["schemas"]["organization-invitation"][];
29720 };
29721 };
29722 };
29723 };
29724 /**
29725 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint.
29726 *
29727 * Team members will include the members of child teams.
29728 */
29729 "teams/list-members-legacy": {
29730 parameters: {
29731 path: {
29732 team_id: components["parameters"]["team-id"];
29733 };
29734 query: {
29735 /**
29736 * Filters members returned by their role in the team. Can be one of:
29737 * \* `member` - normal members of the team.
29738 * \* `maintainer` - team maintainers.
29739 * \* `all` - all members of the team.
29740 */
29741 role?: "member" | "maintainer" | "all";
29742 /** Results per page (max 100). */
29743 per_page?: components["parameters"]["per_page"];
29744 /** Page number of the results to fetch. */
29745 page?: components["parameters"]["page"];
29746 };
29747 };
29748 responses: {
29749 /** Response */
29750 200: {
29751 headers: {};
29752 content: {
29753 "application/json": components["schemas"]["simple-user"][];
29754 };
29755 };
29756 404: components["responses"]["not_found"];
29757 };
29758 };
29759 /**
29760 * The "Get team member" endpoint (described below) is deprecated.
29761 *
29762 * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.
29763 *
29764 * To list members in a team, the team must be visible to the authenticated user.
29765 */
29766 "teams/get-member-legacy": {
29767 parameters: {
29768 path: {
29769 team_id: components["parameters"]["team-id"];
29770 username: components["parameters"]["username"];
29771 };
29772 };
29773 responses: {
29774 /** if user is a member */
29775 204: never;
29776 /** if user is not a member */
29777 404: unknown;
29778 };
29779 };
29780 /**
29781 * The "Add team member" endpoint (described below) is deprecated.
29782 *
29783 * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.
29784 *
29785 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
29786 *
29787 * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
29788 *
29789 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
29790 *
29791 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
29792 */
29793 "teams/add-member-legacy": {
29794 parameters: {
29795 path: {
29796 team_id: components["parameters"]["team-id"];
29797 username: components["parameters"]["username"];
29798 };
29799 };
29800 responses: {
29801 /** Response */
29802 204: never;
29803 403: components["responses"]["forbidden"];
29804 /** Not Found if team synchronization is set up */
29805 404: unknown;
29806 /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */
29807 422: unknown;
29808 };
29809 };
29810 /**
29811 * The "Remove team member" endpoint (described below) is deprecated.
29812 *
29813 * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.
29814 *
29815 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
29816 *
29817 * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
29818 *
29819 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
29820 */
29821 "teams/remove-member-legacy": {
29822 parameters: {
29823 path: {
29824 team_id: components["parameters"]["team-id"];
29825 username: components["parameters"]["username"];
29826 };
29827 };
29828 responses: {
29829 /** Response */
29830 204: never;
29831 /** Not Found if team synchronization is setup */
29832 404: unknown;
29833 };
29834 };
29835 /**
29836 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint.
29837 *
29838 * Team members will include the members of child teams.
29839 *
29840 * To get a user's membership with a team, the team must be visible to the authenticated user.
29841 *
29842 * **Note:**
29843 * The response contains the `state` of the membership and the member's `role`.
29844 *
29845 * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
29846 */
29847 "teams/get-membership-for-user-legacy": {
29848 parameters: {
29849 path: {
29850 team_id: components["parameters"]["team-id"];
29851 username: components["parameters"]["username"];
29852 };
29853 };
29854 responses: {
29855 /** Response */
29856 200: {
29857 content: {
29858 "application/json": components["schemas"]["team-membership"];
29859 };
29860 };
29861 404: components["responses"]["not_found"];
29862 };
29863 };
29864 /**
29865 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint.
29866 *
29867 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
29868 *
29869 * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
29870 *
29871 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
29872 *
29873 * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
29874 *
29875 * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
29876 */
29877 "teams/add-or-update-membership-for-user-legacy": {
29878 parameters: {
29879 path: {
29880 team_id: components["parameters"]["team-id"];
29881 username: components["parameters"]["username"];
29882 };
29883 };
29884 responses: {
29885 /** Response */
29886 200: {
29887 content: {
29888 "application/json": components["schemas"]["team-membership"];
29889 };
29890 };
29891 /** Forbidden if team synchronization is set up */
29892 403: unknown;
29893 404: components["responses"]["not_found"];
29894 /** Unprocessable Entity if you attempt to add an organization to a team */
29895 422: unknown;
29896 };
29897 requestBody: {
29898 content: {
29899 "application/json": {
29900 /**
29901 * The role that this user should have in the team. Can be one of:
29902 * \* `member` - a normal member of the team.
29903 * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
29904 */
29905 role?: "member" | "maintainer";
29906 };
29907 };
29908 };
29909 };
29910 /**
29911 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint.
29912 *
29913 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
29914 *
29915 * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
29916 *
29917 * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
29918 */
29919 "teams/remove-membership-for-user-legacy": {
29920 parameters: {
29921 path: {
29922 team_id: components["parameters"]["team-id"];
29923 username: components["parameters"]["username"];
29924 };
29925 };
29926 responses: {
29927 /** Response */
29928 204: never;
29929 /** if team synchronization is set up */
29930 403: unknown;
29931 };
29932 };
29933 /**
29934 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint.
29935 *
29936 * Lists the organization projects for a team.
29937 */
29938 "teams/list-projects-legacy": {
29939 parameters: {
29940 path: {
29941 team_id: components["parameters"]["team-id"];
29942 };
29943 query: {
29944 /** Results per page (max 100). */
29945 per_page?: components["parameters"]["per_page"];
29946 /** Page number of the results to fetch. */
29947 page?: components["parameters"]["page"];
29948 };
29949 };
29950 responses: {
29951 /** Response */
29952 200: {
29953 headers: {};
29954 content: {
29955 "application/json": components["schemas"]["team-project"][];
29956 };
29957 };
29958 404: components["responses"]["not_found"];
29959 415: components["responses"]["preview_header_missing"];
29960 };
29961 };
29962 /**
29963 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint.
29964 *
29965 * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
29966 */
29967 "teams/check-permissions-for-project-legacy": {
29968 parameters: {
29969 path: {
29970 team_id: components["parameters"]["team-id"];
29971 project_id: components["parameters"]["project-id"];
29972 };
29973 };
29974 responses: {
29975 /** Response */
29976 200: {
29977 content: {
29978 "application/json": components["schemas"]["team-project"];
29979 };
29980 };
29981 /** Not Found if project is not managed by this team */
29982 404: unknown;
29983 415: components["responses"]["preview_header_missing"];
29984 };
29985 };
29986 /**
29987 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint.
29988 *
29989 * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
29990 */
29991 "teams/add-or-update-project-permissions-legacy": {
29992 parameters: {
29993 path: {
29994 team_id: components["parameters"]["team-id"];
29995 project_id: components["parameters"]["project-id"];
29996 };
29997 };
29998 responses: {
29999 /** Response */
30000 204: never;
30001 /** Forbidden if the project is not owned by the organization */
30002 403: {
30003 content: {
30004 "application/json": {
30005 message?: string;
30006 documentation_url?: string;
30007 };
30008 };
30009 };
30010 404: components["responses"]["not_found"];
30011 415: components["responses"]["preview_header_missing"];
30012 422: components["responses"]["validation_failed"];
30013 };
30014 requestBody: {
30015 content: {
30016 "application/json": {
30017 /**
30018 * The permission to grant to the team for this project. Can be one of:
30019 * \* `read` - team members can read, but not write to or administer this project.
30020 * \* `write` - team members can read and write, but not administer this project.
30021 * \* `admin` - team members can read, write and administer this project.
30022 * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
30023 */
30024 permission?: "read" | "write" | "admin";
30025 };
30026 };
30027 };
30028 };
30029 /**
30030 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint.
30031 *
30032 * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it.
30033 */
30034 "teams/remove-project-legacy": {
30035 parameters: {
30036 path: {
30037 team_id: components["parameters"]["team-id"];
30038 project_id: components["parameters"]["project-id"];
30039 };
30040 };
30041 responses: {
30042 /** Response */
30043 204: never;
30044 404: components["responses"]["not_found"];
30045 415: components["responses"]["preview_header_missing"];
30046 422: components["responses"]["validation_failed"];
30047 };
30048 };
30049 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */
30050 "teams/list-repos-legacy": {
30051 parameters: {
30052 path: {
30053 team_id: components["parameters"]["team-id"];
30054 };
30055 query: {
30056 /** Results per page (max 100). */
30057 per_page?: components["parameters"]["per_page"];
30058 /** Page number of the results to fetch. */
30059 page?: components["parameters"]["page"];
30060 };
30061 };
30062 responses: {
30063 /** Response */
30064 200: {
30065 headers: {};
30066 content: {
30067 "application/json": components["schemas"]["minimal-repository"][];
30068 };
30069 };
30070 404: components["responses"]["not_found"];
30071 };
30072 };
30073 /**
30074 * **Note**: Repositories inherited through a parent team will also be checked.
30075 *
30076 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint.
30077 *
30078 * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
30079 */
30080 "teams/check-permissions-for-repo-legacy": {
30081 parameters: {
30082 path: {
30083 team_id: components["parameters"]["team-id"];
30084 owner: components["parameters"]["owner"];
30085 repo: components["parameters"]["repo"];
30086 };
30087 };
30088 responses: {
30089 /** Alternative response with extra repository information */
30090 200: {
30091 content: {
30092 "application/json": components["schemas"]["team-repository"];
30093 };
30094 };
30095 /** Response if repository is managed by this team */
30096 204: never;
30097 /** Not Found if repository is not managed by this team */
30098 404: unknown;
30099 };
30100 };
30101 /**
30102 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint.
30103 *
30104 * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.
30105 *
30106 * 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](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
30107 */
30108 "teams/add-or-update-repo-permissions-legacy": {
30109 parameters: {
30110 path: {
30111 team_id: components["parameters"]["team-id"];
30112 owner: components["parameters"]["owner"];
30113 repo: components["parameters"]["repo"];
30114 };
30115 };
30116 responses: {
30117 /** Response */
30118 204: never;
30119 403: components["responses"]["forbidden"];
30120 422: components["responses"]["validation_failed"];
30121 };
30122 requestBody: {
30123 content: {
30124 "application/json": {
30125 /**
30126 * The permission to grant the team on this repository. Can be one of:
30127 * \* `pull` - team members can pull, but not push to or administer this repository.
30128 * \* `push` - team members can pull and push, but not administer this repository.
30129 * \* `admin` - team members can pull, push and administer this repository.
30130 *
30131 * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.
30132 */
30133 permission?: "pull" | "push" | "admin";
30134 };
30135 };
30136 };
30137 };
30138 /**
30139 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint.
30140 *
30141 * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
30142 */
30143 "teams/remove-repo-legacy": {
30144 parameters: {
30145 path: {
30146 team_id: components["parameters"]["team-id"];
30147 owner: components["parameters"]["owner"];
30148 repo: components["parameters"]["repo"];
30149 };
30150 };
30151 responses: {
30152 /** Response */
30153 204: never;
30154 };
30155 };
30156 /**
30157 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint.
30158 *
30159 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30160 *
30161 * List IdP groups connected to a team on GitHub.
30162 */
30163 "teams/list-idp-groups-for-legacy": {
30164 parameters: {
30165 path: {
30166 team_id: components["parameters"]["team-id"];
30167 };
30168 };
30169 responses: {
30170 /** Response */
30171 200: {
30172 content: {
30173 "application/json": components["schemas"]["group-mapping"];
30174 };
30175 };
30176 403: components["responses"]["forbidden"];
30177 404: components["responses"]["not_found"];
30178 };
30179 };
30180 /**
30181 * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint.
30182 *
30183 * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30184 *
30185 * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
30186 */
30187 "teams/create-or-update-idp-group-connections-legacy": {
30188 parameters: {
30189 path: {
30190 team_id: components["parameters"]["team-id"];
30191 };
30192 };
30193 responses: {
30194 /** Response */
30195 200: {
30196 content: {
30197 "application/json": components["schemas"]["group-mapping"];
30198 };
30199 };
30200 403: components["responses"]["forbidden"];
30201 422: components["responses"]["validation_failed"];
30202 };
30203 requestBody: {
30204 content: {
30205 "application/json": {
30206 /** The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */
30207 groups: {
30208 /** ID of the IdP group. */
30209 group_id: string;
30210 /** Name of the IdP group. */
30211 group_name: string;
30212 /** Description of the IdP group. */
30213 group_description: string;
30214 id?: string;
30215 name?: string;
30216 description?: string;
30217 }[];
30218 synced_at?: string;
30219 };
30220 };
30221 };
30222 };
30223 /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */
30224 "teams/list-child-legacy": {
30225 parameters: {
30226 path: {
30227 team_id: components["parameters"]["team-id"];
30228 };
30229 query: {
30230 /** Results per page (max 100). */
30231 per_page?: components["parameters"]["per_page"];
30232 /** Page number of the results to fetch. */
30233 page?: components["parameters"]["page"];
30234 };
30235 };
30236 responses: {
30237 /** if child teams exist */
30238 200: {
30239 headers: {};
30240 content: {
30241 "application/json": components["schemas"]["team"][];
30242 };
30243 };
30244 403: components["responses"]["forbidden"];
30245 404: components["responses"]["not_found"];
30246 422: components["responses"]["validation_failed"];
30247 };
30248 };
30249 /**
30250 * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information.
30251 *
30252 * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.
30253 */
30254 "users/get-authenticated": {
30255 parameters: {};
30256 responses: {
30257 /** Response */
30258 200: {
30259 content: {
30260 "application/json":
30261 | components["schemas"]["private-user"]
30262 | components["schemas"]["public-user"];
30263 };
30264 };
30265 304: components["responses"]["not_modified"];
30266 401: components["responses"]["requires_authentication"];
30267 403: components["responses"]["forbidden"];
30268 };
30269 };
30270 /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */
30271 "users/update-authenticated": {
30272 parameters: {};
30273 responses: {
30274 /** Response */
30275 200: {
30276 content: {
30277 "application/json": components["schemas"]["private-user"];
30278 };
30279 };
30280 304: components["responses"]["not_modified"];
30281 401: components["responses"]["requires_authentication"];
30282 403: components["responses"]["forbidden"];
30283 404: components["responses"]["not_found"];
30284 422: components["responses"]["validation_failed"];
30285 };
30286 requestBody: {
30287 content: {
30288 "application/json": {
30289 /** The new name of the user. */
30290 name?: string;
30291 /** The publicly visible email address of the user. */
30292 email?: string;
30293 /** The new blog URL of the user. */
30294 blog?: string;
30295 /** The new Twitter username of the user. */
30296 twitter_username?: string | null;
30297 /** The new company of the user. */
30298 company?: string;
30299 /** The new location of the user. */
30300 location?: string;
30301 /** The new hiring availability of the user. */
30302 hireable?: boolean;
30303 /** The new short biography of the user. */
30304 bio?: string;
30305 };
30306 };
30307 };
30308 };
30309 /** List the users you've blocked on your personal account. */
30310 "users/list-blocked-by-authenticated": {
30311 parameters: {};
30312 responses: {
30313 /** Response */
30314 200: {
30315 content: {
30316 "application/json": components["schemas"]["simple-user"][];
30317 };
30318 };
30319 304: components["responses"]["not_modified"];
30320 401: components["responses"]["requires_authentication"];
30321 403: components["responses"]["forbidden"];
30322 404: components["responses"]["not_found"];
30323 415: components["responses"]["preview_header_missing"];
30324 };
30325 };
30326 "users/check-blocked": {
30327 parameters: {
30328 path: {
30329 username: components["parameters"]["username"];
30330 };
30331 };
30332 responses: {
30333 /** If the user is blocked: */
30334 204: never;
30335 304: components["responses"]["not_modified"];
30336 401: components["responses"]["requires_authentication"];
30337 403: components["responses"]["forbidden"];
30338 /** If the user is not blocked: */
30339 404: {
30340 content: {
30341 "application/json": components["schemas"]["basic-error"];
30342 };
30343 };
30344 };
30345 };
30346 "users/block": {
30347 parameters: {
30348 path: {
30349 username: components["parameters"]["username"];
30350 };
30351 };
30352 responses: {
30353 /** Response */
30354 204: never;
30355 304: components["responses"]["not_modified"];
30356 401: components["responses"]["requires_authentication"];
30357 403: components["responses"]["forbidden"];
30358 404: components["responses"]["not_found"];
30359 422: components["responses"]["validation_failed"];
30360 };
30361 };
30362 "users/unblock": {
30363 parameters: {
30364 path: {
30365 username: components["parameters"]["username"];
30366 };
30367 };
30368 responses: {
30369 /** Response */
30370 204: never;
30371 304: components["responses"]["not_modified"];
30372 401: components["responses"]["requires_authentication"];
30373 403: components["responses"]["forbidden"];
30374 404: components["responses"]["not_found"];
30375 };
30376 };
30377 /** Sets the visibility for your primary email addresses. */
30378 "users/set-primary-email-visibility-for-authenticated": {
30379 parameters: {};
30380 responses: {
30381 /** Response */
30382 200: {
30383 content: {
30384 "application/json": components["schemas"]["email"][];
30385 };
30386 };
30387 304: components["responses"]["not_modified"];
30388 401: components["responses"]["requires_authentication"];
30389 403: components["responses"]["forbidden"];
30390 404: components["responses"]["not_found"];
30391 422: components["responses"]["validation_failed"];
30392 };
30393 requestBody: {
30394 content: {
30395 "application/json": {
30396 /** Denotes whether an email is publicly visible. */
30397 visibility: "public" | "private";
30398 };
30399 };
30400 };
30401 };
30402 /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */
30403 "users/list-emails-for-authenticated": {
30404 parameters: {
30405 query: {
30406 /** Results per page (max 100). */
30407 per_page?: components["parameters"]["per_page"];
30408 /** Page number of the results to fetch. */
30409 page?: components["parameters"]["page"];
30410 };
30411 };
30412 responses: {
30413 /** Response */
30414 200: {
30415 headers: {};
30416 content: {
30417 "application/json": components["schemas"]["email"][];
30418 };
30419 };
30420 304: components["responses"]["not_modified"];
30421 401: components["responses"]["requires_authentication"];
30422 403: components["responses"]["forbidden"];
30423 404: components["responses"]["not_found"];
30424 };
30425 };
30426 /** This endpoint is accessible with the `user` scope. */
30427 "users/add-email-for-authenticated": {
30428 parameters: {};
30429 responses: {
30430 /** Response */
30431 201: {
30432 content: {
30433 "application/json": components["schemas"]["email"][];
30434 };
30435 };
30436 304: components["responses"]["not_modified"];
30437 401: components["responses"]["requires_authentication"];
30438 403: components["responses"]["forbidden"];
30439 404: components["responses"]["not_found"];
30440 422: components["responses"]["validation_failed"];
30441 };
30442 requestBody: {
30443 content: {
30444 "application/json": {
30445 /** Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. */
30446 emails: string[];
30447 };
30448 };
30449 };
30450 };
30451 /** This endpoint is accessible with the `user` scope. */
30452 "users/delete-email-for-authenticated": {
30453 parameters: {};
30454 responses: {
30455 /** Response */
30456 204: never;
30457 304: components["responses"]["not_modified"];
30458 401: components["responses"]["requires_authentication"];
30459 403: components["responses"]["forbidden"];
30460 404: components["responses"]["not_found"];
30461 422: components["responses"]["validation_failed"];
30462 };
30463 requestBody: {
30464 content: {
30465 "application/json": {
30466 /** Email addresses associated with the GitHub user account. */
30467 emails: string[];
30468 };
30469 };
30470 };
30471 };
30472 /** Lists the people following the authenticated user. */
30473 "users/list-followers-for-authenticated-user": {
30474 parameters: {
30475 query: {
30476 /** Results per page (max 100). */
30477 per_page?: components["parameters"]["per_page"];
30478 /** Page number of the results to fetch. */
30479 page?: components["parameters"]["page"];
30480 };
30481 };
30482 responses: {
30483 /** Response */
30484 200: {
30485 headers: {};
30486 content: {
30487 "application/json": components["schemas"]["simple-user"][];
30488 };
30489 };
30490 304: components["responses"]["not_modified"];
30491 401: components["responses"]["requires_authentication"];
30492 403: components["responses"]["forbidden"];
30493 };
30494 };
30495 /** Lists the people who the authenticated user follows. */
30496 "users/list-followed-by-authenticated": {
30497 parameters: {
30498 query: {
30499 /** Results per page (max 100). */
30500 per_page?: components["parameters"]["per_page"];
30501 /** Page number of the results to fetch. */
30502 page?: components["parameters"]["page"];
30503 };
30504 };
30505 responses: {
30506 /** Response */
30507 200: {
30508 headers: {};
30509 content: {
30510 "application/json": components["schemas"]["simple-user"][];
30511 };
30512 };
30513 304: components["responses"]["not_modified"];
30514 401: components["responses"]["requires_authentication"];
30515 403: components["responses"]["forbidden"];
30516 };
30517 };
30518 "users/check-person-is-followed-by-authenticated": {
30519 parameters: {
30520 path: {
30521 username: components["parameters"]["username"];
30522 };
30523 };
30524 responses: {
30525 /** if the person is followed by the authenticated user */
30526 204: never;
30527 304: components["responses"]["not_modified"];
30528 401: components["responses"]["requires_authentication"];
30529 403: components["responses"]["forbidden"];
30530 /** if the person is not followed by the authenticated user */
30531 404: {
30532 content: {
30533 "application/json": components["schemas"]["basic-error"];
30534 };
30535 };
30536 };
30537 };
30538 /**
30539 * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
30540 *
30541 * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
30542 */
30543 "users/follow": {
30544 parameters: {
30545 path: {
30546 username: components["parameters"]["username"];
30547 };
30548 };
30549 responses: {
30550 /** Response */
30551 204: never;
30552 304: components["responses"]["not_modified"];
30553 401: components["responses"]["requires_authentication"];
30554 403: components["responses"]["forbidden"];
30555 404: components["responses"]["not_found"];
30556 };
30557 };
30558 /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */
30559 "users/unfollow": {
30560 parameters: {
30561 path: {
30562 username: components["parameters"]["username"];
30563 };
30564 };
30565 responses: {
30566 /** Response */
30567 204: never;
30568 304: components["responses"]["not_modified"];
30569 401: components["responses"]["requires_authentication"];
30570 403: components["responses"]["forbidden"];
30571 404: components["responses"]["not_found"];
30572 };
30573 };
30574 /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30575 "users/list-gpg-keys-for-authenticated": {
30576 parameters: {
30577 query: {
30578 /** Results per page (max 100). */
30579 per_page?: components["parameters"]["per_page"];
30580 /** Page number of the results to fetch. */
30581 page?: components["parameters"]["page"];
30582 };
30583 };
30584 responses: {
30585 /** Response */
30586 200: {
30587 headers: {};
30588 content: {
30589 "application/json": components["schemas"]["gpg-key"][];
30590 };
30591 };
30592 304: components["responses"]["not_modified"];
30593 401: components["responses"]["requires_authentication"];
30594 403: components["responses"]["forbidden"];
30595 404: components["responses"]["not_found"];
30596 };
30597 };
30598 /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30599 "users/create-gpg-key-for-authenticated": {
30600 parameters: {};
30601 responses: {
30602 /** Response */
30603 201: {
30604 content: {
30605 "application/json": components["schemas"]["gpg-key"];
30606 };
30607 };
30608 304: components["responses"]["not_modified"];
30609 401: components["responses"]["requires_authentication"];
30610 403: components["responses"]["forbidden"];
30611 404: components["responses"]["not_found"];
30612 422: components["responses"]["validation_failed"];
30613 };
30614 requestBody: {
30615 content: {
30616 "application/json": {
30617 /** A GPG key in ASCII-armored format. */
30618 armored_public_key: string;
30619 };
30620 };
30621 };
30622 };
30623 /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30624 "users/get-gpg-key-for-authenticated": {
30625 parameters: {
30626 path: {
30627 /** gpg_key_id parameter */
30628 gpg_key_id: components["parameters"]["gpg_key_id"];
30629 };
30630 };
30631 responses: {
30632 /** Response */
30633 200: {
30634 content: {
30635 "application/json": components["schemas"]["gpg-key"];
30636 };
30637 };
30638 304: components["responses"]["not_modified"];
30639 401: components["responses"]["requires_authentication"];
30640 403: components["responses"]["forbidden"];
30641 404: components["responses"]["not_found"];
30642 };
30643 };
30644 /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30645 "users/delete-gpg-key-for-authenticated": {
30646 parameters: {
30647 path: {
30648 /** gpg_key_id parameter */
30649 gpg_key_id: components["parameters"]["gpg_key_id"];
30650 };
30651 };
30652 responses: {
30653 /** Response */
30654 204: never;
30655 304: components["responses"]["not_modified"];
30656 401: components["responses"]["requires_authentication"];
30657 403: components["responses"]["forbidden"];
30658 404: components["responses"]["not_found"];
30659 422: components["responses"]["validation_failed"];
30660 };
30661 };
30662 /**
30663 * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
30664 *
30665 * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
30666 *
30667 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
30668 *
30669 * You can find the permissions for the installation under the `permissions` key.
30670 */
30671 "apps/list-installations-for-authenticated-user": {
30672 parameters: {
30673 query: {
30674 /** Results per page (max 100). */
30675 per_page?: components["parameters"]["per_page"];
30676 /** Page number of the results to fetch. */
30677 page?: components["parameters"]["page"];
30678 };
30679 };
30680 responses: {
30681 /** You can find the permissions for the installation under the `permissions` key. */
30682 200: {
30683 headers: {};
30684 content: {
30685 "application/json": {
30686 total_count: number;
30687 installations: components["schemas"]["installation"][];
30688 };
30689 };
30690 };
30691 304: components["responses"]["not_modified"];
30692 401: components["responses"]["requires_authentication"];
30693 403: components["responses"]["forbidden"];
30694 415: components["responses"]["preview_header_missing"];
30695 };
30696 };
30697 /**
30698 * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.
30699 *
30700 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
30701 *
30702 * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
30703 *
30704 * The access the user has to each repository is included in the hash under the `permissions` key.
30705 */
30706 "apps/list-installation-repos-for-authenticated-user": {
30707 parameters: {
30708 path: {
30709 /** installation_id parameter */
30710 installation_id: components["parameters"]["installation_id"];
30711 };
30712 query: {
30713 /** Results per page (max 100). */
30714 per_page?: components["parameters"]["per_page"];
30715 /** Page number of the results to fetch. */
30716 page?: components["parameters"]["page"];
30717 };
30718 };
30719 responses: {
30720 /** The access the user has to each repository is included in the hash under the `permissions` key. */
30721 200: {
30722 headers: {};
30723 content: {
30724 "application/json": {
30725 total_count: number;
30726 repository_selection?: string;
30727 repositories: components["schemas"]["repository"][];
30728 };
30729 };
30730 };
30731 304: components["responses"]["not_modified"];
30732 403: components["responses"]["forbidden"];
30733 404: components["responses"]["not_found"];
30734 };
30735 };
30736 /**
30737 * Add a single repository to an installation. The authenticated user must have admin access to the repository.
30738 *
30739 * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
30740 */
30741 "apps/add-repo-to-installation": {
30742 parameters: {
30743 path: {
30744 /** installation_id parameter */
30745 installation_id: components["parameters"]["installation_id"];
30746 repository_id: components["parameters"]["repository_id"];
30747 };
30748 };
30749 responses: {
30750 /** Response */
30751 204: never;
30752 304: components["responses"]["not_modified"];
30753 403: components["responses"]["forbidden"];
30754 404: components["responses"]["not_found"];
30755 };
30756 };
30757 /**
30758 * Remove a single repository from an installation. The authenticated user must have admin access to the repository.
30759 *
30760 * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
30761 */
30762 "apps/remove-repo-from-installation": {
30763 parameters: {
30764 path: {
30765 /** installation_id parameter */
30766 installation_id: components["parameters"]["installation_id"];
30767 repository_id: components["parameters"]["repository_id"];
30768 };
30769 };
30770 responses: {
30771 /** Response */
30772 204: never;
30773 304: components["responses"]["not_modified"];
30774 403: components["responses"]["forbidden"];
30775 404: components["responses"]["not_found"];
30776 };
30777 };
30778 /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */
30779 "interactions/get-restrictions-for-authenticated-user": {
30780 responses: {
30781 /** Default response */
30782 200: {
30783 content: {
30784 "application/json": Partial<
30785 components["schemas"]["interaction-limit-response"]
30786 > &
30787 Partial<{ [key: string]: any }>;
30788 };
30789 };
30790 /** Response when there are no restrictions */
30791 204: never;
30792 };
30793 };
30794 /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */
30795 "interactions/set-restrictions-for-authenticated-user": {
30796 responses: {
30797 /** Response */
30798 200: {
30799 content: {
30800 "application/json": components["schemas"]["interaction-limit-response"];
30801 };
30802 };
30803 422: components["responses"]["validation_failed"];
30804 };
30805 requestBody: {
30806 content: {
30807 "application/json": components["schemas"]["interaction-limit"];
30808 };
30809 };
30810 };
30811 /** Removes any interaction restrictions from your public repositories. */
30812 "interactions/remove-restrictions-for-authenticated-user": {
30813 responses: {
30814 /** Response */
30815 204: never;
30816 };
30817 };
30818 /**
30819 * List issues across owned and member repositories assigned to the authenticated user.
30820 *
30821 * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
30822 * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
30823 * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
30824 * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
30825 */
30826 "issues/list-for-authenticated-user": {
30827 parameters: {
30828 query: {
30829 /**
30830 * Indicates which sorts of issues to return. Can be one of:
30831 * \* `assigned`: Issues assigned to you
30832 * \* `created`: Issues created by you
30833 * \* `mentioned`: Issues mentioning you
30834 * \* `subscribed`: Issues you're subscribed to updates for
30835 * \* `all`: All issues the authenticated user can see, regardless of participation or creation
30836 */
30837 filter?:
30838 | "assigned"
30839 | "created"
30840 | "mentioned"
30841 | "subscribed"
30842 | "repos"
30843 | "all";
30844 /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */
30845 state?: "open" | "closed" | "all";
30846 /** A list of comma separated label names. Example: `bug,ui,@high` */
30847 labels?: components["parameters"]["labels"];
30848 /** What to sort results by. Can be either `created`, `updated`, `comments`. */
30849 sort?: "created" | "updated" | "comments";
30850 /** One of `asc` (ascending) or `desc` (descending). */
30851 direction?: components["parameters"]["direction"];
30852 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
30853 since?: components["parameters"]["since"];
30854 /** Results per page (max 100). */
30855 per_page?: components["parameters"]["per_page"];
30856 /** Page number of the results to fetch. */
30857 page?: components["parameters"]["page"];
30858 };
30859 };
30860 responses: {
30861 /** Response */
30862 200: {
30863 headers: {};
30864 content: {
30865 "application/json": components["schemas"]["issue"][];
30866 };
30867 };
30868 304: components["responses"]["not_modified"];
30869 404: components["responses"]["not_found"];
30870 };
30871 };
30872 /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30873 "users/list-public-ssh-keys-for-authenticated": {
30874 parameters: {
30875 query: {
30876 /** Results per page (max 100). */
30877 per_page?: components["parameters"]["per_page"];
30878 /** Page number of the results to fetch. */
30879 page?: components["parameters"]["page"];
30880 };
30881 };
30882 responses: {
30883 /** Response */
30884 200: {
30885 headers: {};
30886 content: {
30887 "application/json": components["schemas"]["key"][];
30888 };
30889 };
30890 304: components["responses"]["not_modified"];
30891 401: components["responses"]["requires_authentication"];
30892 403: components["responses"]["forbidden"];
30893 404: components["responses"]["not_found"];
30894 };
30895 };
30896 /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30897 "users/create-public-ssh-key-for-authenticated": {
30898 parameters: {};
30899 responses: {
30900 /** Response */
30901 201: {
30902 content: {
30903 "application/json": components["schemas"]["key"];
30904 };
30905 };
30906 304: components["responses"]["not_modified"];
30907 401: components["responses"]["requires_authentication"];
30908 403: components["responses"]["forbidden"];
30909 404: components["responses"]["not_found"];
30910 422: components["responses"]["validation_failed"];
30911 };
30912 requestBody: {
30913 content: {
30914 "application/json": {
30915 /** A descriptive name for the new key. */
30916 title?: string;
30917 /** The public SSH key to add to your GitHub account. */
30918 key: string;
30919 };
30920 };
30921 };
30922 };
30923 /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30924 "users/get-public-ssh-key-for-authenticated": {
30925 parameters: {
30926 path: {
30927 /** key_id parameter */
30928 key_id: components["parameters"]["key_id"];
30929 };
30930 };
30931 responses: {
30932 /** Response */
30933 200: {
30934 content: {
30935 "application/json": components["schemas"]["key"];
30936 };
30937 };
30938 304: components["responses"]["not_modified"];
30939 401: components["responses"]["requires_authentication"];
30940 403: components["responses"]["forbidden"];
30941 404: components["responses"]["not_found"];
30942 };
30943 };
30944 /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */
30945 "users/delete-public-ssh-key-for-authenticated": {
30946 parameters: {
30947 path: {
30948 /** key_id parameter */
30949 key_id: components["parameters"]["key_id"];
30950 };
30951 };
30952 responses: {
30953 /** Response */
30954 204: never;
30955 304: components["responses"]["not_modified"];
30956 401: components["responses"]["requires_authentication"];
30957 403: components["responses"]["forbidden"];
30958 404: components["responses"]["not_found"];
30959 };
30960 };
30961 /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */
30962 "apps/list-subscriptions-for-authenticated-user": {
30963 parameters: {
30964 query: {
30965 /** Results per page (max 100). */
30966 per_page?: components["parameters"]["per_page"];
30967 /** Page number of the results to fetch. */
30968 page?: components["parameters"]["page"];
30969 };
30970 };
30971 responses: {
30972 /** Response */
30973 200: {
30974 headers: {};
30975 content: {
30976 "application/json": components["schemas"]["user-marketplace-purchase"][];
30977 };
30978 };
30979 304: components["responses"]["not_modified"];
30980 401: components["responses"]["requires_authentication"];
30981 404: components["responses"]["not_found"];
30982 };
30983 };
30984 /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */
30985 "apps/list-subscriptions-for-authenticated-user-stubbed": {
30986 parameters: {
30987 query: {
30988 /** Results per page (max 100). */
30989 per_page?: components["parameters"]["per_page"];
30990 /** Page number of the results to fetch. */
30991 page?: components["parameters"]["page"];
30992 };
30993 };
30994 responses: {
30995 /** Response */
30996 200: {
30997 headers: {};
30998 content: {
30999 "application/json": components["schemas"]["user-marketplace-purchase"][];
31000 };
31001 };
31002 304: components["responses"]["not_modified"];
31003 401: components["responses"]["requires_authentication"];
31004 };
31005 };
31006 "orgs/list-memberships-for-authenticated-user": {
31007 parameters: {
31008 query: {
31009 /** Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. */
31010 state?: "active" | "pending";
31011 /** Results per page (max 100). */
31012 per_page?: components["parameters"]["per_page"];
31013 /** Page number of the results to fetch. */
31014 page?: components["parameters"]["page"];
31015 };
31016 };
31017 responses: {
31018 /** Response */
31019 200: {
31020 headers: {};
31021 content: {
31022 "application/json": components["schemas"]["org-membership"][];
31023 };
31024 };
31025 304: components["responses"]["not_modified"];
31026 401: components["responses"]["requires_authentication"];
31027 403: components["responses"]["forbidden"];
31028 422: components["responses"]["validation_failed"];
31029 };
31030 };
31031 "orgs/get-membership-for-authenticated-user": {
31032 parameters: {
31033 path: {
31034 org: components["parameters"]["org"];
31035 };
31036 };
31037 responses: {
31038 /** Response */
31039 200: {
31040 content: {
31041 "application/json": components["schemas"]["org-membership"];
31042 };
31043 };
31044 403: components["responses"]["forbidden"];
31045 404: components["responses"]["not_found"];
31046 };
31047 };
31048 "orgs/update-membership-for-authenticated-user": {
31049 parameters: {
31050 path: {
31051 org: components["parameters"]["org"];
31052 };
31053 };
31054 responses: {
31055 /** Response */
31056 200: {
31057 content: {
31058 "application/json": components["schemas"]["org-membership"];
31059 };
31060 };
31061 403: components["responses"]["forbidden"];
31062 404: components["responses"]["not_found"];
31063 422: components["responses"]["validation_failed"];
31064 };
31065 requestBody: {
31066 content: {
31067 "application/json": {
31068 /** The state that the membership should be in. Only `"active"` will be accepted. */
31069 state: "active";
31070 };
31071 };
31072 };
31073 };
31074 /** Lists all migrations a user has started. */
31075 "migrations/list-for-authenticated-user": {
31076 parameters: {
31077 query: {
31078 /** Results per page (max 100). */
31079 per_page?: components["parameters"]["per_page"];
31080 /** Page number of the results to fetch. */
31081 page?: components["parameters"]["page"];
31082 };
31083 };
31084 responses: {
31085 /** Response */
31086 200: {
31087 headers: {};
31088 content: {
31089 "application/json": components["schemas"]["migration"][];
31090 };
31091 };
31092 304: components["responses"]["not_modified"];
31093 401: components["responses"]["requires_authentication"];
31094 403: components["responses"]["forbidden"];
31095 };
31096 };
31097 /** Initiates the generation of a user migration archive. */
31098 "migrations/start-for-authenticated-user": {
31099 parameters: {};
31100 responses: {
31101 /** Response */
31102 201: {
31103 content: {
31104 "application/json": components["schemas"]["migration"];
31105 };
31106 };
31107 304: components["responses"]["not_modified"];
31108 401: components["responses"]["requires_authentication"];
31109 403: components["responses"]["forbidden"];
31110 422: components["responses"]["validation_failed"];
31111 };
31112 requestBody: {
31113 content: {
31114 "application/json": {
31115 /** Lock the repositories being migrated at the start of the migration */
31116 lock_repositories?: boolean;
31117 /** Do not include attachments in the migration */
31118 exclude_attachments?: boolean;
31119 /** Exclude attributes from the API response to improve performance */
31120 exclude?: "repositories"[];
31121 repositories: string[];
31122 };
31123 };
31124 };
31125 };
31126 /**
31127 * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:
31128 *
31129 * * `pending` - the migration hasn't started yet.
31130 * * `exporting` - the migration is in progress.
31131 * * `exported` - the migration finished successfully.
31132 * * `failed` - the migration failed.
31133 *
31134 * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive).
31135 */
31136 "migrations/get-status-for-authenticated-user": {
31137 parameters: {
31138 path: {
31139 /** migration_id parameter */
31140 migration_id: components["parameters"]["migration_id"];
31141 };
31142 query: {
31143 exclude?: string[];
31144 };
31145 };
31146 responses: {
31147 /** Response */
31148 200: {
31149 content: {
31150 "application/json": components["schemas"]["migration"];
31151 };
31152 };
31153 304: components["responses"]["not_modified"];
31154 401: components["responses"]["requires_authentication"];
31155 403: components["responses"]["forbidden"];
31156 404: components["responses"]["not_found"];
31157 };
31158 };
31159 /**
31160 * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:
31161 *
31162 * * attachments
31163 * * bases
31164 * * commit\_comments
31165 * * issue\_comments
31166 * * issue\_events
31167 * * issues
31168 * * milestones
31169 * * organizations
31170 * * projects
31171 * * protected\_branches
31172 * * pull\_request\_reviews
31173 * * pull\_requests
31174 * * releases
31175 * * repositories
31176 * * review\_comments
31177 * * schema
31178 * * users
31179 *
31180 * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.
31181 */
31182 "migrations/get-archive-for-authenticated-user": {
31183 parameters: {
31184 path: {
31185 /** migration_id parameter */
31186 migration_id: components["parameters"]["migration_id"];
31187 };
31188 };
31189 responses: {
31190 /** Response */
31191 302: never;
31192 304: components["responses"]["not_modified"];
31193 401: components["responses"]["requires_authentication"];
31194 403: components["responses"]["forbidden"];
31195 };
31196 };
31197 /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */
31198 "migrations/delete-archive-for-authenticated-user": {
31199 parameters: {
31200 path: {
31201 /** migration_id parameter */
31202 migration_id: components["parameters"]["migration_id"];
31203 };
31204 };
31205 responses: {
31206 /** Response */
31207 204: never;
31208 304: components["responses"]["not_modified"];
31209 401: components["responses"]["requires_authentication"];
31210 403: components["responses"]["forbidden"];
31211 404: components["responses"]["not_found"];
31212 };
31213 };
31214 /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */
31215 "migrations/unlock-repo-for-authenticated-user": {
31216 parameters: {
31217 path: {
31218 /** migration_id parameter */
31219 migration_id: components["parameters"]["migration_id"];
31220 /** repo_name parameter */
31221 repo_name: components["parameters"]["repo_name"];
31222 };
31223 };
31224 responses: {
31225 /** Response */
31226 204: never;
31227 304: components["responses"]["not_modified"];
31228 401: components["responses"]["requires_authentication"];
31229 403: components["responses"]["forbidden"];
31230 404: components["responses"]["not_found"];
31231 };
31232 };
31233 /** Lists all the repositories for this user migration. */
31234 "migrations/list-repos-for-user": {
31235 parameters: {
31236 path: {
31237 /** migration_id parameter */
31238 migration_id: components["parameters"]["migration_id"];
31239 };
31240 query: {
31241 /** Results per page (max 100). */
31242 per_page?: components["parameters"]["per_page"];
31243 /** Page number of the results to fetch. */
31244 page?: components["parameters"]["page"];
31245 };
31246 };
31247 responses: {
31248 /** Response */
31249 200: {
31250 headers: {};
31251 content: {
31252 "application/json": components["schemas"]["minimal-repository"][];
31253 };
31254 };
31255 404: components["responses"]["not_found"];
31256 };
31257 };
31258 /**
31259 * List organizations for the authenticated user.
31260 *
31261 * **OAuth scope requirements**
31262 *
31263 * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response.
31264 */
31265 "orgs/list-for-authenticated-user": {
31266 parameters: {
31267 query: {
31268 /** Results per page (max 100). */
31269 per_page?: components["parameters"]["per_page"];
31270 /** Page number of the results to fetch. */
31271 page?: components["parameters"]["page"];
31272 };
31273 };
31274 responses: {
31275 /** Response */
31276 200: {
31277 headers: {};
31278 content: {
31279 "application/json": components["schemas"]["organization-simple"][];
31280 };
31281 };
31282 304: components["responses"]["not_modified"];
31283 401: components["responses"]["requires_authentication"];
31284 403: components["responses"]["forbidden"];
31285 };
31286 };
31287 /**
31288 * Gets a specific package for a package owned by the authenticated user.
31289 *
31290 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
31291 * If `package_type` is not `container`, your token must also include the `repo` scope.
31292 */
31293 "packages/get-package-for-authenticated-user": {
31294 parameters: {
31295 path: {
31296 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31297 package_type: components["parameters"]["package_type"];
31298 /** The name of the package. */
31299 package_name: components["parameters"]["package_name"];
31300 };
31301 };
31302 responses: {
31303 /** Response */
31304 200: {
31305 content: {
31306 "application/json": components["schemas"]["package"];
31307 };
31308 };
31309 };
31310 };
31311 /**
31312 * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
31313 *
31314 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope.
31315 * If `package_type` is not `container`, your token must also include the `repo` scope.
31316 */
31317 "packages/delete-package-for-authenticated-user": {
31318 parameters: {
31319 path: {
31320 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31321 package_type: components["parameters"]["package_type"];
31322 /** The name of the package. */
31323 package_name: components["parameters"]["package_name"];
31324 };
31325 };
31326 responses: {
31327 /** Response */
31328 204: never;
31329 401: components["responses"]["requires_authentication"];
31330 403: components["responses"]["forbidden"];
31331 404: components["responses"]["not_found"];
31332 };
31333 };
31334 /**
31335 * Restores a package owned by the authenticated user.
31336 *
31337 * You can restore a deleted package under the following conditions:
31338 * - The package was deleted within the last 30 days.
31339 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
31340 *
31341 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.
31342 */
31343 "packages/restore-package-for-authenticated-user": {
31344 parameters: {
31345 path: {
31346 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31347 package_type: components["parameters"]["package_type"];
31348 /** The name of the package. */
31349 package_name: components["parameters"]["package_name"];
31350 };
31351 query: {
31352 /** package token */
31353 token?: string;
31354 };
31355 };
31356 responses: {
31357 /** Response */
31358 204: never;
31359 401: components["responses"]["requires_authentication"];
31360 403: components["responses"]["forbidden"];
31361 404: components["responses"]["not_found"];
31362 };
31363 };
31364 /**
31365 * Returns all package versions for a package owned by the authenticated user.
31366 *
31367 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
31368 * If `package_type` is not `container`, your token must also include the `repo` scope.
31369 */
31370 "packages/get-all-package-versions-for-package-owned-by-authenticated-user": {
31371 parameters: {
31372 path: {
31373 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31374 package_type: components["parameters"]["package_type"];
31375 /** The name of the package. */
31376 package_name: components["parameters"]["package_name"];
31377 };
31378 query: {
31379 /** Page number of the results to fetch. */
31380 page?: components["parameters"]["page"];
31381 /** Results per page (max 100). */
31382 per_page?: components["parameters"]["per_page"];
31383 /** The state of the package, either active or deleted. */
31384 state?: "active" | "deleted";
31385 };
31386 };
31387 responses: {
31388 /** Response */
31389 200: {
31390 content: {
31391 "application/json": components["schemas"]["package-version"][];
31392 };
31393 };
31394 401: components["responses"]["requires_authentication"];
31395 403: components["responses"]["forbidden"];
31396 404: components["responses"]["not_found"];
31397 };
31398 };
31399 /**
31400 * Gets a specific package version for a package owned by the authenticated user.
31401 *
31402 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
31403 * If `package_type` is not `container`, your token must also include the `repo` scope.
31404 */
31405 "packages/get-package-version-for-authenticated-user": {
31406 parameters: {
31407 path: {
31408 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31409 package_type: components["parameters"]["package_type"];
31410 /** The name of the package. */
31411 package_name: components["parameters"]["package_name"];
31412 /** Unique identifier of the package version. */
31413 package_version_id: components["parameters"]["package_version_id"];
31414 };
31415 };
31416 responses: {
31417 /** Response */
31418 200: {
31419 content: {
31420 "application/json": components["schemas"]["package-version"];
31421 };
31422 };
31423 };
31424 };
31425 /**
31426 * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
31427 *
31428 * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope.
31429 * If `package_type` is not `container`, your token must also include the `repo` scope.
31430 */
31431 "packages/delete-package-version-for-authenticated-user": {
31432 parameters: {
31433 path: {
31434 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31435 package_type: components["parameters"]["package_type"];
31436 /** The name of the package. */
31437 package_name: components["parameters"]["package_name"];
31438 /** Unique identifier of the package version. */
31439 package_version_id: components["parameters"]["package_version_id"];
31440 };
31441 };
31442 responses: {
31443 /** Response */
31444 204: never;
31445 401: components["responses"]["requires_authentication"];
31446 403: components["responses"]["forbidden"];
31447 404: components["responses"]["not_found"];
31448 };
31449 };
31450 /**
31451 * Restores a package version owned by the authenticated user.
31452 *
31453 * You can restore a deleted package version under the following conditions:
31454 * - The package was deleted within the last 30 days.
31455 * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
31456 *
31457 * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.
31458 */
31459 "packages/restore-package-version-for-authenticated-user": {
31460 parameters: {
31461 path: {
31462 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
31463 package_type: components["parameters"]["package_type"];
31464 /** The name of the package. */
31465 package_name: components["parameters"]["package_name"];
31466 /** Unique identifier of the package version. */
31467 package_version_id: components["parameters"]["package_version_id"];
31468 };
31469 };
31470 responses: {
31471 /** Response */
31472 204: never;
31473 401: components["responses"]["requires_authentication"];
31474 403: components["responses"]["forbidden"];
31475 404: components["responses"]["not_found"];
31476 };
31477 };
31478 "projects/create-for-authenticated-user": {
31479 parameters: {};
31480 responses: {
31481 /** Response */
31482 201: {
31483 content: {
31484 "application/json": components["schemas"]["project"];
31485 };
31486 };
31487 304: components["responses"]["not_modified"];
31488 401: components["responses"]["requires_authentication"];
31489 403: components["responses"]["forbidden"];
31490 415: components["responses"]["preview_header_missing"];
31491 422: components["responses"]["validation_failed_simple"];
31492 };
31493 requestBody: {
31494 content: {
31495 "application/json": {
31496 /** Name of the project */
31497 name: string;
31498 /** Body of the project */
31499 body?: string | null;
31500 };
31501 };
31502 };
31503 };
31504 /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */
31505 "users/list-public-emails-for-authenticated": {
31506 parameters: {
31507 query: {
31508 /** Results per page (max 100). */
31509 per_page?: components["parameters"]["per_page"];
31510 /** Page number of the results to fetch. */
31511 page?: components["parameters"]["page"];
31512 };
31513 };
31514 responses: {
31515 /** Response */
31516 200: {
31517 headers: {};
31518 content: {
31519 "application/json": components["schemas"]["email"][];
31520 };
31521 };
31522 304: components["responses"]["not_modified"];
31523 401: components["responses"]["requires_authentication"];
31524 403: components["responses"]["forbidden"];
31525 404: components["responses"]["not_found"];
31526 };
31527 };
31528 /**
31529 * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
31530 *
31531 * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
31532 */
31533 "repos/list-for-authenticated-user": {
31534 parameters: {
31535 query: {
31536 /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */
31537 visibility?: "all" | "public" | "private";
31538 /**
31539 * Comma-separated list of values. Can include:
31540 * \* `owner`: Repositories that are owned by the authenticated user.
31541 * \* `collaborator`: Repositories that the user has been added to as a collaborator.
31542 * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.
31543 */
31544 affiliation?: string;
31545 /**
31546 * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all`
31547 *
31548 * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.
31549 */
31550 type?: "all" | "owner" | "public" | "private" | "member";
31551 /** Can be one of `created`, `updated`, `pushed`, `full_name`. */
31552 sort?: "created" | "updated" | "pushed" | "full_name";
31553 /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */
31554 direction?: "asc" | "desc";
31555 /** Results per page (max 100). */
31556 per_page?: components["parameters"]["per_page"];
31557 /** Page number of the results to fetch. */
31558 page?: components["parameters"]["page"];
31559 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
31560 since?: components["parameters"]["since"];
31561 /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
31562 before?: components["parameters"]["before"];
31563 };
31564 };
31565 responses: {
31566 /** Response */
31567 200: {
31568 content: {
31569 "application/json": components["schemas"]["repository"][];
31570 };
31571 };
31572 304: components["responses"]["not_modified"];
31573 401: components["responses"]["requires_authentication"];
31574 403: components["responses"]["forbidden"];
31575 422: components["responses"]["validation_failed"];
31576 };
31577 };
31578 /**
31579 * Creates a new repository for the authenticated user.
31580 *
31581 * **OAuth scope requirements**
31582 *
31583 * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
31584 *
31585 * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
31586 * * `repo` scope to create a private repository.
31587 */
31588 "repos/create-for-authenticated-user": {
31589 parameters: {};
31590 responses: {
31591 /** Response */
31592 201: {
31593 headers: {
31594 Location?: string;
31595 };
31596 content: {
31597 "application/json": components["schemas"]["repository"];
31598 };
31599 };
31600 304: components["responses"]["not_modified"];
31601 400: components["responses"]["bad_request"];
31602 401: components["responses"]["requires_authentication"];
31603 403: components["responses"]["forbidden"];
31604 404: components["responses"]["not_found"];
31605 422: components["responses"]["validation_failed"];
31606 };
31607 requestBody: {
31608 content: {
31609 "application/json": {
31610 /** The name of the repository. */
31611 name: string;
31612 /** A short description of the repository. */
31613 description?: string;
31614 /** A URL with more information about the repository. */
31615 homepage?: string;
31616 /** Whether the repository is private. */
31617 private?: boolean;
31618 /** Whether issues are enabled. */
31619 has_issues?: boolean;
31620 /** Whether projects are enabled. */
31621 has_projects?: boolean;
31622 /** Whether the wiki is enabled. */
31623 has_wiki?: boolean;
31624 /** The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */
31625 team_id?: number;
31626 /** Whether the repository is initialized with a minimal README. */
31627 auto_init?: boolean;
31628 /** The desired language or platform to apply to the .gitignore. */
31629 gitignore_template?: string;
31630 /** The license keyword of the open source license for this repository. */
31631 license_template?: string;
31632 /** Whether to allow squash merges for pull requests. */
31633 allow_squash_merge?: boolean;
31634 /** Whether to allow merge commits for pull requests. */
31635 allow_merge_commit?: boolean;
31636 /** Whether to allow rebase merges for pull requests. */
31637 allow_rebase_merge?: boolean;
31638 /** Whether to delete head branches when pull requests are merged */
31639 delete_branch_on_merge?: boolean;
31640 /** Whether downloads are enabled. */
31641 has_downloads?: boolean;
31642 /** Whether this repository acts as a template that can be used to generate new repositories. */
31643 is_template?: boolean;
31644 };
31645 };
31646 };
31647 };
31648 /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */
31649 "repos/list-invitations-for-authenticated-user": {
31650 parameters: {
31651 query: {
31652 /** Results per page (max 100). */
31653 per_page?: components["parameters"]["per_page"];
31654 /** Page number of the results to fetch. */
31655 page?: components["parameters"]["page"];
31656 };
31657 };
31658 responses: {
31659 /** Response */
31660 200: {
31661 headers: {};
31662 content: {
31663 "application/json": components["schemas"]["repository-invitation"][];
31664 };
31665 };
31666 304: components["responses"]["not_modified"];
31667 401: components["responses"]["requires_authentication"];
31668 403: components["responses"]["forbidden"];
31669 404: components["responses"]["not_found"];
31670 };
31671 };
31672 "repos/decline-invitation": {
31673 parameters: {
31674 path: {
31675 /** invitation_id parameter */
31676 invitation_id: components["parameters"]["invitation_id"];
31677 };
31678 };
31679 responses: {
31680 /** Response */
31681 204: never;
31682 304: components["responses"]["not_modified"];
31683 403: components["responses"]["forbidden"];
31684 404: components["responses"]["not_found"];
31685 409: components["responses"]["conflict"];
31686 };
31687 };
31688 "repos/accept-invitation": {
31689 parameters: {
31690 path: {
31691 /** invitation_id parameter */
31692 invitation_id: components["parameters"]["invitation_id"];
31693 };
31694 };
31695 responses: {
31696 /** Response */
31697 204: never;
31698 304: components["responses"]["not_modified"];
31699 403: components["responses"]["forbidden"];
31700 404: components["responses"]["not_found"];
31701 409: components["responses"]["conflict"];
31702 };
31703 };
31704 /**
31705 * Lists repositories the authenticated user has starred.
31706 *
31707 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
31708 */
31709 "activity/list-repos-starred-by-authenticated-user": {
31710 parameters: {
31711 query: {
31712 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
31713 sort?: components["parameters"]["sort"];
31714 /** One of `asc` (ascending) or `desc` (descending). */
31715 direction?: components["parameters"]["direction"];
31716 /** Results per page (max 100). */
31717 per_page?: components["parameters"]["per_page"];
31718 /** Page number of the results to fetch. */
31719 page?: components["parameters"]["page"];
31720 };
31721 };
31722 responses: {
31723 /** Response */
31724 200: {
31725 headers: {};
31726 content: {
31727 "application/json": components["schemas"]["repository"][];
31728 "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][];
31729 };
31730 };
31731 304: components["responses"]["not_modified"];
31732 401: components["responses"]["requires_authentication"];
31733 403: components["responses"]["forbidden"];
31734 };
31735 };
31736 "activity/check-repo-is-starred-by-authenticated-user": {
31737 parameters: {
31738 path: {
31739 owner: components["parameters"]["owner"];
31740 repo: components["parameters"]["repo"];
31741 };
31742 };
31743 responses: {
31744 /** Response if this repository is starred by you */
31745 204: never;
31746 304: components["responses"]["not_modified"];
31747 401: components["responses"]["requires_authentication"];
31748 403: components["responses"]["forbidden"];
31749 /** Not Found if this repository is not starred by you */
31750 404: {
31751 content: {
31752 "application/json": components["schemas"]["basic-error"];
31753 };
31754 };
31755 };
31756 };
31757 /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */
31758 "activity/star-repo-for-authenticated-user": {
31759 parameters: {
31760 path: {
31761 owner: components["parameters"]["owner"];
31762 repo: components["parameters"]["repo"];
31763 };
31764 };
31765 responses: {
31766 /** Response */
31767 204: never;
31768 304: components["responses"]["not_modified"];
31769 401: components["responses"]["requires_authentication"];
31770 403: components["responses"]["forbidden"];
31771 404: components["responses"]["not_found"];
31772 };
31773 };
31774 "activity/unstar-repo-for-authenticated-user": {
31775 parameters: {
31776 path: {
31777 owner: components["parameters"]["owner"];
31778 repo: components["parameters"]["repo"];
31779 };
31780 };
31781 responses: {
31782 /** Response */
31783 204: never;
31784 304: components["responses"]["not_modified"];
31785 401: components["responses"]["requires_authentication"];
31786 403: components["responses"]["forbidden"];
31787 404: components["responses"]["not_found"];
31788 };
31789 };
31790 /** Lists repositories the authenticated user is watching. */
31791 "activity/list-watched-repos-for-authenticated-user": {
31792 parameters: {
31793 query: {
31794 /** Results per page (max 100). */
31795 per_page?: components["parameters"]["per_page"];
31796 /** Page number of the results to fetch. */
31797 page?: components["parameters"]["page"];
31798 };
31799 };
31800 responses: {
31801 /** Response */
31802 200: {
31803 headers: {};
31804 content: {
31805 "application/json": components["schemas"]["minimal-repository"][];
31806 };
31807 };
31808 304: components["responses"]["not_modified"];
31809 401: components["responses"]["requires_authentication"];
31810 403: components["responses"]["forbidden"];
31811 };
31812 };
31813 /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */
31814 "teams/list-for-authenticated-user": {
31815 parameters: {
31816 query: {
31817 /** Results per page (max 100). */
31818 per_page?: components["parameters"]["per_page"];
31819 /** Page number of the results to fetch. */
31820 page?: components["parameters"]["page"];
31821 };
31822 };
31823 responses: {
31824 /** Response */
31825 200: {
31826 headers: {};
31827 content: {
31828 "application/json": components["schemas"]["team-full"][];
31829 };
31830 };
31831 304: components["responses"]["not_modified"];
31832 403: components["responses"]["forbidden"];
31833 404: components["responses"]["not_found"];
31834 };
31835 };
31836 /**
31837 * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
31838 *
31839 * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users.
31840 */
31841 "users/list": {
31842 parameters: {
31843 query: {
31844 /** A user ID. Only return users with an ID greater than this ID. */
31845 since?: components["parameters"]["since-user"];
31846 /** Results per page (max 100). */
31847 per_page?: components["parameters"]["per_page"];
31848 };
31849 };
31850 responses: {
31851 /** Response */
31852 200: {
31853 headers: {
31854 Link?: string;
31855 };
31856 content: {
31857 "application/json": components["schemas"]["simple-user"][];
31858 };
31859 };
31860 304: components["responses"]["not_modified"];
31861 };
31862 };
31863 /**
31864 * Provides publicly available information about someone with a GitHub account.
31865 *
31866 * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below"
31867 *
31868 * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication).
31869 *
31870 * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)".
31871 */
31872 "users/get-by-username": {
31873 parameters: {
31874 path: {
31875 username: components["parameters"]["username"];
31876 };
31877 };
31878 responses: {
31879 /** Response */
31880 200: {
31881 content: {
31882 "application/json":
31883 | components["schemas"]["private-user"]
31884 | components["schemas"]["public-user"];
31885 };
31886 };
31887 202: components["responses"]["accepted"];
31888 404: components["responses"]["not_found"];
31889 };
31890 };
31891 /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */
31892 "activity/list-events-for-authenticated-user": {
31893 parameters: {
31894 path: {
31895 username: components["parameters"]["username"];
31896 };
31897 query: {
31898 /** Results per page (max 100). */
31899 per_page?: components["parameters"]["per_page"];
31900 /** Page number of the results to fetch. */
31901 page?: components["parameters"]["page"];
31902 };
31903 };
31904 responses: {
31905 /** Response */
31906 200: {
31907 content: {
31908 "application/json": components["schemas"]["event"][];
31909 };
31910 };
31911 };
31912 };
31913 /** This is the user's organization dashboard. You must be authenticated as the user to view this. */
31914 "activity/list-org-events-for-authenticated-user": {
31915 parameters: {
31916 path: {
31917 username: components["parameters"]["username"];
31918 org: components["parameters"]["org"];
31919 };
31920 query: {
31921 /** Results per page (max 100). */
31922 per_page?: components["parameters"]["per_page"];
31923 /** Page number of the results to fetch. */
31924 page?: components["parameters"]["page"];
31925 };
31926 };
31927 responses: {
31928 /** Response */
31929 200: {
31930 content: {
31931 "application/json": components["schemas"]["event"][];
31932 };
31933 };
31934 };
31935 };
31936 "activity/list-public-events-for-user": {
31937 parameters: {
31938 path: {
31939 username: components["parameters"]["username"];
31940 };
31941 query: {
31942 /** Results per page (max 100). */
31943 per_page?: components["parameters"]["per_page"];
31944 /** Page number of the results to fetch. */
31945 page?: components["parameters"]["page"];
31946 };
31947 };
31948 responses: {
31949 /** Response */
31950 200: {
31951 content: {
31952 "application/json": components["schemas"]["event"][];
31953 };
31954 };
31955 };
31956 };
31957 /** Lists the people following the specified user. */
31958 "users/list-followers-for-user": {
31959 parameters: {
31960 path: {
31961 username: components["parameters"]["username"];
31962 };
31963 query: {
31964 /** Results per page (max 100). */
31965 per_page?: components["parameters"]["per_page"];
31966 /** Page number of the results to fetch. */
31967 page?: components["parameters"]["page"];
31968 };
31969 };
31970 responses: {
31971 /** Response */
31972 200: {
31973 headers: {};
31974 content: {
31975 "application/json": components["schemas"]["simple-user"][];
31976 };
31977 };
31978 };
31979 };
31980 /** Lists the people who the specified user follows. */
31981 "users/list-following-for-user": {
31982 parameters: {
31983 path: {
31984 username: components["parameters"]["username"];
31985 };
31986 query: {
31987 /** Results per page (max 100). */
31988 per_page?: components["parameters"]["per_page"];
31989 /** Page number of the results to fetch. */
31990 page?: components["parameters"]["page"];
31991 };
31992 };
31993 responses: {
31994 /** Response */
31995 200: {
31996 headers: {};
31997 content: {
31998 "application/json": components["schemas"]["simple-user"][];
31999 };
32000 };
32001 };
32002 };
32003 "users/check-following-for-user": {
32004 parameters: {
32005 path: {
32006 username: components["parameters"]["username"];
32007 target_user: string;
32008 };
32009 };
32010 responses: {
32011 /** if the user follows the target user */
32012 204: never;
32013 /** if the user does not follow the target user */
32014 404: unknown;
32015 };
32016 };
32017 /** Lists public gists for the specified user: */
32018 "gists/list-for-user": {
32019 parameters: {
32020 path: {
32021 username: components["parameters"]["username"];
32022 };
32023 query: {
32024 /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
32025 since?: components["parameters"]["since"];
32026 /** Results per page (max 100). */
32027 per_page?: components["parameters"]["per_page"];
32028 /** Page number of the results to fetch. */
32029 page?: components["parameters"]["page"];
32030 };
32031 };
32032 responses: {
32033 /** Response */
32034 200: {
32035 headers: {};
32036 content: {
32037 "application/json": components["schemas"]["base-gist"][];
32038 };
32039 };
32040 422: components["responses"]["validation_failed"];
32041 };
32042 };
32043 /** Lists the GPG keys for a user. This information is accessible by anyone. */
32044 "users/list-gpg-keys-for-user": {
32045 parameters: {
32046 path: {
32047 username: components["parameters"]["username"];
32048 };
32049 query: {
32050 /** Results per page (max 100). */
32051 per_page?: components["parameters"]["per_page"];
32052 /** Page number of the results to fetch. */
32053 page?: components["parameters"]["page"];
32054 };
32055 };
32056 responses: {
32057 /** Response */
32058 200: {
32059 headers: {};
32060 content: {
32061 "application/json": components["schemas"]["gpg-key"][];
32062 };
32063 };
32064 };
32065 };
32066 /**
32067 * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
32068 *
32069 * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this:
32070 *
32071 * ```shell
32072 * curl -u username:token
32073 * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
32074 * ```
32075 */
32076 "users/get-context-for-user": {
32077 parameters: {
32078 path: {
32079 username: components["parameters"]["username"];
32080 };
32081 query: {
32082 /** Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */
32083 subject_type?: "organization" | "repository" | "issue" | "pull_request";
32084 /** Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */
32085 subject_id?: string;
32086 };
32087 };
32088 responses: {
32089 /** Response */
32090 200: {
32091 content: {
32092 "application/json": components["schemas"]["hovercard"];
32093 };
32094 };
32095 404: components["responses"]["not_found"];
32096 422: components["responses"]["validation_failed"];
32097 };
32098 };
32099 /**
32100 * Enables an authenticated GitHub App to find the user’s installation information.
32101 *
32102 * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
32103 */
32104 "apps/get-user-installation": {
32105 parameters: {
32106 path: {
32107 username: components["parameters"]["username"];
32108 };
32109 };
32110 responses: {
32111 /** Response */
32112 200: {
32113 content: {
32114 "application/json": components["schemas"]["installation"];
32115 };
32116 };
32117 };
32118 };
32119 /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */
32120 "users/list-public-keys-for-user": {
32121 parameters: {
32122 path: {
32123 username: components["parameters"]["username"];
32124 };
32125 query: {
32126 /** Results per page (max 100). */
32127 per_page?: components["parameters"]["per_page"];
32128 /** Page number of the results to fetch. */
32129 page?: components["parameters"]["page"];
32130 };
32131 };
32132 responses: {
32133 /** Response */
32134 200: {
32135 headers: {};
32136 content: {
32137 "application/json": components["schemas"]["key-simple"][];
32138 };
32139 };
32140 };
32141 };
32142 /**
32143 * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.
32144 *
32145 * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead.
32146 */
32147 "orgs/list-for-user": {
32148 parameters: {
32149 path: {
32150 username: components["parameters"]["username"];
32151 };
32152 query: {
32153 /** Results per page (max 100). */
32154 per_page?: components["parameters"]["per_page"];
32155 /** Page number of the results to fetch. */
32156 page?: components["parameters"]["page"];
32157 };
32158 };
32159 responses: {
32160 /** Response */
32161 200: {
32162 headers: {};
32163 content: {
32164 "application/json": components["schemas"]["organization-simple"][];
32165 };
32166 };
32167 };
32168 };
32169 /**
32170 * Gets a specific package metadata for a public package owned by a user.
32171 *
32172 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
32173 * If `package_type` is not `container`, your token must also include the `repo` scope.
32174 */
32175 "packages/get-package-for-user": {
32176 parameters: {
32177 path: {
32178 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
32179 package_type: components["parameters"]["package_type"];
32180 /** The name of the package. */
32181 package_name: components["parameters"]["package_name"];
32182 username: components["parameters"]["username"];
32183 };
32184 };
32185 responses: {
32186 /** Response */
32187 200: {
32188 content: {
32189 "application/json": components["schemas"]["package"];
32190 };
32191 };
32192 };
32193 };
32194 /**
32195 * Returns all package versions for a public package owned by a specified user.
32196 *
32197 * To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
32198 * If `package_type` is not `container`, your token must also include the `repo` scope.
32199 */
32200 "packages/get-all-package-versions-for-package-owned-by-user": {
32201 parameters: {
32202 path: {
32203 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
32204 package_type: components["parameters"]["package_type"];
32205 /** The name of the package. */
32206 package_name: components["parameters"]["package_name"];
32207 username: components["parameters"]["username"];
32208 };
32209 };
32210 responses: {
32211 /** Response */
32212 200: {
32213 content: {
32214 "application/json": components["schemas"]["package-version"][];
32215 };
32216 };
32217 401: components["responses"]["requires_authentication"];
32218 403: components["responses"]["forbidden"];
32219 404: components["responses"]["not_found"];
32220 };
32221 };
32222 /**
32223 * Gets a specific package version for a public package owned by a specified user.
32224 *
32225 * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope.
32226 * If `package_type` is not `container`, your token must also include the `repo` scope.
32227 */
32228 "packages/get-package-version-for-user": {
32229 parameters: {
32230 path: {
32231 /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */
32232 package_type: components["parameters"]["package_type"];
32233 /** The name of the package. */
32234 package_name: components["parameters"]["package_name"];
32235 /** Unique identifier of the package version. */
32236 package_version_id: components["parameters"]["package_version_id"];
32237 username: components["parameters"]["username"];
32238 };
32239 };
32240 responses: {
32241 /** Response */
32242 200: {
32243 content: {
32244 "application/json": components["schemas"]["package-version"];
32245 };
32246 };
32247 };
32248 };
32249 "projects/list-for-user": {
32250 parameters: {
32251 path: {
32252 username: components["parameters"]["username"];
32253 };
32254 query: {
32255 /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */
32256 state?: "open" | "closed" | "all";
32257 /** Results per page (max 100). */
32258 per_page?: components["parameters"]["per_page"];
32259 /** Page number of the results to fetch. */
32260 page?: components["parameters"]["page"];
32261 };
32262 };
32263 responses: {
32264 /** Response */
32265 200: {
32266 headers: {};
32267 content: {
32268 "application/json": components["schemas"]["project"][];
32269 };
32270 };
32271 415: components["responses"]["preview_header_missing"];
32272 422: components["responses"]["validation_failed"];
32273 };
32274 };
32275 /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */
32276 "activity/list-received-events-for-user": {
32277 parameters: {
32278 path: {
32279 username: components["parameters"]["username"];
32280 };
32281 query: {
32282 /** Results per page (max 100). */
32283 per_page?: components["parameters"]["per_page"];
32284 /** Page number of the results to fetch. */
32285 page?: components["parameters"]["page"];
32286 };
32287 };
32288 responses: {
32289 /** Response */
32290 200: {
32291 content: {
32292 "application/json": components["schemas"]["event"][];
32293 };
32294 };
32295 };
32296 };
32297 "activity/list-received-public-events-for-user": {
32298 parameters: {
32299 path: {
32300 username: components["parameters"]["username"];
32301 };
32302 query: {
32303 /** Results per page (max 100). */
32304 per_page?: components["parameters"]["per_page"];
32305 /** Page number of the results to fetch. */
32306 page?: components["parameters"]["page"];
32307 };
32308 };
32309 responses: {
32310 /** Response */
32311 200: {
32312 content: {
32313 "application/json": components["schemas"]["event"][];
32314 };
32315 };
32316 };
32317 };
32318 /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */
32319 "repos/list-for-user": {
32320 parameters: {
32321 path: {
32322 username: components["parameters"]["username"];
32323 };
32324 query: {
32325 /** Can be one of `all`, `owner`, `member`. */
32326 type?: "all" | "owner" | "member";
32327 /** Can be one of `created`, `updated`, `pushed`, `full_name`. */
32328 sort?: "created" | "updated" | "pushed" | "full_name";
32329 /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */
32330 direction?: "asc" | "desc";
32331 /** Results per page (max 100). */
32332 per_page?: components["parameters"]["per_page"];
32333 /** Page number of the results to fetch. */
32334 page?: components["parameters"]["page"];
32335 };
32336 };
32337 responses: {
32338 /** Response */
32339 200: {
32340 headers: {};
32341 content: {
32342 "application/json": components["schemas"]["minimal-repository"][];
32343 };
32344 };
32345 };
32346 };
32347 /**
32348 * Gets the summary of the free and paid GitHub Actions minutes used.
32349 *
32350 * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
32351 *
32352 * Access tokens must have the `user` scope.
32353 */
32354 "billing/get-github-actions-billing-user": {
32355 parameters: {
32356 path: {
32357 username: components["parameters"]["username"];
32358 };
32359 };
32360 responses: {
32361 /** Response */
32362 200: {
32363 content: {
32364 "application/json": components["schemas"]["actions-billing-usage"];
32365 };
32366 };
32367 };
32368 };
32369 /**
32370 * Gets the free and paid storage used for GitHub Packages in gigabytes.
32371 *
32372 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
32373 *
32374 * Access tokens must have the `user` scope.
32375 */
32376 "billing/get-github-packages-billing-user": {
32377 parameters: {
32378 path: {
32379 username: components["parameters"]["username"];
32380 };
32381 };
32382 responses: {
32383 /** Response */
32384 200: {
32385 content: {
32386 "application/json": components["schemas"]["packages-billing-usage"];
32387 };
32388 };
32389 };
32390 };
32391 /**
32392 * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
32393 *
32394 * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
32395 *
32396 * Access tokens must have the `user` scope.
32397 */
32398 "billing/get-shared-storage-billing-user": {
32399 parameters: {
32400 path: {
32401 username: components["parameters"]["username"];
32402 };
32403 };
32404 responses: {
32405 /** Response */
32406 200: {
32407 content: {
32408 "application/json": components["schemas"]["combined-billing-usage"];
32409 };
32410 };
32411 };
32412 };
32413 /**
32414 * Lists repositories a user has starred.
32415 *
32416 * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
32417 */
32418 "activity/list-repos-starred-by-user": {
32419 parameters: {
32420 path: {
32421 username: components["parameters"]["username"];
32422 };
32423 query: {
32424 /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */
32425 sort?: components["parameters"]["sort"];
32426 /** One of `asc` (ascending) or `desc` (descending). */
32427 direction?: components["parameters"]["direction"];
32428 /** Results per page (max 100). */
32429 per_page?: components["parameters"]["per_page"];
32430 /** Page number of the results to fetch. */
32431 page?: components["parameters"]["page"];
32432 };
32433 };
32434 responses: {
32435 /** Response */
32436 200: {
32437 headers: {};
32438 content: {
32439 "application/json": Partial<
32440 components["schemas"]["starred-repository"][]
32441 > &
32442 Partial<components["schemas"]["repository"][]>;
32443 };
32444 };
32445 };
32446 };
32447 /** Lists repositories a user is watching. */
32448 "activity/list-repos-watched-by-user": {
32449 parameters: {
32450 path: {
32451 username: components["parameters"]["username"];
32452 };
32453 query: {
32454 /** Results per page (max 100). */
32455 per_page?: components["parameters"]["per_page"];
32456 /** Page number of the results to fetch. */
32457 page?: components["parameters"]["page"];
32458 };
32459 };
32460 responses: {
32461 /** Response */
32462 200: {
32463 headers: {};
32464 content: {
32465 "application/json": components["schemas"]["minimal-repository"][];
32466 };
32467 };
32468 };
32469 };
32470 /** Get a random sentence from the Zen of GitHub */
32471 "meta/get-zen": {
32472 responses: {
32473 /** Response */
32474 200: {
32475 content: {
32476 "text/plain": string;
32477 };
32478 };
32479 };
32480 };
32481 /**
32482 * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `<USERNAME>:branch`.
32483 *
32484 * 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](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
32485 *
32486 * 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.
32487 *
32488 * **Working with large comparisons**
32489 *
32490 * 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](/rest/guides/traversing-with-pagination)."
32491 *
32492 * 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.
32493 *
32494 * **Signature verification object**
32495 *
32496 * 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:
32497 *
32498 * | Name | Type | Description |
32499 * | ---- | ---- | ----------- |
32500 * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
32501 * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
32502 * | `signature` | `string` | The signature that was extracted from the commit. |
32503 * | `payload` | `string` | The value that was signed. |
32504 *
32505 * These are the possible values for `reason` in the `verification` object:
32506 *
32507 * | Value | Description |
32508 * | ----- | ----------- |
32509 * | `expired_key` | The key that made the signature is expired. |
32510 * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
32511 * | `gpgverify_error` | There was an error communicating with the signature verification service. |
32512 * | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
32513 * | `unsigned` | The object does not include a signature. |
32514 * | `unknown_signature_type` | A non-PGP signature was found in the commit. |
32515 * | `no_user` | No user was associated with the `committer` email address in the commit. |
32516 * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
32517 * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
32518 * | `unknown_key` | The key that made the signature has not been registered with any user's account. |
32519 * | `malformed_signature` | There was an error parsing the signature. |
32520 * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
32521 * | `valid` | None of the above errors applied, so the signature is considered to be verified. |
32522 */
32523 "repos/compare-commits": {
32524 parameters: {
32525 path: {
32526 owner: components["parameters"]["owner"];
32527 repo: components["parameters"]["repo"];
32528 base: string;
32529 head: string;
32530 };
32531 query: {
32532 /** Results per page (max 100) */
32533 per_page?: components["parameters"]["per-page"];
32534 /** Page number of the results to fetch. */
32535 page?: components["parameters"]["page"];
32536 };
32537 };
32538 responses: {
32539 /** Response */
32540 200: {
32541 content: {
32542 "application/json": components["schemas"]["commit-comparison"];
32543 };
32544 };
32545 404: components["responses"]["not_found"];
32546 500: components["responses"]["internal_error"];
32547 };
32548 };
32549 /**
32550 * **Deprecated:** use `apps.createContentAttachmentForRepo()` (`POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments`) instead. Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.
32551 *
32552 * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments.
32553 *
32554 * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
32555 */
32556 "apps/create-content-attachment": {
32557 parameters: {
32558 path: {
32559 content_reference_id: number;
32560 };
32561 };
32562 responses: {
32563 /** Response */
32564 200: {
32565 content: {
32566 "application/json": components["schemas"]["content-reference-attachment"];
32567 };
32568 };
32569 304: components["responses"]["not_modified"];
32570 403: components["responses"]["forbidden"];
32571 404: components["responses"]["not_found"];
32572 410: components["responses"]["gone"];
32573 415: components["responses"]["preview_header_missing"];
32574 422: components["responses"]["validation_failed"];
32575 };
32576 requestBody: {
32577 content: {
32578 "application/json": {
32579 /** The title of the attachment */
32580 title: string;
32581 /** The body of the attachment */
32582 body: string;
32583 };
32584 };
32585 };
32586 };
32587}
32588
32589export interface external {}