From 6ab41924560db0a1279d5b4ca9a3a298e1be142f Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 2 Dec 2022 03:01:32 -0600 Subject: [PATCH 1/2] Update hypermedia example to use symbols instead of hashrockets (#33116) --- content/rest/overview/resources-in-the-rest-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/rest/overview/resources-in-the-rest-api.md b/content/rest/overview/resources-in-the-rest-api.md index 26f5282190..9a1a2900ea 100644 --- a/content/rest/overview/resources-in-the-rest-api.md +++ b/content/rest/overview/resources-in-the-rest-api.md @@ -292,10 +292,10 @@ gem: >> tmpl.expand => "/notifications" - >> tmpl.expand :all => 1 + >> tmpl.expand all: 1 => "/notifications?all=1" - >> tmpl.expand :all => 1, :participating => 1 + >> tmpl.expand all: 1, participating: 1 => "/notifications?all=1&participating=1" [rfc]: https://datatracker.ietf.org/doc/html/rfc6570 From 9f5f8c7477093d397ffb35f7af8590d19ad7c805 Mon Sep 17 00:00:00 2001 From: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Date: Fri, 2 Dec 2022 01:09:30 -0800 Subject: [PATCH 2/2] Update OpenAPI Descriptions (#33175) Co-authored-by: github-openapi-bot --- .../decorated/api.github.com.2022-11-28.json | 345 -------------- .../static/decorated/ghec.2022-11-28.json | 345 -------------- .../api.github.com.2022-11-28.deref.json | 448 ------------------ .../dereferenced/api.github.com.deref.json | 448 ------------------ .../dereferenced/ghec.2022-11-28.deref.json | 448 ------------------ lib/rest/static/dereferenced/ghec.deref.json | 448 ------------------ 6 files changed, 2482 deletions(-) diff --git a/lib/rest/static/decorated/api.github.com.2022-11-28.json b/lib/rest/static/decorated/api.github.com.2022-11-28.json index 70fcfe0d3f..72357733a1 100644 --- a/lib/rest/static/decorated/api.github.com.2022-11-28.json +++ b/lib/rest/static/decorated/api.github.com.2022-11-28.json @@ -468835,265 +468835,6 @@ }, "secret-scanning": { "secret-scanning": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/code_security_and_analysis", - "title": "Get code security and analysis settings for an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "

Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/enterprises/{enterprise}/code_security_and_analysis", - "title": "Update security and analysis settings for new repositories in an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "boolean", - "name": "advanced_security_enabled_for_new_repositories", - "in": "body", - "description": "

Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"About GitHub Advanced Security\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_enabled_for_new_repositories", - "in": "body", - "description": "

Whether secret scanning is automatically enabled for new repositories. For more information, see \"About secret scanning\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_push_protection_enabled_for_new_repositories", - "in": "body", - "description": "

Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"Protecting pushes with secret scanning\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_push_protection_custom_link_enabled", - "in": "body", - "description": "

Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"Protecting pushes with secret scanning\".

" - }, - { - "type": "string", - "name": "secret_scanning_push_protection_custom_link", - "in": "body", - "description": "

If secret_scanning_push_protection_custom_link_enabled is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"Protecting pushes with secret scanning\".

" - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "

Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the admin:enterprise scope.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -470436,92 +470177,6 @@ ], "subcategory": "secret-scanning" }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/enterprises/{enterprise}/{security_product}/{enablement}", - "title": "Enable or disable security features for an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "

The security feature to enable or disable.

", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "

The action to take.

\n

enable_all means to enable the specified security feature for all repositories in the enterprise.\ndisable_all means to disable the specified security feature for all repositories in the enterprise.

", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "bodyParameters": [], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE", - "security_product": "SECURITY_PRODUCT", - "enablement": "ENABLEMENT" - } - }, - "response": { - "statusCode": "204", - "description": "

Action started

" - } - } - ], - "previews": [], - "descriptionHTML": "

Enables or disables the specified security feature for all repositories in an enterprise.

\n

To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the admin:enterprise scope.

", - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Action started

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

The action could not be taken due to an in progress enablement, or a policy is preventing enablement

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/lib/rest/static/decorated/ghec.2022-11-28.json b/lib/rest/static/decorated/ghec.2022-11-28.json index 68ad97a5c1..dac34e8834 100644 --- a/lib/rest/static/decorated/ghec.2022-11-28.json +++ b/lib/rest/static/decorated/ghec.2022-11-28.json @@ -472978,265 +472978,6 @@ }, "secret-scanning": { "secret-scanning": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/code_security_and_analysis", - "title": "Get code security and analysis settings for an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "

Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/enterprises/{enterprise}/code_security_and_analysis", - "title": "Update security and analysis settings for new repositories in an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "boolean", - "name": "advanced_security_enabled_for_new_repositories", - "in": "body", - "description": "

Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"About GitHub Advanced Security\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_enabled_for_new_repositories", - "in": "body", - "description": "

Whether secret scanning is automatically enabled for new repositories. For more information, see \"About secret scanning\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_push_protection_enabled_for_new_repositories", - "in": "body", - "description": "

Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"Protecting pushes with secret scanning\".

" - }, - { - "type": "boolean", - "name": "secret_scanning_push_protection_custom_link_enabled", - "in": "body", - "description": "

Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"Protecting pushes with secret scanning\".

" - }, - { - "type": "string", - "name": "secret_scanning_push_protection_custom_link", - "in": "body", - "description": "

If secret_scanning_push_protection_custom_link_enabled is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"Protecting pushes with secret scanning\".

" - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - }, - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "

Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the admin:enterprise scope.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -474579,92 +474320,6 @@ ], "subcategory": "secret-scanning" }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/enterprises/{enterprise}/{security_product}/{enablement}", - "title": "Enable or disable security features for an enterprise", - "category": "secret-scanning", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "

The security feature to enable or disable.

", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "

The action to take.

\n

enable_all means to enable the specified security feature for all repositories in the enterprise.\ndisable_all means to disable the specified security feature for all repositories in the enterprise.

", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "bodyParameters": [], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE", - "security_product": "SECURITY_PRODUCT", - "enablement": "ENABLEMENT" - } - }, - "response": { - "statusCode": "204", - "description": "

Action started

" - } - } - ], - "previews": [], - "descriptionHTML": "

Enables or disables the specified security feature for all repositories in an enterprise.

\n

To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the admin:enterprise scope.

", - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Action started

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

The action could not be taken due to an in progress enablement, or a policy is preventing enablement

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ], - "subcategory": "secret-scanning" - }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/lib/rest/static/dereferenced/api.github.com.2022-11-28.deref.json b/lib/rest/static/dereferenced/api.github.com.2022-11-28.deref.json index 032fa24d8d..62c1e95699 100644 --- a/lib/rest/static/dereferenced/api.github.com.2022-11-28.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.2022-11-28.deref.json @@ -22035,341 +22035,6 @@ } } }, - "/enterprises/{enterprise}/code_security_and_analysis": { - "get": { - "summary": "Get code security and analysis settings for an enterprise", - "description": "Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/get-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#get-security-analysis-settings-for-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - }, - "patch": { - "summary": "Update security and analysis settings for new repositories in an enterprise", - "description": "Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/patch-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#update-security-and-analysis-settings-for-new-repositories-in-the-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security)\"." - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories. For more information, see \"[About secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning)\"." - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link": { - "type": "string", - "description": "If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - } - } - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/enterprises/{enterprise}/dependabot/alerts": { "get": { "summary": "List Dependabot alerts for an enterprise", @@ -25749,119 +25414,6 @@ } } }, - "/enterprises/{enterprise}/{security_product}/{enablement}": { - "post": { - "summary": "Enable or disable security features for an enterprise", - "description": "Enables or disables the specified security feature for all repositories in an enterprise.\n\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/post-security-product-enablement-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#enable-or-disable-security-features-for-an-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "The security feature to enable or disable.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "The action to take.\n\n`enable_all` means to enable the specified security feature for all repositories in the enterprise.\n`disable_all` means to disable the specified security feature for all repositories in the enterprise.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "responses": { - "204": { - "description": "Action started" - }, - "422": { - "description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement" - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/events": { "get": { "summary": "List public events", diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index 032fa24d8d..62c1e95699 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -22035,341 +22035,6 @@ } } }, - "/enterprises/{enterprise}/code_security_and_analysis": { - "get": { - "summary": "Get code security and analysis settings for an enterprise", - "description": "Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/get-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#get-security-analysis-settings-for-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - }, - "patch": { - "summary": "Update security and analysis settings for new repositories in an enterprise", - "description": "Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/patch-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#update-security-and-analysis-settings-for-new-repositories-in-the-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security)\"." - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories. For more information, see \"[About secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning)\"." - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link": { - "type": "string", - "description": "If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - } - } - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/enterprises/{enterprise}/dependabot/alerts": { "get": { "summary": "List Dependabot alerts for an enterprise", @@ -25749,119 +25414,6 @@ } } }, - "/enterprises/{enterprise}/{security_product}/{enablement}": { - "post": { - "summary": "Enable or disable security features for an enterprise", - "description": "Enables or disables the specified security feature for all repositories in an enterprise.\n\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/post-security-product-enablement-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/secret-scanning#enable-or-disable-security-features-for-an-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "The security feature to enable or disable.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "The action to take.\n\n`enable_all` means to enable the specified security feature for all repositories in the enterprise.\n`disable_all` means to disable the specified security feature for all repositories in the enterprise.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "responses": { - "204": { - "description": "Action started" - }, - "422": { - "description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement" - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/events": { "get": { "summary": "List public events", diff --git a/lib/rest/static/dereferenced/ghec.2022-11-28.deref.json b/lib/rest/static/dereferenced/ghec.2022-11-28.deref.json index 44c6aee897..7dd0a32a1e 100644 --- a/lib/rest/static/dereferenced/ghec.2022-11-28.deref.json +++ b/lib/rest/static/dereferenced/ghec.2022-11-28.deref.json @@ -22419,341 +22419,6 @@ } } }, - "/enterprises/{enterprise}/code_security_and_analysis": { - "get": { - "summary": "Get code security and analysis settings for an enterprise", - "description": "Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/get-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#get-security-analysis-settings-for-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - }, - "patch": { - "summary": "Update security and analysis settings for new repositories in an enterprise", - "description": "Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/patch-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#update-security-and-analysis-settings-for-new-repositories-in-the-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security)\"." - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories. For more information, see \"[About secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning)\"." - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link": { - "type": "string", - "description": "If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - } - } - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/enterprises/{enterprise}/consumed-licenses": { "get": { "summary": "List enterprise consumed licenses", @@ -26777,119 +26442,6 @@ } } }, - "/enterprises/{enterprise}/{security_product}/{enablement}": { - "post": { - "summary": "Enable or disable security features for an enterprise", - "description": "Enables or disables the specified security feature for all repositories in an enterprise.\n\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/post-security-product-enablement-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#enable-or-disable-security-features-for-an-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "The security feature to enable or disable.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "The action to take.\n\n`enable_all` means to enable the specified security feature for all repositories in the enterprise.\n`disable_all` means to disable the specified security feature for all repositories in the enterprise.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "responses": { - "204": { - "description": "Action started" - }, - "422": { - "description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement" - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/events": { "get": { "summary": "List public events", diff --git a/lib/rest/static/dereferenced/ghec.deref.json b/lib/rest/static/dereferenced/ghec.deref.json index 44c6aee897..7dd0a32a1e 100644 --- a/lib/rest/static/dereferenced/ghec.deref.json +++ b/lib/rest/static/dereferenced/ghec.deref.json @@ -22419,341 +22419,6 @@ } } }, - "/enterprises/{enterprise}/code_security_and_analysis": { - "get": { - "summary": "Get code security and analysis settings for an enterprise", - "description": "Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/get-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#get-security-analysis-settings-for-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - }, - "patch": { - "summary": "Update security and analysis settings for new repositories in an enterprise", - "description": "Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/patch-security-analysis-settings-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#update-security-and-analysis-settings-for-new-repositories-in-the-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security)\"." - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories. For more information, see \"[About secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning)\"." - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - }, - "secret_scanning_push_protection_custom_link": { - "type": "string", - "description": "If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning)\"." - } - } - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "title": "Enterprise Security Analysis Settings", - "type": "object", - "properties": { - "advanced_security_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to\nthis enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning is automatically enabled for new repositories and repositories transferred to this\nenterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_enabled_for_new_repositories": { - "type": "boolean", - "description": "Whether secret scanning push protection is automatically enabled for new repositories and repositories\ntransferred to this enterprise.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link_enabled": { - "type": "boolean", - "description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", - "examples": [ - false - ] - }, - "secret_scanning_push_protection_custom_link": { - "type": [ - "string", - "null" - ], - "description": "An optional URL string to display to contributors who are blocked from pushing a secret.", - "examples": [ - "https://github.com/test-org/test-repo/blob/main/README.md" - ] - } - }, - "required": [ - "advanced_security_enabled_for_new_repositories", - "secret_scanning_enabled_for_new_repositories", - "secret_scanning_push_protection_enabled_for_new_repositories" - ] - }, - "examples": { - "default": { - "value": { - "advanced_security_enabled_for_new_repositories": true, - "secret_scanning_enabled_for_new_repositories": true, - "secret_scanning_push_protection_enabled_for_new_repositories": true, - "secret_scanning_push_protection_custom_link_enabled": true, - "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md" - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/enterprises/{enterprise}/consumed-licenses": { "get": { "summary": "List enterprise consumed licenses", @@ -26777,119 +26442,6 @@ } } }, - "/enterprises/{enterprise}/{security_product}/{enablement}": { - "post": { - "summary": "Enable or disable security features for an enterprise", - "description": "Enables or disables the specified security feature for all repositories in an enterprise.\n\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.", - "tags": [ - "secret-scanning" - ], - "operationId": "secret-scanning/post-security-product-enablement-for-enterprise", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning#enable-or-disable-security-features-for-an-enterprise" - }, - "parameters": [ - { - "name": "enterprise", - "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "security_product", - "in": "path", - "description": "The security feature to enable or disable.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "advanced_security", - "secret_scanning", - "secret_scanning_push_protection" - ] - } - }, - { - "name": "enablement", - "in": "path", - "description": "The action to take.\n\n`enable_all` means to enable the specified security feature for all repositories in the enterprise.\n`disable_all` means to disable the specified security feature for all repositories in the enterprise.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "enable_all", - "disable_all" - ] - } - } - ], - "responses": { - "204": { - "description": "Action started" - }, - "422": { - "description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement" - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": { - "title": "Basic Error", - "description": "Basic Error", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "documentation_url": { - "type": "string" - } - } - } - } - } - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": false, - "category": "secret-scanning", - "subcategory": null - } - } - }, "/events": { "get": { "summary": "List public events",