From 1bdadf4f8ec91a320d1effe9f5493565b82a1a0b Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 28 Apr 2023 13:04:55 -0500 Subject: [PATCH] feat: new deployment protection rule endpoints, new private reporting of security vulnerability endpoint (#307) --- cache/api.github.com.json | 1239 +++++++++++++++-- cache/ghec.json | 1239 +++++++++++++++-- cache/ghes-3.5.json | 4 +- cache/ghes-3.6.json | 4 +- cache/ghes-3.7.json | 127 +- cache/ghes-3.8.json | 277 +++- cache/github.ae.json | 420 +++++- packages/openapi-types-ghec/package.json | 2 +- packages/openapi-types-ghec/types.d.ts | 559 +++++++- packages/openapi-types-ghes-3.5/package.json | 2 +- packages/openapi-types-ghes-3.5/types.d.ts | 10 +- packages/openapi-types-ghes-3.6/package.json | 2 +- packages/openapi-types-ghes-3.6/types.d.ts | 10 +- packages/openapi-types-ghes-3.7/package.json | 2 +- packages/openapi-types-ghes-3.7/types.d.ts | 61 +- packages/openapi-types-ghes-3.8/package.json | 2 +- packages/openapi-types-ghes-3.8/types.d.ts | 176 ++- packages/openapi-types-github.ae/package.json | 2 +- packages/openapi-types-github.ae/types.d.ts | 208 ++- packages/openapi-types/package.json | 2 +- packages/openapi-types/types.d.ts | 559 +++++++- 21 files changed, 4539 insertions(+), 368 deletions(-) diff --git a/cache/api.github.com.json b/cache/api.github.com.json index 36db02edb..b11dad541 100644 --- a/cache/api.github.com.json +++ b/cache/api.github.com.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -14307,10 +14307,9 @@ "examples": { "default": { "value": { - "id": 21, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -14502,10 +14501,9 @@ "examples": { "default": { "value": { - "id": 21, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -21954,6 +21952,70 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + "post": { + "summary": "Review custom deployment protection rules for a workflow run", + "description": "Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see \"[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\n**Note:** GitHub Apps can only review their own custom deployment protection rules.\nTo approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).\n\nGitHub Apps must have read and write permission for **Deployments** to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/review-custom-gates-for-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/review-custom-gates-comment-required" + }, + { + "$ref": "#/components/schemas/review-custom-gates-state-required" + } + ] + }, + "examples": { + "default": { + "value": { + "environment_name": "prod-eus", + "state": "approved", + "comment": "All health checks passed." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "actions", + "subcategory": "workflow-runs" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { "get": { "summary": "List jobs for a workflow run", @@ -29104,7 +29166,7 @@ "type": "string" }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -33996,10 +34058,296 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + "get": { + "summary": "Get all deployment protection rules for an environment", + "description": "Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see \"[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/get-all-deployment-protection-rules", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "List of deployment protection rules", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The number of enabled custom deployment protection rules for this environment", + "type": "integer", + "example": 10 + }, + "custom_deployment_protection_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/deployment-protection-rule" + } + } + }, + "example": "../../components/examples/deployment_protection_rules.yaml" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + }, + "post": { + "summary": "Create a custom deployment protection rule on an environment", + "description": "Enable a custom deployment protection rule for an environment.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint.\n\nFor more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/create-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "integration_id": { + "type": "integer", + "description": "The ID of the custom app that will be enabled on the environment." + } + } + }, + "examples": { + "default": { + "value": { + "integration_id": 5 + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The enabled custom deployment protection rule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment-protection-rule" + }, + "examples": { + "default": { + "$ref": "#/components/examples/deployment-protection-rule" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + "get": { + "summary": "List custom deployment rule integrations available for an environment", + "description": "Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint.\n\nFor more information about environments, see \"[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see \"[GET an app](https://docs.github.com/rest/apps/apps#get-an-app)\".", + "tags": [ + "repos" + ], + "operationId": "repos/list-custom-deployment-rule-integrations", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per-page" + } + ], + "responses": { + "200": { + "description": "A list of custom deployment rule integrations available for this environment.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The total number of custom deployment protection rule integrations available for this environment.", + "type": "integer", + "example": 35 + }, + "available_custom_deployment_protection_rule_integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/custom-deployment-rule-app" + } + } + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/custom-deployment-protection-rule-apps" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + "get": { + "summary": "Get a custom deployment protection rule", + "description": "Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see \"[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/get-custom-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/protection-rule-id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment-protection-rule" + }, + "examples": { + "default": { + "$ref": "#/components/examples/deployment-protection-rule" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + }, + "delete": { + "summary": "Disable a custom protection rule for an environment", + "description": "Disables a custom deployment protection rule for an environment.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see \"[Get an app](https://docs.github.com/rest/apps/apps#get-an-app)\".", + "tags": [ + "repos" + ], + "operationId": "repos/disable-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/protection-rule-id" + } + ], + "responses": { + "204": { + "description": "Response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], @@ -36155,7 +36503,7 @@ "/repos/{owner}/{repo}/import": { "get": { "summary": "Get an import status", - "description": "View the progress of an import.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `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.\n* `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).\n* `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.\n* `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\".\n* `complete` - the import is complete, and the repository is ready on GitHub.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `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/migrations/source-imports#update-an-import) section.\n* `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?tags=dotcom-rest-api) for more information.\n* `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/migrations/source-imports#update-an-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL.\n* `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/migrations/source-imports#update-an-import) section.\n\n**The project_choices field**\n\nWhen 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.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `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.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `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.", + "description": "View the progress of an import.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `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.\n* `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).\n* `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.\n* `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\".\n* `complete` - the import is complete, and the repository is ready on GitHub.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `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/migrations/source-imports#update-an-import) section.\n* `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?tags=dotcom-rest-api) for more information.\n* `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/migrations/source-imports#update-an-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL.\n* `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/migrations/source-imports#update-an-import) section.\n\n**The project_choices field**\n\nWhen 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.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `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.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `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.", "tags": [ "migrations" ], @@ -36205,7 +36553,7 @@ }, "put": { "summary": "Start an import", - "description": "Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response.", + "description": "Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response.\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -36317,7 +36665,7 @@ }, "patch": { "summary": "Update an import", - "description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.\n\nSome servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will\nhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.\nYou can select the project to import by providing one of the objects in the `project_choices` array in the update request.", + "description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.\n\nSome servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will\nhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.\nYou can select the project to import by providing one of the objects in the `project_choices` array in the update request.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -36427,7 +36775,7 @@ }, "delete": { "summary": "Cancel an import", - "description": "Stop an import for a repository.", + "description": "Stop an import for a repository.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -36464,7 +36812,7 @@ "/repos/{owner}/{repo}/import/authors": { "get": { "summary": "Get commit authors", - "description": "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 `.\n\nThis endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.", + "description": "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 `.\n\nThis endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -36522,7 +36870,7 @@ "/repos/{owner}/{repo}/import/authors/{author_id}": { "patch": { "summary": "Map a commit author", - "description": "Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.", + "description": "Update an author's identity for the import. Your application can continue updating authors any time before you push\nnew commits to the repository.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -36614,7 +36962,7 @@ "/repos/{owner}/{repo}/import/large_files": { "get": { "summary": "Get large files", - "description": "List files larger than 100MB found during the import", + "description": "List files larger than 100MB found during the import\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -36666,7 +37014,7 @@ "/repos/{owner}/{repo}/import/lfs": { "patch": { "summary": "Update Git LFS preference", - "description": "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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/repositories/working-with-files/managing-large-files).", + "description": "You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability\nis powered by [Git LFS](https://git-lfs.com).\n\nYou can learn more about our LFS feature and working with large files [on our help\nsite](https://docs.github.com/repositories/working-with-files/managing-large-files).\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -42893,7 +43241,7 @@ "nullable": true, "properties": { "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -46111,10 +46459,9 @@ "examples": { "default": { "value": { - "id": 42, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -46331,10 +46678,9 @@ "examples": { "default": { "value": { - "id": 42, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -46995,6 +47341,96 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/security-advisories/reports": { + "post": { + "summary": "Privately report a security vulnerability", + "description": "Report a security vulnerability to the maintainers of the repository.\nSee \"[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)\" for more information about private vulnerability reporting.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/create-private-vulnerability-report", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/private-vulnerability-report-create" + }, + "examples": { + "default": { + "value": { + "summary": "A newly discovered vulnerability", + "description": "A more in-depth description of what the problem is.", + "severity": "high", + "vulnerabilities": [ + { + "package": { + "name": "a-package", + "ecosystem": "npm" + }, + "vulnerable_version_range": "< 1.0.0", + "patched_versions": "1.0.0", + "vulnerable_functions": [ + "important_function" + ] + } + ], + "cwe_ids": [ + "CWE-123" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository-advisory" + }, + "examples": { + "default": { + "$ref": "#/components/examples/repository-advisory-pvr" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "repository-advisories" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { "get": { "summary": "Get a repository security advisory", @@ -49575,7 +50011,7 @@ "/search/code": { "get": { "summary": "Search code", - "description": "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).\n\nWhen 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).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\n**Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate\nrate limit from other search types, of 10 requests per minute, and all code\nsearch requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/).", + "description": "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).\n\nWhen 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).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\nThis endpoint requires you to authenticate and limits you to 10 requests per minute.", "tags": [ "search" ], @@ -49597,7 +50033,7 @@ { "name": "sort", "deprecated": true, - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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)", + "description": "**This field is deprecated.** 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)", "in": "query", "required": false, "schema": { @@ -49609,7 +50045,7 @@ }, { "name": "order", - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. ", + "description": "**This field is deprecated.** 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`. ", "in": "query", "deprecated": true, "required": false, @@ -52917,7 +53353,7 @@ "type": "string" }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -52979,7 +53415,7 @@ } }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "machine": { @@ -62975,7 +63411,100 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-created" + "$ref": "#/components/schemas/webhook-dependabot-alert-created" + } + } + } + }, + "responses": { + "200": { + "description": "Return a 200 status to indicate that the data was received successfully" + } + }, + "x-github": { + "githubCloudOnly": false, + "category": "webhooks", + "subcategory": "dependabot-alert", + "supported-webhook-types": [ + "repository", + "organization", + "app" + ] + } + } + }, + "dependabot-alert-dismissed": { + "post": { + "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", + "description": "A Dependabot alert was manually closed.", + "operationId": "dependabot-alert/dismissed", + "externalDocs": { + "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" + }, + "parameters": [ + { + "name": "User-Agent", + "in": "header", + "example": "GitHub-Hookshot/123abc", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Id", + "in": "header", + "example": 12312312, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Event", + "in": "header", + "example": "issues", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Id", + "in": "header", + "example": 123123, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Type", + "in": "header", + "example": "repository", + "schema": { + "type": "string" + } + }, + { + "name": "X-GitHub-Delivery", + "in": "header", + "example": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "schema": { + "type": "string" + } + }, + { + "name": "X-Hub-Signature-256", + "in": "header", + "example": "sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" } } } @@ -62997,11 +63526,11 @@ } } }, - "dependabot-alert-dismissed": { + "dependabot-alert-fixed": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A Dependabot alert was manually closed.", - "operationId": "dependabot-alert/dismissed", + "description": "A manifest file change removed a vulnerability.", + "operationId": "dependabot-alert/fixed", "externalDocs": { "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -63068,7 +63597,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" + "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" } } } @@ -63090,11 +63619,11 @@ } } }, - "dependabot-alert-fixed": { + "dependabot-alert-reintroduced": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A manifest file change removed a vulnerability.", - "operationId": "dependabot-alert/fixed", + "description": "A manifest file change introduced a vulnerable dependency that had previously been fixed.", + "operationId": "dependabot-alert/reintroduced", "externalDocs": { "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -63161,7 +63690,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" + "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" } } } @@ -63183,11 +63712,11 @@ } } }, - "dependabot-alert-reintroduced": { + "dependabot-alert-reopened": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A manifest file change introduced a vulnerable dependency that had previously been fixed.", - "operationId": "dependabot-alert/reintroduced", + "description": "A Dependabot alert was manually reopened.", + "operationId": "dependabot-alert/reopened", "externalDocs": { "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -63254,7 +63783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" + "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" } } } @@ -63276,13 +63805,13 @@ } } }, - "dependabot-alert-reopened": { + "deploy-key-created": { "post": { - "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A Dependabot alert was manually reopened.", - "operationId": "dependabot-alert/reopened", + "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deploy key was created.", + "operationId": "deploy-key/created", "externalDocs": { - "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" + "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" }, "parameters": [ { @@ -63347,7 +63876,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" + "$ref": "#/components/schemas/webhook-deploy-key-created" } } } @@ -63360,7 +63889,7 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "dependabot-alert", + "subcategory": "deploy-key", "supported-webhook-types": [ "repository", "organization", @@ -63369,11 +63898,11 @@ } } }, - "deploy-key-created": { + "deploy-key-deleted": { "post": { - "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deploy key was created.", - "operationId": "deploy-key/created", + "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deploy key was deleted.", + "operationId": "deploy-key/deleted", "externalDocs": { "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" }, @@ -63440,7 +63969,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deploy-key-created" + "$ref": "#/components/schemas/webhook-deploy-key-deleted" } } } @@ -63462,13 +63991,13 @@ } } }, - "deploy-key-deleted": { + "deployment-created": { "post": { - "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deploy key was deleted.", - "operationId": "deploy-key/deleted", + "summary": "This event occurs when there is activity relating to deployments. For more information, see \"[About deployments](https://docs.github.com/actions/deployment/about-deployments).\" For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deployment) or \"[Deployments](https://docs.github.com/rest/deployments/deployments)\" in the REST API documentation.\n\nFor activity relating to deployment status, use the `deployment_status` event.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deployment was created.", + "operationId": "deployment/created", "externalDocs": { - "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" + "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment" }, "parameters": [ { @@ -63533,7 +64062,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deploy-key-deleted" + "$ref": "#/components/schemas/webhook-deployment-created" } } } @@ -63546,7 +64075,7 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "deploy-key", + "subcategory": "deployment", "supported-webhook-types": [ "repository", "organization", @@ -63555,13 +64084,13 @@ } } }, - "deployment-created": { + "deployment-protection-rule-requested": { "post": { - "summary": "This event occurs when there is activity relating to deployments. For more information, see \"[About deployments](https://docs.github.com/actions/deployment/about-deployments).\" For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deployment) or \"[Deployments](https://docs.github.com/rest/deployments/deployments)\" in the REST API documentation.\n\nFor activity relating to deployment status, use the `deployment_status` event.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deployment was created.", - "operationId": "deployment/created", + "summary": "This event occurs when there is activity relating to deployment protection rules. For more information, see \"[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules).\" For information about the API to manage deployment protection rules, see [the REST API documentation](https://docs.github.com/rest/deployments/environments).\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deployment protection rule was requested for an environment.", + "operationId": "deployment-protection-rule/requested", "externalDocs": { - "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment" + "url": "https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_protection_rule" }, "parameters": [ { @@ -63626,7 +64155,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deployment-created" + "$ref": "#/components/schemas/webhook-deployment-protection-rule-requested" } } } @@ -63639,10 +64168,8 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "deployment", + "subcategory": "deployment-protection-rule", "supported-webhook-types": [ - "repository", - "organization", "app" ] } @@ -89844,7 +90371,7 @@ } }, "location": { - "description": "The Azure region where this codespace is located.", + "description": "The initally assigned location of a new codespace.", "enum": [ "EastUs", "SouthEastAsia", @@ -96339,6 +96866,48 @@ "comment" ] }, + "review-custom-gates-comment-required": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "description": "The name of the environment to approve or reject." + }, + "comment": { + "type": "string", + "description": "Comment associated with the pending deployment protection rule. **Required when state is not provided.**" + } + }, + "required": [ + "environment_name", + "comment" + ] + }, + "review-custom-gates-state-required": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "description": "The name of the environment to approve or reject." + }, + "state": { + "type": "string", + "description": "Whether to approve or reject deployment to the specified environments.", + "enum": [ + "approved", + "rejected" + ] + }, + "comment": { + "type": "string", + "description": "Optional comment to include with the review." + } + }, + "required": [ + "environment_name", + "state" + ] + }, "deployment-reviewer-type": { "type": "string", "description": "The type of reviewer.", @@ -98872,8 +99441,13 @@ "items": { "type": "string", "enum": [ + "c", + "cpp", + "csharp", "go", + "java", "javascript", + "kotlin", "python", "ruby", "typescript" @@ -102013,6 +102587,70 @@ "name" ] }, + "custom-deployment-rule-app": { + "title": "Custom deployment protection rule app", + "description": "A GitHub App that is providing a custom deployment protection rule.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 3515, + "description": "The unique identifier of the deployment protection rule integration." + }, + "slug": { + "type": "string", + "example": "my-custom-app", + "description": "The slugified name of the deployment protection rule integration." + }, + "integration_url": { + "type": "string", + "example": "https://api.github.com/apps/custom-app-slug", + "description": "The URL for the endpoint to get details about the app." + }, + "node_id": { + "type": "string", + "example": "MDQ6R2F0ZTM1MTU=", + "description": "The node ID for the deployment protection rule integration." + } + }, + "required": [ + "id", + "slug", + "integration_url", + "node_id" + ] + }, + "deployment-protection-rule": { + "title": "Deployment protection rule", + "description": "Deployment protection rule", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 3515, + "description": "The unique identifier for the deployment protection rule." + }, + "node_id": { + "type": "string", + "example": "MDQ6R2F0ZTM1MTU=", + "description": "The node ID for the deployment protection rule." + }, + "enabled": { + "type": "boolean", + "example": true, + "description": "Whether the deployment protection rule is enabled for the environment." + }, + "app": { + "$ref": "#/components/schemas/custom-deployment-rule-app" + } + }, + "required": [ + "id", + "node_id", + "enabled", + "app" + ] + }, "short-blob": { "title": "Short Blob", "description": "Short Blob", @@ -108663,28 +109301,122 @@ "type": "string" } }, - "credits": { - "type": "array", - "description": "A list of users receiving credit for their participation in the security advisory.", - "nullable": true, - "items": { - "type": "object", - "properties": { - "login": { - "type": "string", - "description": "The username of the user credited." - }, - "type": { - "$ref": "#/components/schemas/repository-advisory-credit-types" - } - }, - "required": [ - "login", - "type" - ], - "additionalProperties": false - } - }, + "credits": { + "type": "array", + "description": "A list of users receiving credit for their participation in the security advisory.", + "nullable": true, + "items": { + "type": "object", + "properties": { + "login": { + "type": "string", + "description": "The username of the user credited." + }, + "type": { + "$ref": "#/components/schemas/repository-advisory-credit-types" + } + }, + "required": [ + "login", + "type" + ], + "additionalProperties": false + } + }, + "severity": { + "type": "string", + "description": "The severity of the advisory. You must choose between setting this field or `cvss_vector_string`.", + "nullable": true, + "enum": [ + "critical", + "high", + "medium", + "low" + ] + }, + "cvss_vector_string": { + "type": "string", + "description": "The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`.", + "nullable": true + } + }, + "required": [ + "summary", + "description", + "vulnerabilities" + ], + "additionalProperties": false + }, + "private-vulnerability-report-create": { + "type": "object", + "properties": { + "summary": { + "type": "string", + "description": "A short summary of the advisory.", + "maxLength": 1024 + }, + "description": { + "type": "string", + "description": "A detailed description of what the advisory impacts.", + "maxLength": 65535 + }, + "vulnerabilities": { + "type": "array", + "description": "An array of products affected by the vulnerability detailed in a repository security advisory.", + "nullable": true, + "items": { + "type": "object", + "properties": { + "package": { + "description": "The name of the package affected by the vulnerability.", + "type": "object", + "properties": { + "ecosystem": { + "$ref": "#/components/schemas/repository-advisory-ecosystems" + }, + "name": { + "type": "string", + "description": "The unique package name within its ecosystem.", + "nullable": true + } + }, + "required": [ + "ecosystem" + ] + }, + "vulnerable_version_range": { + "type": "string", + "description": "The range of the package versions affected by the vulnerability.", + "nullable": true + }, + "patched_versions": { + "type": "string", + "description": "The package version(s) that resolve the vulnerability.", + "nullable": true + }, + "vulnerable_functions": { + "type": "array", + "description": "The functions in the package that are affected.", + "nullable": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "package" + ], + "additionalProperties": false + } + }, + "cwe_ids": { + "type": "array", + "description": "A list of Common Weakness Enumeration (CWE) IDs.", + "nullable": true, + "items": { + "type": "string" + } + }, "severity": { "type": "string", "description": "The severity of the advisory. You must choose between setting this field or `cvss_vector_string`.", @@ -108704,8 +109436,7 @@ }, "required": [ "summary", - "description", - "vulnerabilities" + "description" ], "additionalProperties": false }, @@ -110893,7 +111624,7 @@ } }, "location": { - "description": "The Azure region where this codespace is located.", + "description": "The initally assigned location of a new codespace.", "enum": [ "EastUs", "SouthEastAsia", @@ -119732,6 +120463,52 @@ "sender" ] }, + "webhook-deployment-protection-rule-requested": { + "title": "deployment protection rule requested event", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "requested" + ] + }, + "environment": { + "description": "The name of the environment that has the deployment protection rule.", + "type": "string" + }, + "event": { + "description": "The event that triggered the deployment protection rule.", + "type": "string" + }, + "deployment_callback_url": { + "description": "The URL to review the deployment protection rule.", + "type": "string", + "format": "uri" + }, + "deployment": { + "$ref": "#/components/schemas/deployment" + }, + "pull_requests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pull-request" + } + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "organization": { + "$ref": "#/components/schemas/organization-simple" + }, + "installation": { + "$ref": "#/components/schemas/simple-installation" + }, + "sender": { + "$ref": "#/components/schemas/simple-user" + } + } + }, "webhook-deployment-status-created": { "title": "deployment_status created event", "type": "object", @@ -162590,6 +163367,56 @@ "sender" ] }, + "webhook-rubygems-metadata": { + "title": "Ruby Gems metadata", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "version_info": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "platform": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "repo": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "commit_oid": { + "type": "string" + } + } + }, "webhook-package-published": { "title": "package published event", "type": "object", @@ -162874,7 +163701,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -163304,7 +164141,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string" @@ -163653,7 +164492,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -163673,7 +164522,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -163885,7 +164737,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string", @@ -244788,7 +245642,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -245207,7 +246071,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -245513,7 +246379,16 @@ "docker_metadata": { "type": "array", "items": { - "nullable": true + "type": "object", + "nullable": true, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "draft": { @@ -245533,7 +246408,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -245716,7 +246594,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -273076,7 +273956,7 @@ "target": "branch", "source_type": "Organization", "source": "my-org", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -281998,6 +282878,42 @@ "name": "main" } }, + "deployment-protection-rule": { + "value": { + "id": 3, + "node_id": "IEH37kRlcGxveW1lbnRTdGF0ddiv", + "enabled": true, + "app": { + "id": 1, + "node_id": "GHT58kRlcGxveW1lbnRTdTY!bbcy", + "slug": "a-custom-app", + "integration_url": "https://api.github.com/apps/a-custom-app" + } + } + }, + "custom-deployment-protection-rule-apps": { + "value": [ + { + "total_count": 2 + }, + { + "available_custom_deployment_protection_rule_integrations": [ + { + "id": 1, + "node_id": "GHT58kRlcGxveW1lbnRTdTY!bbcy", + "slug": "a-custom-app", + "integration_url": "https://api.github.com/apps/a-custom-app" + }, + { + "id": 2, + "node_id": "UHVE67RlcGxveW1lbnRTdTY!jfeuy", + "slug": "another-custom-app", + "integration_url": "https://api.github.com/apps/another-custom-app" + } + ] + } + ] + }, "repo-events-items": { "value": [ { @@ -286756,7 +287672,7 @@ "target": "branch", "source_type": "Repository", "source": "monalisa/my-repo", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -287374,6 +288290,112 @@ ] } }, + "repository-advisory-pvr": { + "value": { + "ghsa_id": "GHSA-abcd-1234-efgh", + "cve_id": "CVE-2050-00000", + "url": "https://api.github.com/repos/repo/a-package/security-advisories/GHSA-abcd-1234-efgh", + "html_url": "https://github.com/repo/a-package/security/advisories/GHSA-abcd-1234-efgh", + "summary": "A newly discovered vulnerability", + "description": "A more in-depth description of what the problem is.", + "severity": "high", + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "publisher": null, + "identifiers": [ + { + "type": "GHSA", + "value": "GHSA-abcd-1234-efgh" + }, + { + "type": "CVE", + "value": null + } + ], + "state": "triage", + "created_at": "2020-01-01T00:00:00Z", + "updated_at": "2020-01-02T00:00:00Z", + "published_at": null, + "closed_at": null, + "withdrawn_at": null, + "submission": { + "accepted": false + }, + "vulnerabilities": [ + { + "package": { + "ecosystem": "npm", + "name": "a-package" + }, + "vulnerable_version_range": "< 1.0.0", + "patched_versions": "1.0.0", + "vulnerable_functions": [ + "important_function" + ] + } + ], + "cvss": null, + "cwes": [ + { + "cwe_id": "CWE-123", + "name": "A CWE" + } + ], + "cwe_ids": [ + "CWE-123" + ], + "credits": [ + { + "login": "octocat", + "type": "finder" + } + ], + "credits_detailed": [ + { + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "type": "finder", + "state": "accepted" + } + ] + } + }, "simple-user-items-default-response": { "summary": "Default response", "value": [ @@ -295325,6 +296347,15 @@ "type": "integer" } }, + "protection-rule-id": { + "name": "protection_rule_id", + "description": "The unique identifier of the protection rule.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, "since-user": { "name": "since", "description": "A user ID. Only return users with an ID greater than this ID.", diff --git a/cache/ghec.json b/cache/ghec.json index 993f3bd30..125e08912 100644 --- a/cache/ghec.json +++ b/cache/ghec.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -19401,10 +19401,9 @@ "examples": { "default": { "value": { - "id": 21, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -19596,10 +19595,9 @@ "examples": { "default": { "value": { - "id": 21, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -27485,6 +27483,70 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + "post": { + "summary": "Review custom deployment protection rules for a workflow run", + "description": "Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see \"[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\n**Note:** GitHub Apps can only review their own custom deployment protection rules.\nTo approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).\n\nGitHub Apps must have read and write permission for **Deployments** to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/review-custom-gates-for-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/review-custom-gates-comment-required" + }, + { + "$ref": "#/components/schemas/review-custom-gates-state-required" + } + ] + }, + "examples": { + "default": { + "value": { + "environment_name": "prod-eus", + "state": "approved", + "comment": "All health checks passed." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "actions", + "subcategory": "workflow-runs" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { "get": { "summary": "List jobs for a workflow run", @@ -34649,7 +34711,7 @@ "type": "string" }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -39541,10 +39603,296 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + "get": { + "summary": "Get all deployment protection rules for an environment", + "description": "Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see \"[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/get-all-deployment-protection-rules", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#get-all-deployment-protection-rules" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "List of deployment protection rules", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The number of enabled custom deployment protection rules for this environment", + "type": "integer", + "example": 10 + }, + "custom_deployment_protection_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/deployment-protection-rule" + } + } + }, + "example": "../../components/examples/deployment_protection_rules.yaml" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + }, + "post": { + "summary": "Create a custom deployment protection rule on an environment", + "description": "Enable a custom deployment protection rule for an environment.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint.\n\nFor more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/create-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "integration_id": { + "type": "integer", + "description": "The ID of the custom app that will be enabled on the environment." + } + } + }, + "examples": { + "default": { + "value": { + "integration_id": 5 + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The enabled custom deployment protection rule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment-protection-rule" + }, + "examples": { + "default": { + "$ref": "#/components/examples/deployment-protection-rule" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + "get": { + "summary": "List custom deployment rule integrations available for an environment", + "description": "Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint.\n\nFor more information about environments, see \"[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see \"[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)\".", + "tags": [ + "repos" + ], + "operationId": "repos/list-custom-deployment-rule-integrations", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#list-custom-deployment-rule-integrations" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per-page" + } + ], + "responses": { + "200": { + "description": "A list of custom deployment rule integrations available for this environment.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The total number of custom deployment protection rule integrations available for this environment.", + "type": "integer", + "example": 35 + }, + "available_custom_deployment_protection_rule_integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/custom-deployment-rule-app" + } + } + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/custom-deployment-protection-rule-apps" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + "get": { + "summary": "Get a custom deployment protection rule", + "description": "Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see \"[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment).\"\n\nFor more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).", + "tags": [ + "repos" + ], + "operationId": "repos/get-custom-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#get-a-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/protection-rule-id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment-protection-rule" + }, + "examples": { + "default": { + "$ref": "#/components/examples/deployment-protection-rule" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + }, + "delete": { + "summary": "Disable a custom protection rule for an environment", + "description": "Disables a custom deployment protection rule for an environment.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see \"[Get an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)\".", + "tags": [ + "repos" + ], + "operationId": "repos/disable-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#disable-deployment-protection-rule" + }, + "parameters": [ + { + "$ref": "#/components/parameters/environment-name" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/protection-rule-id" + } + ], + "responses": { + "204": { + "description": "Response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "deployments", + "subcategory": "protection-rules" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], @@ -41700,7 +42048,7 @@ "/repos/{owner}/{repo}/import": { "get": { "summary": "Get an import status", - "description": "View the progress of an import.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `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.\n* `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).\n* `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.\n* `pushing` - the \"push\" step of the import is in progress. This is where the importer updates the repository on GitHub Enterprise Cloud. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is \"Writing objects\".\n* `complete` - the import is complete, and the repository is ready on GitHub Enterprise Cloud.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#start-an-import) with the correct URL.\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n\n**The project_choices field**\n\nWhen 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.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `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.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `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.", + "description": "View the progress of an import.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `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.\n* `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).\n* `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.\n* `pushing` - the \"push\" step of the import is in progress. This is where the importer updates the repository on GitHub Enterprise Cloud. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is \"Writing objects\".\n* `complete` - the import is complete, and the repository is ready on GitHub Enterprise Cloud.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#start-an-import) with the correct URL.\n* `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/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.\n\n**The project_choices field**\n\nWhen 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.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `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.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `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.", "tags": [ "migrations" ], @@ -41750,7 +42098,7 @@ }, "put": { "summary": "Start an import", - "description": "Start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer. Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response.", + "description": "Start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer. Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response.\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -41862,7 +42210,7 @@ }, "patch": { "summary": "Update an import", - "description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.\n\nSome servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will\nhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.\nYou can select the project to import by providing one of the objects in the `project_choices` array in the update request.", + "description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.\n\nSome servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will\nhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.\nYou can select the project to import by providing one of the objects in the `project_choices` array in the update request.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -41972,7 +42320,7 @@ }, "delete": { "summary": "Cancel an import", - "description": "Stop an import for a repository.", + "description": "Stop an import for a repository.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -42009,7 +42357,7 @@ "/repos/{owner}/{repo}/import/authors": { "get": { "summary": "Get commit authors", - "description": "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 Enterprise Cloud 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 `.\n\nThis endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.", + "description": "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 Enterprise Cloud 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 `.\n\nThis endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.", "tags": [ "migrations" ], @@ -42067,7 +42415,7 @@ "/repos/{owner}/{repo}/import/authors/{author_id}": { "patch": { "summary": "Map a commit author", - "description": "Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.", + "description": "Update an author's identity for the import. Your application can continue updating authors any time before you push\nnew commits to the repository.\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -42159,7 +42507,7 @@ "/repos/{owner}/{repo}/import/large_files": { "get": { "summary": "Get large files", - "description": "List files larger than 100MB found during the import", + "description": "List files larger than 100MB found during the import\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -42211,7 +42559,7 @@ "/repos/{owner}/{repo}/import/lfs": { "patch": { "summary": "Update Git LFS preference", - "description": "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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files).", + "description": "You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability\nis powered by [Git LFS](https://git-lfs.com).\n\nYou can learn more about our LFS feature and working with large files [on our help\nsite](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files).\n\n**Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end\non October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update\nthese docs to reflect relevant changes to the API and will contact all integrators using the \"Source imports\" API.\n", "tags": [ "migrations" ], @@ -48448,7 +48796,7 @@ "nullable": true, "properties": { "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -51666,10 +52014,9 @@ "examples": { "default": { "value": { - "id": 42, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -51886,10 +52233,9 @@ "examples": { "default": { "value": { - "id": 42, "name": "super cool ruleset", "target": "branch", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -52550,6 +52896,96 @@ "x-octokit": {} } }, + "/repos/{owner}/{repo}/security-advisories/reports": { + "post": { + "summary": "Privately report a security vulnerability", + "description": "Report a security vulnerability to the maintainers of the repository.\nSee \"[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)\" for more information about private vulnerability reporting.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/create-private-vulnerability-report", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/private-vulnerability-report-create" + }, + "examples": { + "default": { + "value": { + "summary": "A newly discovered vulnerability", + "description": "A more in-depth description of what the problem is.", + "severity": "high", + "vulnerabilities": [ + { + "package": { + "name": "a-package", + "ecosystem": "npm" + }, + "vulnerable_version_range": "< 1.0.0", + "patched_versions": "1.0.0", + "vulnerable_functions": [ + "important_function" + ] + } + ], + "cwe_ids": [ + "CWE-123" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository-advisory" + }, + "examples": { + "default": { + "$ref": "#/components/examples/repository-advisory-pvr" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "repository-advisories" + }, + "x-octokit": {} + } + }, "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { "get": { "summary": "Get a repository security advisory", @@ -55867,7 +56303,7 @@ "/search/code": { "get": { "summary": "Search code", - "description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#pagination).\n\nWhen 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/enterprise-cloud@latest//rest/reference/search#text-match-metadata).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\n**Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate\nrate limit from other search types, of 10 requests per minute, and all code\nsearch requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/).", + "description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#pagination).\n\nWhen 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/enterprise-cloud@latest//rest/reference/search#text-match-metadata).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\nThis endpoint requires you to authenticate and limits you to 10 requests per minute.", "tags": [ "search" ], @@ -55889,7 +56325,7 @@ { "name": "sort", "deprecated": true, - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Cloud search infrastructure. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/reference/search#ranking-search-results)", + "description": "**This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Cloud search infrastructure. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { @@ -55901,7 +56337,7 @@ }, { "name": "order", - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. ", + "description": "**This field is deprecated.** 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`. ", "in": "query", "deprecated": true, "required": false, @@ -59394,7 +59830,7 @@ "type": "string" }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "client_ip": { @@ -59456,7 +59892,7 @@ } }, "location": { - "description": "Location for this codespace. Assigned by IP if not provided", + "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.", "type": "string" }, "machine": { @@ -69452,7 +69888,100 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-created" + "$ref": "#/components/schemas/webhook-dependabot-alert-created" + } + } + } + }, + "responses": { + "200": { + "description": "Return a 200 status to indicate that the data was received successfully" + } + }, + "x-github": { + "githubCloudOnly": false, + "category": "webhooks", + "subcategory": "dependabot-alert", + "supported-webhook-types": [ + "repository", + "organization", + "app" + ] + } + } + }, + "dependabot-alert-dismissed": { + "post": { + "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", + "description": "A Dependabot alert was manually closed.", + "operationId": "dependabot-alert/dismissed", + "externalDocs": { + "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" + }, + "parameters": [ + { + "name": "User-Agent", + "in": "header", + "example": "GitHub-Hookshot/123abc", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Id", + "in": "header", + "example": 12312312, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Event", + "in": "header", + "example": "issues", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Id", + "in": "header", + "example": 123123, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Type", + "in": "header", + "example": "repository", + "schema": { + "type": "string" + } + }, + { + "name": "X-GitHub-Delivery", + "in": "header", + "example": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "schema": { + "type": "string" + } + }, + { + "name": "X-Hub-Signature-256", + "in": "header", + "example": "sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" } } } @@ -69474,11 +70003,11 @@ } } }, - "dependabot-alert-dismissed": { + "dependabot-alert-fixed": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A Dependabot alert was manually closed.", - "operationId": "dependabot-alert/dismissed", + "description": "A manifest file change removed a vulnerability.", + "operationId": "dependabot-alert/fixed", "externalDocs": { "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -69545,7 +70074,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" + "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" } } } @@ -69567,11 +70096,11 @@ } } }, - "dependabot-alert-fixed": { + "dependabot-alert-reintroduced": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A manifest file change removed a vulnerability.", - "operationId": "dependabot-alert/fixed", + "description": "A manifest file change introduced a vulnerable dependency that had previously been fixed.", + "operationId": "dependabot-alert/reintroduced", "externalDocs": { "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -69638,7 +70167,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" + "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" } } } @@ -69660,11 +70189,11 @@ } } }, - "dependabot-alert-reintroduced": { + "dependabot-alert-reopened": { "post": { "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A manifest file change introduced a vulnerable dependency that had previously been fixed.", - "operationId": "dependabot-alert/reintroduced", + "description": "A Dependabot alert was manually reopened.", + "operationId": "dependabot-alert/reopened", "externalDocs": { "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" }, @@ -69731,7 +70260,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" + "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" } } } @@ -69753,13 +70282,13 @@ } } }, - "dependabot-alert-reopened": { + "deploy-key-created": { "post": { - "summary": "This event occurs when there is activity relating to Dependabot alerts.\n\nFor more information about Dependabot alerts, see \"[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts).\" For information about the API to manage Dependabot alerts, see \"[Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Dependabot alerts\" repository permission.\n\n**Note**: Webhook events for Dependabot alerts are currently in beta and subject to change.", - "description": "A Dependabot alert was manually reopened.", - "operationId": "dependabot-alert/reopened", + "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/enterprise-cloud@latest//developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deploy key was created.", + "operationId": "deploy-key/created", "externalDocs": { - "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot-alert" + "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" }, "parameters": [ { @@ -69824,7 +70353,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" + "$ref": "#/components/schemas/webhook-deploy-key-created" } } } @@ -69837,7 +70366,7 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "dependabot-alert", + "subcategory": "deploy-key", "supported-webhook-types": [ "repository", "organization", @@ -69846,11 +70375,11 @@ } } }, - "deploy-key-created": { + "deploy-key-deleted": { "post": { - "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/enterprise-cloud@latest//developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deploy key was created.", - "operationId": "deploy-key/created", + "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/enterprise-cloud@latest//developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deploy key was deleted.", + "operationId": "deploy-key/deleted", "externalDocs": { "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" }, @@ -69917,7 +70446,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deploy-key-created" + "$ref": "#/components/schemas/webhook-deploy-key-deleted" } } } @@ -69939,13 +70468,13 @@ } } }, - "deploy-key-deleted": { + "deployment-created": { "post": { - "summary": "This event occurs when there is activity relating to deploy keys. For more information, see \"[Managing deploy keys](https://docs.github.com/enterprise-cloud@latest//developers/overview/managing-deploy-keys).\" For information about the APIs to manage deploy keys, see [the GraphQL documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deploykey) or \"[Deploy keys](https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys)\" in the REST API documentation.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deploy key was deleted.", - "operationId": "deploy-key/deleted", + "summary": "This event occurs when there is activity relating to deployments. For more information, see \"[About deployments](https://docs.github.com/enterprise-cloud@latest//actions/deployment/about-deployments).\" For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deployment) or \"[Deployments](https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments)\" in the REST API documentation.\n\nFor activity relating to deployment status, use the `deployment_status` event.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deployment was created.", + "operationId": "deployment/created", "externalDocs": { - "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deploy-key" + "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment" }, "parameters": [ { @@ -70010,7 +70539,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deploy-key-deleted" + "$ref": "#/components/schemas/webhook-deployment-created" } } } @@ -70023,7 +70552,7 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "deploy-key", + "subcategory": "deployment", "supported-webhook-types": [ "repository", "organization", @@ -70032,13 +70561,13 @@ } } }, - "deployment-created": { + "deployment-protection-rule-requested": { "post": { - "summary": "This event occurs when there is activity relating to deployments. For more information, see \"[About deployments](https://docs.github.com/enterprise-cloud@latest//actions/deployment/about-deployments).\" For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/enterprise-cloud@latest//graphql/reference/objects#deployment) or \"[Deployments](https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments)\" in the REST API documentation.\n\nFor activity relating to deployment status, use the `deployment_status` event.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", - "description": "A deployment was created.", - "operationId": "deployment/created", + "summary": "This event occurs when there is activity relating to deployment protection rules. For more information, see \"[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules).\" For information about the API to manage deployment protection rules, see [the REST API documentation](https://docs.github.com/enterprise-cloud@latest//rest/deployments/environments).\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deployment protection rule was requested for an environment.", + "operationId": "deployment-protection-rule/requested", "externalDocs": { - "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment" + "url": "https://docs.github.com/enterprise-cloud@latest//developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_protection_rule" }, "parameters": [ { @@ -70103,7 +70632,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/webhook-deployment-created" + "$ref": "#/components/schemas/webhook-deployment-protection-rule-requested" } } } @@ -70116,10 +70645,8 @@ "x-github": { "githubCloudOnly": false, "category": "webhooks", - "subcategory": "deployment", + "subcategory": "deployment-protection-rule", "supported-webhook-types": [ - "repository", - "organization", "app" ] } @@ -97324,7 +97851,7 @@ } }, "location": { - "description": "The Azure region where this codespace is located.", + "description": "The initally assigned location of a new codespace.", "enum": [ "EastUs", "SouthEastAsia", @@ -104076,6 +104603,48 @@ "comment" ] }, + "review-custom-gates-comment-required": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "description": "The name of the environment to approve or reject." + }, + "comment": { + "type": "string", + "description": "Comment associated with the pending deployment protection rule. **Required when state is not provided.**" + } + }, + "required": [ + "environment_name", + "comment" + ] + }, + "review-custom-gates-state-required": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "description": "The name of the environment to approve or reject." + }, + "state": { + "type": "string", + "description": "Whether to approve or reject deployment to the specified environments.", + "enum": [ + "approved", + "rejected" + ] + }, + "comment": { + "type": "string", + "description": "Optional comment to include with the review." + } + }, + "required": [ + "environment_name", + "state" + ] + }, "deployment-reviewer-type": { "type": "string", "description": "The type of reviewer.", @@ -106609,8 +107178,13 @@ "items": { "type": "string", "enum": [ + "c", + "cpp", + "csharp", "go", + "java", "javascript", + "kotlin", "python", "ruby", "typescript" @@ -109750,6 +110324,70 @@ "name" ] }, + "custom-deployment-rule-app": { + "title": "Custom deployment protection rule app", + "description": "A GitHub App that is providing a custom deployment protection rule.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 3515, + "description": "The unique identifier of the deployment protection rule integration." + }, + "slug": { + "type": "string", + "example": "my-custom-app", + "description": "The slugified name of the deployment protection rule integration." + }, + "integration_url": { + "type": "string", + "example": "https://api.github.com/apps/custom-app-slug", + "description": "The URL for the endpoint to get details about the app." + }, + "node_id": { + "type": "string", + "example": "MDQ6R2F0ZTM1MTU=", + "description": "The node ID for the deployment protection rule integration." + } + }, + "required": [ + "id", + "slug", + "integration_url", + "node_id" + ] + }, + "deployment-protection-rule": { + "title": "Deployment protection rule", + "description": "Deployment protection rule", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 3515, + "description": "The unique identifier for the deployment protection rule." + }, + "node_id": { + "type": "string", + "example": "MDQ6R2F0ZTM1MTU=", + "description": "The node ID for the deployment protection rule." + }, + "enabled": { + "type": "boolean", + "example": true, + "description": "Whether the deployment protection rule is enabled for the environment." + }, + "app": { + "$ref": "#/components/schemas/custom-deployment-rule-app" + } + }, + "required": [ + "id", + "node_id", + "enabled", + "app" + ] + }, "short-blob": { "title": "Short Blob", "description": "Short Blob", @@ -116400,28 +117038,122 @@ "type": "string" } }, - "credits": { - "type": "array", - "description": "A list of users receiving credit for their participation in the security advisory.", - "nullable": true, - "items": { - "type": "object", - "properties": { - "login": { - "type": "string", - "description": "The username of the user credited." - }, - "type": { - "$ref": "#/components/schemas/repository-advisory-credit-types" - } - }, - "required": [ - "login", - "type" - ], - "additionalProperties": false - } - }, + "credits": { + "type": "array", + "description": "A list of users receiving credit for their participation in the security advisory.", + "nullable": true, + "items": { + "type": "object", + "properties": { + "login": { + "type": "string", + "description": "The username of the user credited." + }, + "type": { + "$ref": "#/components/schemas/repository-advisory-credit-types" + } + }, + "required": [ + "login", + "type" + ], + "additionalProperties": false + } + }, + "severity": { + "type": "string", + "description": "The severity of the advisory. You must choose between setting this field or `cvss_vector_string`.", + "nullable": true, + "enum": [ + "critical", + "high", + "medium", + "low" + ] + }, + "cvss_vector_string": { + "type": "string", + "description": "The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`.", + "nullable": true + } + }, + "required": [ + "summary", + "description", + "vulnerabilities" + ], + "additionalProperties": false + }, + "private-vulnerability-report-create": { + "type": "object", + "properties": { + "summary": { + "type": "string", + "description": "A short summary of the advisory.", + "maxLength": 1024 + }, + "description": { + "type": "string", + "description": "A detailed description of what the advisory impacts.", + "maxLength": 65535 + }, + "vulnerabilities": { + "type": "array", + "description": "An array of products affected by the vulnerability detailed in a repository security advisory.", + "nullable": true, + "items": { + "type": "object", + "properties": { + "package": { + "description": "The name of the package affected by the vulnerability.", + "type": "object", + "properties": { + "ecosystem": { + "$ref": "#/components/schemas/repository-advisory-ecosystems" + }, + "name": { + "type": "string", + "description": "The unique package name within its ecosystem.", + "nullable": true + } + }, + "required": [ + "ecosystem" + ] + }, + "vulnerable_version_range": { + "type": "string", + "description": "The range of the package versions affected by the vulnerability.", + "nullable": true + }, + "patched_versions": { + "type": "string", + "description": "The package version(s) that resolve the vulnerability.", + "nullable": true + }, + "vulnerable_functions": { + "type": "array", + "description": "The functions in the package that are affected.", + "nullable": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "package" + ], + "additionalProperties": false + } + }, + "cwe_ids": { + "type": "array", + "description": "A list of Common Weakness Enumeration (CWE) IDs.", + "nullable": true, + "items": { + "type": "string" + } + }, "severity": { "type": "string", "description": "The severity of the advisory. You must choose between setting this field or `cvss_vector_string`.", @@ -116441,8 +117173,7 @@ }, "required": [ "summary", - "description", - "vulnerabilities" + "description" ], "additionalProperties": false }, @@ -118883,7 +119614,7 @@ } }, "location": { - "description": "The Azure region where this codespace is located.", + "description": "The initally assigned location of a new codespace.", "enum": [ "EastUs", "SouthEastAsia", @@ -127722,6 +128453,52 @@ "sender" ] }, + "webhook-deployment-protection-rule-requested": { + "title": "deployment protection rule requested event", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "requested" + ] + }, + "environment": { + "description": "The name of the environment that has the deployment protection rule.", + "type": "string" + }, + "event": { + "description": "The event that triggered the deployment protection rule.", + "type": "string" + }, + "deployment_callback_url": { + "description": "The URL to review the deployment protection rule.", + "type": "string", + "format": "uri" + }, + "deployment": { + "$ref": "#/components/schemas/deployment" + }, + "pull_requests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pull-request" + } + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "organization": { + "$ref": "#/components/schemas/organization-simple" + }, + "installation": { + "$ref": "#/components/schemas/simple-installation" + }, + "sender": { + "$ref": "#/components/schemas/simple-user" + } + } + }, "webhook-deployment-status-created": { "title": "deployment_status created event", "type": "object", @@ -170580,6 +171357,56 @@ "sender" ] }, + "webhook-rubygems-metadata": { + "title": "Ruby Gems metadata", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "version_info": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "platform": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "repo": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "commit_oid": { + "type": "string" + } + } + }, "webhook-package-published": { "title": "package published event", "type": "object", @@ -170864,7 +171691,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -171294,7 +172131,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string" @@ -171643,7 +172482,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -171663,7 +172512,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -171875,7 +172727,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string", @@ -252778,7 +253632,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -253197,7 +254061,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -253503,7 +254369,16 @@ "docker_metadata": { "type": "array", "items": { - "nullable": true + "type": "object", + "nullable": true, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "draft": { @@ -253523,7 +254398,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -253706,7 +254584,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -281980,7 +282860,7 @@ "target": "branch", "source_type": "Organization", "source": "my-org", - "enforcement": "enabled", + "enforcement": "active", "bypass_actors": [ { "actor_id": 234, @@ -290908,6 +291788,42 @@ "name": "main" } }, + "deployment-protection-rule": { + "value": { + "id": 3, + "node_id": "IEH37kRlcGxveW1lbnRTdGF0ddiv", + "enabled": true, + "app": { + "id": 1, + "node_id": "GHT58kRlcGxveW1lbnRTdTY!bbcy", + "slug": "a-custom-app", + "integration_url": "https://api.github.com/apps/a-custom-app" + } + } + }, + "custom-deployment-protection-rule-apps": { + "value": [ + { + "total_count": 2 + }, + { + "available_custom_deployment_protection_rule_integrations": [ + { + "id": 1, + "node_id": "GHT58kRlcGxveW1lbnRTdTY!bbcy", + "slug": "a-custom-app", + "integration_url": "https://api.github.com/apps/a-custom-app" + }, + { + "id": 2, + "node_id": "UHVE67RlcGxveW1lbnRTdTY!jfeuy", + "slug": "another-custom-app", + "integration_url": "https://api.github.com/apps/another-custom-app" + } + ] + } + ] + }, "repo-events-items": { "value": [ { @@ -295666,7 +296582,7 @@ "target": "branch", "source_type": "Repository", "source": "monalisa/my-repo", - "enforcement": "enabled", + "enforcement": "active", "bypass_mode": "repository", "bypass_actors": [ { @@ -296284,6 +297200,112 @@ ] } }, + "repository-advisory-pvr": { + "value": { + "ghsa_id": "GHSA-abcd-1234-efgh", + "cve_id": "CVE-2050-00000", + "url": "https://api.github.com/repos/repo/a-package/security-advisories/GHSA-abcd-1234-efgh", + "html_url": "https://github.com/repo/a-package/security/advisories/GHSA-abcd-1234-efgh", + "summary": "A newly discovered vulnerability", + "description": "A more in-depth description of what the problem is.", + "severity": "high", + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "publisher": null, + "identifiers": [ + { + "type": "GHSA", + "value": "GHSA-abcd-1234-efgh" + }, + { + "type": "CVE", + "value": null + } + ], + "state": "triage", + "created_at": "2020-01-01T00:00:00Z", + "updated_at": "2020-01-02T00:00:00Z", + "published_at": null, + "closed_at": null, + "withdrawn_at": null, + "submission": { + "accepted": false + }, + "vulnerabilities": [ + { + "package": { + "ecosystem": "npm", + "name": "a-package" + }, + "vulnerable_version_range": "< 1.0.0", + "patched_versions": "1.0.0", + "vulnerable_functions": [ + "important_function" + ] + } + ], + "cvss": null, + "cwes": [ + { + "cwe_id": "CWE-123", + "name": "A CWE" + } + ], + "cwe_ids": [ + "CWE-123" + ], + "credits": [ + { + "login": "octocat", + "type": "finder" + } + ], + "credits_detailed": [ + { + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "type": "finder", + "state": "accepted" + } + ] + } + }, "simple-user-items-default-response": { "summary": "Default response", "value": [ @@ -304381,6 +305403,15 @@ "type": "integer" } }, + "protection-rule-id": { + "name": "protection_rule_id", + "description": "The unique identifier of the protection rule.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, "since-user": { "name": "since", "description": "A user ID. Only return users with an ID greater than this ID.", diff --git a/cache/ghes-3.5.json b/cache/ghes-3.5.json index b1f3979f5..04a97ad26 100644 --- a/cache/ghes-3.5.json +++ b/cache/ghes-3.5.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -32516,7 +32516,7 @@ "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], diff --git a/cache/ghes-3.6.json b/cache/ghes-3.6.json index aab39ba66..c5d50d016 100644 --- a/cache/ghes-3.6.json +++ b/cache/ghes-3.6.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -33055,7 +33055,7 @@ "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], diff --git a/cache/ghes-3.7.json b/cache/ghes-3.7.json index 246d109b8..6d063d379 100644 --- a/cache/ghes-3.7.json +++ b/cache/ghes-3.7.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -33886,7 +33886,7 @@ "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], @@ -156071,6 +156071,56 @@ "sender" ] }, + "webhook-rubygems-metadata": { + "title": "Ruby Gems metadata", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "version_info": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "platform": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "repo": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "commit_oid": { + "type": "string" + } + } + }, "webhook-package-published": { "title": "package published event", "type": "object", @@ -156355,7 +156405,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -156785,7 +156845,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string" @@ -157134,7 +157196,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -157154,7 +157226,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -157366,7 +157441,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string", @@ -232072,7 +232149,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -232491,7 +232578,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -232797,7 +232886,16 @@ "docker_metadata": { "type": "array", "items": { - "nullable": true + "type": "object", + "nullable": true, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "draft": { @@ -232817,7 +232915,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -233000,7 +233101,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" diff --git a/cache/ghes-3.8.json b/cache/ghes-3.8.json index c0576ac98..39a5a7856 100644 --- a/cache/ghes-3.8.json +++ b/cache/ghes-3.8.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -37082,7 +37082,7 @@ "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], @@ -62006,6 +62006,28 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + "post": { + "summary": "Review custom deployment protection rules for a workflow run", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "actions" + ], + "operationId": "actions/review-custom-gates-for-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { "get": { "summary": "Get workflow run usage", @@ -62436,6 +62458,112 @@ } } }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + "get": { + "summary": "Get all deployment protection rules for an environment", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "repos" + ], + "operationId": "repos/get-all-deployment-protection-rules", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + }, + "post": { + "summary": "Create a custom deployment protection rule on an environment", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "repos" + ], + "operationId": "repos/create-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + "get": { + "summary": "List custom deployment rule integrations available for an environment", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "repos" + ], + "operationId": "repos/list-custom-deployment-rule-integrations", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + "get": { + "summary": "Get a custom deployment protection rule", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "repos" + ], + "operationId": "repos/get-custom-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + }, + "delete": { + "summary": "Disable a custom protection rule for an environment", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "repos" + ], + "operationId": "repos/disable-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/import": { "get": { "summary": "Get an import status", @@ -62880,6 +63008,28 @@ } } }, + "/repos/{owner}/{repo}/security-advisories/reports": { + "post": { + "summary": "Privately report a security vulnerability", + "description": "This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/create-private-vulnerability-report", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { "get": { "summary": "Get a repository security advisory", @@ -163281,6 +163431,56 @@ "sender" ] }, + "webhook-rubygems-metadata": { + "title": "Ruby Gems metadata", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "version_info": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "platform": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "repo": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "commit_oid": { + "type": "string" + } + } + }, "webhook-package-published": { "title": "package published event", "type": "object", @@ -163565,7 +163765,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -163995,7 +164205,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string" @@ -164344,7 +164556,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -164364,7 +164586,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -164576,7 +164801,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string", @@ -239282,7 +239509,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -239701,7 +239938,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -240007,7 +240246,16 @@ "docker_metadata": { "type": "array", "items": { - "nullable": true + "type": "object", + "nullable": true, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "draft": { @@ -240027,7 +240275,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -240210,7 +240461,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" diff --git a/cache/github.ae.json b/cache/github.ae.json index b0ad6bb4a..45b2466e9 100644 --- a/cache/github.ae.json +++ b/cache/github.ae.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "11.0.0", + "version": "11.1.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { @@ -27936,7 +27936,7 @@ "/repos/{owner}/{repo}/events": { "get": { "summary": "List repository events", - "description": "", + "description": "**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.\n", "tags": [ "activity" ], @@ -40419,7 +40419,7 @@ "/search/code": { "get": { "summary": "Search code", - "description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen 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/github-ae@latest/rest/reference/search#text-match-metadata).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\n**Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate\nrate limit from other search types, of 10 requests per minute, and all code\nsearch requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/).", + "description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen 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/github-ae@latest/rest/reference/search#text-match-metadata).\n\nFor 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:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis 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.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* 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\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\nThis endpoint requires you to authenticate and limits you to 10 requests per minute.", "tags": [ "search" ], @@ -40441,7 +40441,7 @@ { "name": "sort", "deprecated": true, - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub AE search infrastructure. Default: [best match](https://docs.github.com/github-ae@latest/rest/reference/search#ranking-search-results)", + "description": "**This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub AE search infrastructure. Default: [best match](https://docs.github.com/github-ae@latest/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { @@ -40453,7 +40453,7 @@ }, { "name": "order", - "description": "**Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. ", + "description": "**This field is deprecated.** 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`. ", "in": "query", "deprecated": true, "required": false, @@ -50071,6 +50071,28 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + "post": { + "summary": "Review custom deployment protection rules for a workflow run", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "actions" + ], + "operationId": "actions/review-custom-gates-for-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { "get": { "summary": "Get pending deployments for a workflow run", @@ -50861,6 +50883,112 @@ } } }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + "get": { + "summary": "Get all deployment protection rules for an environment", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "repos" + ], + "operationId": "repos/get-all-deployment-protection-rules", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + }, + "post": { + "summary": "Create a custom deployment protection rule on an environment", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "repos" + ], + "operationId": "repos/create-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + "get": { + "summary": "List custom deployment rule integrations available for an environment", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "repos" + ], + "operationId": "repos/list-custom-deployment-rule-integrations", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + "get": { + "summary": "Get a custom deployment protection rule", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "repos" + ], + "operationId": "repos/get-custom-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + }, + "delete": { + "summary": "Disable a custom protection rule for an environment", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "repos" + ], + "operationId": "repos/disable-deployment-protection-rule", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/import": { "get": { "summary": "Get an import status", @@ -51349,6 +51477,28 @@ } } }, + "/repos/{owner}/{repo}/security-advisories/reports": { + "post": { + "summary": "Privately report a security vulnerability", + "description": "This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/create-private-vulnerability-report", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability" + }, + "x-octokit": { + "api.github.com": "removed" + }, + "responses": { + "501": { + "description": "Not Implemented" + } + } + } + }, "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { "get": { "summary": "Get a repository security advisory", @@ -56207,6 +56357,97 @@ } } }, + "deployment-protection-rule-requested": { + "post": { + "summary": "This event occurs when there is activity relating to deployment protection rules. For more information, see \"[Using environments for deployment](https://docs.github.com/github-ae@latest/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules).\" For information about the API to manage deployment protection rules, see [the REST API documentation](https://docs.github.com/github-ae@latest/rest/deployments/environments).\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", + "description": "A deployment protection rule was requested for an environment.", + "operationId": "deployment-protection-rule/requested", + "externalDocs": { + "url": "https://docs.github.com/github-ae@latest/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_protection_rule" + }, + "parameters": [ + { + "name": "User-Agent", + "in": "header", + "example": "GitHub-Hookshot/123abc", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Id", + "in": "header", + "example": 12312312, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Event", + "in": "header", + "example": "issues", + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Id", + "in": "header", + "example": 123123, + "schema": { + "type": "string" + } + }, + { + "name": "X-Github-Hook-Installation-Target-Type", + "in": "header", + "example": "repository", + "schema": { + "type": "string" + } + }, + { + "name": "X-GitHub-Delivery", + "in": "header", + "example": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "schema": { + "type": "string" + } + }, + { + "name": "X-Hub-Signature-256", + "in": "header", + "example": "sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook-deployment-protection-rule-requested" + } + } + } + }, + "responses": { + "200": { + "description": "Return a 200 status to indicate that the data was received successfully" + } + }, + "x-github": { + "githubCloudOnly": false, + "category": "webhooks", + "subcategory": "deployment-protection-rule", + "supported-webhook-types": [ + "app" + ] + } + } + }, "deployment-status-created": { "post": { "summary": "This event occurs when there is activity relating to deployment statuses. For more information, see \"[About deployments](https://docs.github.com/github-ae@latest/actions/deployment/about-deployments).\" For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/github-ae@latest/graphql/reference/objects#deployment) or \"[Deployments](https://docs.github.com/github-ae@latest/rest/deployments/deployments)\" in the REST API documentation.\n\nFor activity relating to deployment creation, use the `deployment` event.\n\nTo subscribe to this event, a GitHub App must have at least read-level access for the \"Deployments\" repository permission.", @@ -104318,6 +104559,52 @@ "sender" ] }, + "webhook-deployment-protection-rule-requested": { + "title": "deployment protection rule requested event", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "requested" + ] + }, + "environment": { + "description": "The name of the environment that has the deployment protection rule.", + "type": "string" + }, + "event": { + "description": "The event that triggered the deployment protection rule.", + "type": "string" + }, + "deployment_callback_url": { + "description": "The URL to review the deployment protection rule.", + "type": "string", + "format": "uri" + }, + "deployment": { + "$ref": "#/components/schemas/deployment" + }, + "pull_requests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pull-request" + } + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "organization": { + "$ref": "#/components/schemas/organization-simple" + }, + "installation": { + "$ref": "#/components/schemas/simple-installation" + }, + "sender": { + "$ref": "#/components/schemas/simple-user" + } + } + }, "webhook-deployment-status-created": { "title": "deployment_status created event", "type": "object", @@ -145048,6 +145335,56 @@ "sender" ] }, + "webhook-rubygems-metadata": { + "title": "Ruby Gems metadata", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "version_info": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "platform": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "repo": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "commit_oid": { + "type": "string" + } + } + }, "webhook-package-published": { "title": "package published event", "type": "object", @@ -145332,7 +145669,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -145762,7 +146109,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string" @@ -146111,7 +146460,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -146131,7 +146490,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -146343,7 +146705,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "source_url": { "type": "string", @@ -220905,7 +221269,17 @@ }, "docker_metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "draft": { "type": "boolean" @@ -221324,7 +221698,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" @@ -221630,7 +222006,16 @@ "docker_metadata": { "type": "array", "items": { - "nullable": true + "type": "object", + "nullable": true, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "draft": { @@ -221650,7 +222035,10 @@ }, "metadata": { "type": "array", - "items": {} + "items": { + "type": "object", + "additionalProperties": true + } }, "name": { "type": "string" @@ -221833,7 +222221,9 @@ }, "rubygems_metadata": { "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/webhook-rubygems-metadata" + } }, "summary": { "type": "string" diff --git a/packages/openapi-types-ghec/package.json b/packages/openapi-types-ghec/package.json index 0a8029ad6..df64dc21a 100644 --- a/packages/openapi-types-ghec/package.json +++ b/packages/openapi-types-ghec/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-ghec/types.d.ts b/packages/openapi-types-ghec/types.d.ts index 4dc397440..d56d98163 100644 --- a/packages/openapi-types-ghec/types.d.ts +++ b/packages/openapi-types-ghec/types.d.ts @@ -3727,6 +3727,18 @@ export interface paths { */ post: operations["actions/cancel-workflow-run"]; }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **Note:** GitHub Apps can only review their own custom deployment protection rules. + * To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + * + * GitHub Apps must have read and write permission for **Deployments** to use this endpoint. + */ + post: operations["actions/review-custom-gates-for-run"]; + }; "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { /** * List jobs for a workflow run @@ -5553,8 +5565,56 @@ export interface paths { */ delete: operations["repos/delete-deployment-branch-policy"]; }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + /** + * Get all deployment protection rules for an environment + * @description Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + get: operations["repos/get-all-deployment-protection-rules"]; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + post: operations["repos/create-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + /** + * List custom deployment rule integrations available for an environment + * @description Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. + * + * For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)". + */ + get: operations["repos/list-custom-deployment-rule-integrations"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + /** + * Get a custom deployment protection rule + * @description Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + get: operations["repos/get-custom-deployment-protection-rule"]; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Get an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)". + */ + delete: operations["repos/disable-deployment-protection-rule"]; + }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -5868,6 +5928,10 @@ export interface paths { * Get an import status * @description View the progress of an import. * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + * * **Import status** * * This section includes details about the possible values of the `status` field of the Import Progress response. @@ -5905,11 +5969,16 @@ export interface paths { /** * Start an import * @description Start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer. Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response. + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ put: operations["migrations/start-import"]; /** * Cancel an import * @description Stop an import for a repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ delete: operations["migrations/cancel-import"]; /** @@ -5920,6 +5989,10 @@ export interface paths { * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will * have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/update-import"]; }; @@ -5929,13 +6002,22 @@ export interface paths { * @description 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 Enterprise Cloud 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 `. * * This endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ get: operations["migrations/get-commit-authors"]; }; "/repos/{owner}/{repo}/import/authors/{author_id}": { /** * Map a commit author - * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/map-commit-author"]; }; @@ -5943,13 +6025,25 @@ export interface paths { /** * Get large files * @description List files larger than 100MB found during the import + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ get: operations["migrations/get-large-files"]; }; "/repos/{owner}/{repo}/import/lfs": { /** * Update Git LFS preference - * @description 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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files). + * @description 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.com). + * + * You can learn more about our LFS feature and working with large files [on our help + * site](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files). + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/set-lfs-preference"]; }; @@ -6827,6 +6921,14 @@ export interface paths { */ post: operations["security-advisories/create-repository-advisory"]; }; + "/repos/{owner}/{repo}/security-advisories/reports": { + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + post: operations["security-advisories/create-private-vulnerability-report"]; + }; "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { /** * Get a repository security advisory @@ -7299,9 +7401,7 @@ export interface paths { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ get: operations["search/code"]; }; @@ -13440,7 +13540,7 @@ export interface components { ref?: string; }; /** - * @description The Azure region where this codespace is located. + * @description The initally assigned location of a new codespace. * @example WestUs2 * @enum {string} */ @@ -17200,6 +17300,23 @@ export interface components { */ comment: string; }; + "review-custom-gates-comment-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** @description Comment associated with the pending deployment protection rule. **Required when state is not provided.** */ + comment: string; + }; + "review-custom-gates-state-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @enum {string} + */ + state: "approved" | "rejected"; + /** @description Optional comment to include with the review. */ + comment?: string; + }; /** * @description The type of reviewer. * @example User @@ -18343,7 +18460,18 @@ export interface components { */ state?: "configured" | "not-configured"; /** @description Languages to be analysed. */ - languages?: ("go" | "javascript" | "python" | "ruby" | "typescript")[]; + languages?: ( + | "c" + | "cpp" + | "csharp" + | "go" + | "java" + | "javascript" + | "kotlin" + | "python" + | "ruby" + | "typescript" + )[]; /** * @description CodeQL query suite to be used. * @enum {string} @@ -19825,6 +19953,54 @@ export interface components { */ name: string; }; + /** + * Custom deployment protection rule app + * @description A GitHub App that is providing a custom deployment protection rule. + */ + "custom-deployment-rule-app": { + /** + * @description The unique identifier of the deployment protection rule integration. + * @example 3515 + */ + id: number; + /** + * @description The slugified name of the deployment protection rule integration. + * @example my-custom-app + */ + slug: string; + /** + * @description The URL for the endpoint to get details about the app. + * @example https://api.github.com/apps/custom-app-slug + */ + integration_url: string; + /** + * @description The node ID for the deployment protection rule integration. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + }; + /** + * Deployment protection rule + * @description Deployment protection rule + */ + "deployment-protection-rule": { + /** + * @description The unique identifier for the deployment protection rule. + * @example 3515 + */ + id: number; + /** + * @description The node ID for the deployment protection rule. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + /** + * @description Whether the deployment protection rule is enabled for the environment. + * @example true + */ + enabled: boolean; + app: components["schemas"]["custom-deployment-rule-app"]; + }; /** * Short Blob * @description Short Blob @@ -22654,6 +22830,38 @@ export interface components { /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ cvss_vector_string?: string | null; }; + "private-vulnerability-report-create": { + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory impacts. */ + description: string; + /** @description An array of products affected by the vulnerability detailed in a repository security advisory. */ + vulnerabilities?: + | { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["repository-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name?: string | null; + }; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range?: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions?: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions?: string[] | null; + }[] + | null; + /** @description A list of Common Weakness Enumeration (CWE) IDs. */ + cwe_ids?: string[] | null; + /** + * @description The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + * @enum {string|null} + */ + severity?: "critical" | "high" | "medium" | "low" | null; + /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ + cvss_vector_string?: string | null; + }; "repository-advisory-update": { /** @description A short summary of the advisory. */ summary?: string; @@ -23728,7 +23936,7 @@ export interface components { ref?: string; }; /** - * @description The Azure region where this codespace is located. + * @description The initally assigned location of a new codespace. * @example WestUs2 * @enum {string} */ @@ -27198,6 +27406,26 @@ export interface components { workflow_url?: string; } | null; }; + /** deployment protection rule requested event */ + "webhook-deployment-protection-rule-requested": { + /** @enum {string} */ + action?: "requested"; + /** @description The name of the environment that has the deployment protection rule. */ + environment?: string; + /** @description The event that triggered the deployment protection rule. */ + event?: string; + /** + * Format: uri + * @description The URL to review the deployment protection rule. + */ + deployment_callback_url?: string; + deployment?: components["schemas"]["deployment"]; + pull_requests?: components["schemas"]["pull-request"][]; + repository?: components["schemas"]["repository"]; + organization?: components["schemas"]["organization-simple"]; + installation?: components["schemas"]["simple-installation"]; + sender?: components["schemas"]["simple-user"]; + }; /** deployment_status created event */ "webhook-deployment-status-created": { /** @enum {string} */ @@ -43551,6 +43779,25 @@ export interface components { repository?: components["schemas"]["repository"]; sender: components["schemas"]["simple-user"]; }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string | undefined; + }; + repo?: string; + dependencies?: { + [key: string]: string | undefined; + }[]; + commit_oid?: string; + }; /** package published event */ "webhook-package-published": { /** @enum {string} */ @@ -43656,7 +43903,9 @@ export interface components { } | null; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; @@ -43792,7 +44041,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; source_url?: string; summary: string; tag_name?: string; @@ -43912,14 +44161,18 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type: string; @@ -43988,7 +44241,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; /** Format: uri */ source_url?: string; summary: string; @@ -76949,7 +77202,9 @@ export interface components { }; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; html_url: string; id: number; @@ -77064,7 +77319,7 @@ export interface components { target_commitish?: string; url?: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish?: string; @@ -77143,13 +77398,17 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: (Record | null)[]; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; draft?: boolean; html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type?: string; @@ -77198,7 +77457,7 @@ export interface components { target_commitish: string; url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish: string; @@ -84780,6 +85039,8 @@ export interface components { "environment-name": string; /** @description The unique identifier of the branch policy. */ "branch-policy-id": number; + /** @description The unique identifier of the protection rule. */ + "protection-rule-id": number; /** @description A user ID. Only return users with an ID greater than this ID. */ "since-user": number; /** @description The number that identifies the issue. */ @@ -97192,6 +97453,35 @@ export interface operations { 409: components["responses"]["conflict"]; }; }; + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **Note:** GitHub Apps can only review their own custom deployment protection rules. + * To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + * + * GitHub Apps must have read and write permission for **Deployments** to use this endpoint. + */ + "actions/review-custom-gates-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody: { + content: { + "application/json": + | components["schemas"]["review-custom-gates-comment-required"] + | components["schemas"]["review-custom-gates-state-required"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; /** * List jobs for a workflow run * @description 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/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#parameters). @@ -100290,7 +100580,7 @@ export interface operations { "application/json": { /** @description Git ref (typically a branch name) for this codespace */ ref?: string; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -102782,7 +103072,153 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * Get all deployment protection rules for an environment + * @description Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + "repos/get-all-deployment-protection-rules": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description List of deployment protection rules */ + 200: { + content: { + "application/json": { + /** + * @description The number of enabled custom deployment protection rules for this environment + * @example 10 + */ + total_count?: number; + custom_deployment_protection_rules?: components["schemas"]["deployment-protection-rule"][]; + }; + }; + }; + }; + }; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + "repos/create-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The ID of the custom app that will be enabled on the environment. */ + integration_id?: number; + }; + }; + }; + responses: { + /** @description The enabled custom deployment protection rule */ + 201: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * List custom deployment rule integrations available for an environment + * @description Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. + * + * For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)". + */ + "repos/list-custom-deployment-rule-integrations": { + parameters: { + query: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description A list of custom deployment rule integrations available for this environment. */ + 200: { + content: { + "application/json": { + /** + * @description The total number of custom deployment protection rule integrations available for this environment. + * @example 35 + */ + total_count?: number; + available_custom_deployment_protection_rule_integrations?: components["schemas"]["custom-deployment-rule-app"][]; + }; + }; + }; + }; + }; + /** + * Get a custom deployment protection rule + * @description Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + */ + "repos/get-custom-deployment-protection-rule": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Get an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)". + */ + "repos/disable-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { @@ -103805,6 +104241,10 @@ export interface operations { * Get an import status * @description View the progress of an import. * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + * * **Import status** * * This section includes details about the possible values of the `status` field of the Import Progress response. @@ -103859,6 +104299,7 @@ export interface operations { /** * Start an import * @description Start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer. Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response. + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/start-import": { parameters: { @@ -103905,6 +104346,10 @@ export interface operations { /** * Cancel an import * @description Stop an import for a repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/cancel-import": { parameters: { @@ -103927,6 +104372,10 @@ export interface operations { * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will * have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/update-import": { parameters: { @@ -103971,6 +104420,10 @@ export interface operations { * @description 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 Enterprise Cloud 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 `. * * This endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/get-commit-authors": { parameters: { @@ -103995,7 +104448,12 @@ export interface operations { }; /** * Map a commit author - * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/map-commit-author": { parameters: { @@ -104030,6 +104488,10 @@ export interface operations { /** * Get large files * @description List files larger than 100MB found during the import + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/get-large-files": { parameters: { @@ -104050,7 +104512,15 @@ export interface operations { }; /** * Update Git LFS preference - * @description 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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files). + * @description 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.com). + * + * You can learn more about our LFS feature and working with large files [on our help + * site](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files). + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/set-lfs-preference": { parameters: { @@ -106630,7 +107100,7 @@ export interface operations { requestBody: { content: { "application/json": { - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -108302,6 +108772,35 @@ export interface operations { 422: components["responses"]["validation_failed"]; }; }; + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + "security-advisories/create-private-vulnerability-report": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["private-vulnerability-report-create"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; /** * Get a repository security advisory * @description Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. @@ -109809,9 +110308,7 @@ export interface operations { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ "search/code": { parameters: { @@ -109820,12 +110317,12 @@ export interface operations { q: string; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Cloud search infrastructure. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/reference/search#ranking-search-results) + * @description **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Cloud search infrastructure. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/reference/search#ranking-search-results) */ sort?: "indexed"; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. + * @description **This field is deprecated.** 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`. */ order?: "desc" | "asc"; per_page?: components["parameters"]["per-page"]; @@ -111455,7 +111952,7 @@ export interface operations { repository_id: number; /** @description Git ref (typically a branch name) for this codespace */ ref?: string; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -111482,7 +111979,7 @@ export interface operations { /** @description Repository id for this codespace */ repository_id: number; }; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description Machine type to use for this codespace */ machine?: string; diff --git a/packages/openapi-types-ghes-3.5/package.json b/packages/openapi-types-ghes-3.5/package.json index 20f9987b0..dee587700 100644 --- a/packages/openapi-types-ghes-3.5/package.json +++ b/packages/openapi-types-ghes-3.5/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-ghes-3.5/types.d.ts b/packages/openapi-types-ghes-3.5/types.d.ts index 147606bf4..1114d65e1 100644 --- a/packages/openapi-types-ghes-3.5/types.d.ts +++ b/packages/openapi-types-ghes-3.5/types.d.ts @@ -4281,7 +4281,10 @@ export interface paths { delete: operations["repos/delete-deployment-branch-policy"]; }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -33344,7 +33347,10 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { diff --git a/packages/openapi-types-ghes-3.6/package.json b/packages/openapi-types-ghes-3.6/package.json index ef476e967..aa5bf9373 100644 --- a/packages/openapi-types-ghes-3.6/package.json +++ b/packages/openapi-types-ghes-3.6/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-ghes-3.6/types.d.ts b/packages/openapi-types-ghes-3.6/types.d.ts index a2cde13f6..5ef16cf3f 100644 --- a/packages/openapi-types-ghes-3.6/types.d.ts +++ b/packages/openapi-types-ghes-3.6/types.d.ts @@ -4376,7 +4376,10 @@ export interface paths { delete: operations["repos/delete-deployment-branch-policy"]; }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -34689,7 +34692,10 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { diff --git a/packages/openapi-types-ghes-3.7/package.json b/packages/openapi-types-ghes-3.7/package.json index 891466067..35b0fb9e9 100644 --- a/packages/openapi-types-ghes-3.7/package.json +++ b/packages/openapi-types-ghes-3.7/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-ghes-3.7/types.d.ts b/packages/openapi-types-ghes-3.7/types.d.ts index e8ef2e7e3..661c91164 100644 --- a/packages/openapi-types-ghes-3.7/types.d.ts +++ b/packages/openapi-types-ghes-3.7/types.d.ts @@ -4501,7 +4501,10 @@ export interface paths { delete: operations["repos/delete-deployment-branch-policy"]; }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -39129,6 +39132,25 @@ export interface components { repository?: components["schemas"]["repository"]; sender: components["schemas"]["simple-user"]; }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string | undefined; + }; + repo?: string; + dependencies?: { + [key: string]: string | undefined; + }[]; + commit_oid?: string; + }; /** package published event */ "webhook-package-published": { /** @enum {string} */ @@ -39234,7 +39256,9 @@ export interface components { } | null; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; @@ -39370,7 +39394,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; source_url?: string; summary: string; tag_name?: string; @@ -39490,14 +39514,18 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type: string; @@ -39566,7 +39594,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; /** Format: uri */ source_url?: string; summary: string; @@ -70006,7 +70034,9 @@ export interface components { }; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; html_url: string; id: number; @@ -70121,7 +70151,7 @@ export interface components { target_commitish?: string; url?: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish?: string; @@ -70200,13 +70230,17 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: (Record | null)[]; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; draft?: boolean; html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type?: string; @@ -70255,7 +70289,7 @@ export interface components { target_commitish: string; url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish: string; @@ -92777,7 +92811,10 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { diff --git a/packages/openapi-types-ghes-3.8/package.json b/packages/openapi-types-ghes-3.8/package.json index 22bae3b3d..394095294 100644 --- a/packages/openapi-types-ghes-3.8/package.json +++ b/packages/openapi-types-ghes-3.8/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-ghes-3.8/types.d.ts b/packages/openapi-types-ghes-3.8/types.d.ts index 1f680965e..c2aac3221 100644 --- a/packages/openapi-types-ghes-3.8/types.d.ts +++ b/packages/openapi-types-ghes-3.8/types.d.ts @@ -4800,7 +4800,10 @@ export interface paths { delete: operations["repos/delete-deployment-branch-policy"]; }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -7901,6 +7904,13 @@ export interface paths { */ post: operations["actions/approve-workflow-run"]; }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + /** + * Review custom deployment protection rules for a workflow run + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + post: operations["actions/review-custom-gates-for-run"]; + }; "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { /** * Get workflow run usage @@ -8031,6 +8041,37 @@ export interface paths { */ get: operations["dependency-graph/export-sbom"]; }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + /** + * Get all deployment protection rules for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + get: operations["repos/get-all-deployment-protection-rules"]; + /** + * Create a custom deployment protection rule on an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + post: operations["repos/create-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + /** + * List custom deployment rule integrations available for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + get: operations["repos/list-custom-deployment-rule-integrations"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + /** + * Get a custom deployment protection rule + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + get: operations["repos/get-custom-deployment-protection-rule"]; + /** + * Disable a custom protection rule for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + delete: operations["repos/disable-deployment-protection-rule"]; + }; "/repos/{owner}/{repo}/import": { /** * Get an import status @@ -8160,6 +8201,13 @@ export interface paths { */ post: operations["security-advisories/create-repository-advisory"]; }; + "/repos/{owner}/{repo}/security-advisories/reports": { + /** + * Privately report a security vulnerability + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + post: operations["security-advisories/create-private-vulnerability-report"]; + }; "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { /** * Get a repository security advisory @@ -40632,6 +40680,25 @@ export interface components { repository?: components["schemas"]["repository"]; sender: components["schemas"]["simple-user"]; }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string | undefined; + }; + repo?: string; + dependencies?: { + [key: string]: string | undefined; + }[]; + commit_oid?: string; + }; /** package published event */ "webhook-package-published": { /** @enum {string} */ @@ -40737,7 +40804,9 @@ export interface components { } | null; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; @@ -40873,7 +40942,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; source_url?: string; summary: string; tag_name?: string; @@ -40993,14 +41062,18 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type: string; @@ -41069,7 +41142,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; /** Format: uri */ source_url?: string; summary: string; @@ -71509,7 +71582,9 @@ export interface components { }; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; html_url: string; id: number; @@ -71624,7 +71699,7 @@ export interface components { target_commitish?: string; url?: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish?: string; @@ -71703,13 +71778,17 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: (Record | null)[]; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; draft?: boolean; html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type?: string; @@ -71758,7 +71837,7 @@ export interface components { target_commitish: string; url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish: string; @@ -95516,7 +95595,10 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { @@ -106157,6 +106239,16 @@ export interface operations { 501: never; }; }; + /** + * Review custom deployment protection rules for a workflow run + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "actions/review-custom-gates-for-run": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get workflow run usage * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com @@ -106357,6 +106449,56 @@ export interface operations { 501: never; }; }; + /** + * Get all deployment protection rules for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "repos/get-all-deployment-protection-rules": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Create a custom deployment protection rule on an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "repos/create-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * List custom deployment rule integrations available for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "repos/list-custom-deployment-rule-integrations": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Get a custom deployment protection rule + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "repos/get-custom-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Disable a custom protection rule for an environment + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "repos/disable-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get an import status * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com @@ -106567,6 +106709,16 @@ export interface operations { 501: never; }; }; + /** + * Privately report a security vulnerability + * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com + */ + "security-advisories/create-private-vulnerability-report": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get a repository security advisory * @description This endpoint does not exist in GitHub Enterprise Server 3.8. It was added in api.github.com diff --git a/packages/openapi-types-github.ae/package.json b/packages/openapi-types-github.ae/package.json index added5f47..b2d63d828 100644 --- a/packages/openapi-types-github.ae/package.json +++ b/packages/openapi-types-github.ae/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types-github.ae/types.d.ts b/packages/openapi-types-github.ae/types.d.ts index 261e1d720..c84149cc2 100644 --- a/packages/openapi-types-github.ae/types.d.ts +++ b/packages/openapi-types-github.ae/types.d.ts @@ -3484,7 +3484,10 @@ export interface paths { delete: operations["repos/delete-deployment-branch-policy"]; }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -4715,9 +4718,7 @@ export interface paths { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ get: operations["search/code"]; }; @@ -6451,6 +6452,13 @@ export interface paths { */ post: operations["actions/approve-workflow-run"]; }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + /** + * Review custom deployment protection rules for a workflow run + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + post: operations["actions/review-custom-gates-for-run"]; + }; "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { /** * Get pending deployments for a workflow run @@ -6686,6 +6694,37 @@ export interface paths { */ post: operations["dependency-graph/create-repository-snapshot"]; }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + /** + * Get all deployment protection rules for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + get: operations["repos/get-all-deployment-protection-rules"]; + /** + * Create a custom deployment protection rule on an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + post: operations["repos/create-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + /** + * List custom deployment rule integrations available for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + get: operations["repos/list-custom-deployment-rule-integrations"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + /** + * Get a custom deployment protection rule + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + get: operations["repos/get-custom-deployment-protection-rule"]; + /** + * Disable a custom protection rule for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + delete: operations["repos/disable-deployment-protection-rule"]; + }; "/repos/{owner}/{repo}/import": { /** * Get an import status @@ -6829,6 +6868,13 @@ export interface paths { */ post: operations["security-advisories/create-repository-advisory"]; }; + "/repos/{owner}/{repo}/security-advisories/reports": { + /** + * Privately report a security vulnerability + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + post: operations["security-advisories/create-private-vulnerability-report"]; + }; "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { /** * Get a repository security advisory @@ -22126,6 +22172,26 @@ export interface components { workflow_url?: string; } | null; }; + /** deployment protection rule requested event */ + "webhook-deployment-protection-rule-requested": { + /** @enum {string} */ + action?: "requested"; + /** @description The name of the environment that has the deployment protection rule. */ + environment?: string; + /** @description The event that triggered the deployment protection rule. */ + event?: string; + /** + * Format: uri + * @description The URL to review the deployment protection rule. + */ + deployment_callback_url?: string; + deployment?: components["schemas"]["deployment"]; + pull_requests?: components["schemas"]["pull-request"][]; + repository?: components["schemas"]["repository"]; + organization?: components["schemas"]["organization-simple"]; + installation?: components["schemas"]["simple-installation"]; + sender?: components["schemas"]["simple-user"]; + }; /** deployment_status created event */ "webhook-deployment-status-created": { /** @enum {string} */ @@ -37889,6 +37955,25 @@ export interface components { repository?: components["schemas"]["repository"]; sender: components["schemas"]["simple-user"]; }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string | undefined; + }; + repo?: string; + dependencies?: { + [key: string]: string | undefined; + }[]; + commit_oid?: string; + }; /** package published event */ "webhook-package-published": { /** @enum {string} */ @@ -37994,7 +38079,9 @@ export interface components { } | null; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; @@ -38130,7 +38217,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; source_url?: string; summary: string; tag_name?: string; @@ -38250,14 +38337,18 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type: string; @@ -38326,7 +38417,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; /** Format: uri */ source_url?: string; summary: string; @@ -68717,7 +68808,9 @@ export interface components { }; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; html_url: string; id: number; @@ -68832,7 +68925,7 @@ export interface components { target_commitish?: string; url?: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish?: string; @@ -68911,13 +69004,17 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: (Record | null)[]; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; draft?: boolean; html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type?: string; @@ -68966,7 +69063,7 @@ export interface components { target_commitish: string; url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish: string; @@ -87916,7 +88013,10 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { @@ -93135,9 +93235,7 @@ export interface operations { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ "search/code": { parameters: { @@ -93146,12 +93244,12 @@ export interface operations { q: string; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub AE search infrastructure. Default: [best match](https://docs.github.com/github-ae@latest/rest/reference/search#ranking-search-results) + * @description **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub AE search infrastructure. Default: [best match](https://docs.github.com/github-ae@latest/rest/reference/search#ranking-search-results) */ sort?: "indexed"; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. + * @description **This field is deprecated.** 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`. */ order?: "desc" | "asc"; per_page?: components["parameters"]["per-page"]; @@ -97482,6 +97580,16 @@ export interface operations { 501: never; }; }; + /** + * Review custom deployment protection rules for a workflow run + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "actions/review-custom-gates-for-run": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get pending deployments for a workflow run * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. @@ -97852,6 +97960,56 @@ export interface operations { 501: never; }; }; + /** + * Get all deployment protection rules for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "repos/get-all-deployment-protection-rules": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Create a custom deployment protection rule on an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "repos/create-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * List custom deployment rule integrations available for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "repos/list-custom-deployment-rule-integrations": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Get a custom deployment protection rule + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "repos/get-custom-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; + /** + * Disable a custom protection rule for an environment + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "repos/disable-deployment-protection-rule": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get an import status * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. @@ -98082,6 +98240,16 @@ export interface operations { 501: never; }; }; + /** + * Privately report a security vulnerability + * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. + */ + "security-advisories/create-private-vulnerability-report": { + responses: { + /** @description Not Implemented */ + 501: never; + }; + }; /** * Get a repository security advisory * @description This endpoint is currently not supported by GitHub AE. It only exists in api.github.com right now. diff --git a/packages/openapi-types/package.json b/packages/openapi-types/package.json index 5a64f8826..b3f9a0cf1 100644 --- a/packages/openapi-types/package.json +++ b/packages/openapi-types/package.json @@ -15,6 +15,6 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "11.0.0" + "openapi-version": "11.1.0" } } diff --git a/packages/openapi-types/types.d.ts b/packages/openapi-types/types.d.ts index f5a1fb096..061cbb01f 100644 --- a/packages/openapi-types/types.d.ts +++ b/packages/openapi-types/types.d.ts @@ -2868,6 +2868,18 @@ export interface paths { */ post: operations["actions/cancel-workflow-run"]; }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **Note:** GitHub Apps can only review their own custom deployment protection rules. + * To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + * + * GitHub Apps must have read and write permission for **Deployments** to use this endpoint. + */ + post: operations["actions/review-custom-gates-for-run"]; + }; "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { /** * List jobs for a workflow run @@ -4694,8 +4706,56 @@ export interface paths { */ delete: operations["repos/delete-deployment-branch-policy"]; }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + /** + * Get all deployment protection rules for an environment + * @description Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + */ + get: operations["repos/get-all-deployment-protection-rules"]; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + */ + post: operations["repos/create-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + /** + * List custom deployment rule integrations available for an environment + * @description Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. + * + * For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/rest/apps/apps#get-an-app)". + */ + get: operations["repos/list-custom-deployment-rule-integrations"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + /** + * Get a custom deployment protection rule + * @description Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/rest/apps/apps#get-an-app). + */ + get: operations["repos/get-custom-deployment-protection-rule"]; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Get an app](https://docs.github.com/rest/apps/apps#get-an-app)". + */ + delete: operations["repos/disable-deployment-protection-rule"]; + }; "/repos/{owner}/{repo}/events": { - /** List repository events */ + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ get: operations["activity/list-repo-events"]; }; "/repos/{owner}/{repo}/forks": { @@ -5009,6 +5069,10 @@ export interface paths { * Get an import status * @description View the progress of an import. * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + * * **Import status** * * This section includes details about the possible values of the `status` field of the Import Progress response. @@ -5046,11 +5110,16 @@ export interface paths { /** * Start an import * @description Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response. + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ put: operations["migrations/start-import"]; /** * Cancel an import * @description Stop an import for a repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ delete: operations["migrations/cancel-import"]; /** @@ -5061,6 +5130,10 @@ export interface paths { * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will * have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/update-import"]; }; @@ -5070,13 +5143,22 @@ export interface paths { * @description 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 `. * * This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ get: operations["migrations/get-commit-authors"]; }; "/repos/{owner}/{repo}/import/authors/{author_id}": { /** * Map a commit author - * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/map-commit-author"]; }; @@ -5084,13 +5166,25 @@ export interface paths { /** * Get large files * @description List files larger than 100MB found during the import + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ get: operations["migrations/get-large-files"]; }; "/repos/{owner}/{repo}/import/lfs": { /** * Update Git LFS preference - * @description 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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/repositories/working-with-files/managing-large-files). + * @description 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.com). + * + * You can learn more about our LFS feature and working with large files [on our help + * site](https://docs.github.com/repositories/working-with-files/managing-large-files). + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ patch: operations["migrations/set-lfs-preference"]; }; @@ -5968,6 +6062,14 @@ export interface paths { */ post: operations["security-advisories/create-repository-advisory"]; }; + "/repos/{owner}/{repo}/security-advisories/reports": { + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + post: operations["security-advisories/create-private-vulnerability-report"]; + }; "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { /** * Get a repository security advisory @@ -6378,9 +6480,7 @@ export interface paths { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ get: operations["search/code"]; }; @@ -12092,7 +12192,7 @@ export interface components { ref?: string; }; /** - * @description The Azure region where this codespace is located. + * @description The initally assigned location of a new codespace. * @example WestUs2 * @enum {string} */ @@ -15635,6 +15735,23 @@ export interface components { */ comment: string; }; + "review-custom-gates-comment-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** @description Comment associated with the pending deployment protection rule. **Required when state is not provided.** */ + comment: string; + }; + "review-custom-gates-state-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @enum {string} + */ + state: "approved" | "rejected"; + /** @description Optional comment to include with the review. */ + comment?: string; + }; /** * @description The type of reviewer. * @example User @@ -16778,7 +16895,18 @@ export interface components { */ state?: "configured" | "not-configured"; /** @description Languages to be analysed. */ - languages?: ("go" | "javascript" | "python" | "ruby" | "typescript")[]; + languages?: ( + | "c" + | "cpp" + | "csharp" + | "go" + | "java" + | "javascript" + | "kotlin" + | "python" + | "ruby" + | "typescript" + )[]; /** * @description CodeQL query suite to be used. * @enum {string} @@ -18260,6 +18388,54 @@ export interface components { */ name: string; }; + /** + * Custom deployment protection rule app + * @description A GitHub App that is providing a custom deployment protection rule. + */ + "custom-deployment-rule-app": { + /** + * @description The unique identifier of the deployment protection rule integration. + * @example 3515 + */ + id: number; + /** + * @description The slugified name of the deployment protection rule integration. + * @example my-custom-app + */ + slug: string; + /** + * @description The URL for the endpoint to get details about the app. + * @example https://api.github.com/apps/custom-app-slug + */ + integration_url: string; + /** + * @description The node ID for the deployment protection rule integration. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + }; + /** + * Deployment protection rule + * @description Deployment protection rule + */ + "deployment-protection-rule": { + /** + * @description The unique identifier for the deployment protection rule. + * @example 3515 + */ + id: number; + /** + * @description The node ID for the deployment protection rule. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + /** + * @description Whether the deployment protection rule is enabled for the environment. + * @example true + */ + enabled: boolean; + app: components["schemas"]["custom-deployment-rule-app"]; + }; /** * Short Blob * @description Short Blob @@ -21089,6 +21265,38 @@ export interface components { /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ cvss_vector_string?: string | null; }; + "private-vulnerability-report-create": { + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory impacts. */ + description: string; + /** @description An array of products affected by the vulnerability detailed in a repository security advisory. */ + vulnerabilities?: + | { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["repository-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name?: string | null; + }; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range?: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions?: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions?: string[] | null; + }[] + | null; + /** @description A list of Common Weakness Enumeration (CWE) IDs. */ + cwe_ids?: string[] | null; + /** + * @description The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + * @enum {string|null} + */ + severity?: "critical" | "high" | "medium" | "low" | null; + /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ + cvss_vector_string?: string | null; + }; "repository-advisory-update": { /** @description A short summary of the advisory. */ summary?: string; @@ -22037,7 +22245,7 @@ export interface components { ref?: string; }; /** - * @description The Azure region where this codespace is located. + * @description The initally assigned location of a new codespace. * @example WestUs2 * @enum {string} */ @@ -25507,6 +25715,26 @@ export interface components { workflow_url?: string; } | null; }; + /** deployment protection rule requested event */ + "webhook-deployment-protection-rule-requested": { + /** @enum {string} */ + action?: "requested"; + /** @description The name of the environment that has the deployment protection rule. */ + environment?: string; + /** @description The event that triggered the deployment protection rule. */ + event?: string; + /** + * Format: uri + * @description The URL to review the deployment protection rule. + */ + deployment_callback_url?: string; + deployment?: components["schemas"]["deployment"]; + pull_requests?: components["schemas"]["pull-request"][]; + repository?: components["schemas"]["repository"]; + organization?: components["schemas"]["organization-simple"]; + installation?: components["schemas"]["simple-installation"]; + sender?: components["schemas"]["simple-user"]; + }; /** deployment_status created event */ "webhook-deployment-status-created": { /** @enum {string} */ @@ -41860,6 +42088,25 @@ export interface components { repository?: components["schemas"]["repository"]; sender: components["schemas"]["simple-user"]; }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string | undefined; + }; + repo?: string; + dependencies?: { + [key: string]: string | undefined; + }[]; + commit_oid?: string; + }; /** package published event */ "webhook-package-published": { /** @enum {string} */ @@ -41965,7 +42212,9 @@ export interface components { } | null; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; @@ -42101,7 +42350,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; source_url?: string; summary: string; tag_name?: string; @@ -42221,14 +42470,18 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; /** Format: uri */ html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type: string; @@ -42297,7 +42550,7 @@ export interface components { /** Format: uri */ url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; /** Format: uri */ source_url?: string; summary: string; @@ -75258,7 +75511,9 @@ export interface components { }; created_at?: string; description: string; - docker_metadata?: Record[]; + docker_metadata?: { + tags?: string[]; + }[]; draft?: boolean; html_url: string; id: number; @@ -75373,7 +75628,7 @@ export interface components { target_commitish?: string; url?: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish?: string; @@ -75452,13 +75707,17 @@ export interface components { body_html: string; created_at: string; description: string; - docker_metadata?: (Record | null)[]; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; draft?: boolean; html_url: string; id: number; installation_command: string; manifest?: string; - metadata: Record[]; + metadata: { + [key: string]: unknown | undefined; + }[]; name: string; package_files: { content_type?: string; @@ -75507,7 +75766,7 @@ export interface components { target_commitish: string; url: string; }; - rubygems_metadata?: Record[]; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; summary: string; tag_name?: string; target_commitish: string; @@ -82996,6 +83255,8 @@ export interface components { "environment-name": string; /** @description The unique identifier of the branch policy. */ "branch-policy-id": number; + /** @description The unique identifier of the protection rule. */ + "protection-rule-id": number; /** @description A user ID. Only return users with an ID greater than this ID. */ "since-user": number; /** @description The number that identifies the issue. */ @@ -93035,6 +93296,35 @@ export interface operations { 409: components["responses"]["conflict"]; }; }; + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **Note:** GitHub Apps can only review their own custom deployment protection rules. + * To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + * + * GitHub Apps must have read and write permission for **Deployments** to use this endpoint. + */ + "actions/review-custom-gates-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody: { + content: { + "application/json": + | components["schemas"]["review-custom-gates-comment-required"] + | components["schemas"]["review-custom-gates-state-required"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; /** * List jobs for a workflow run * @description 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). @@ -96131,7 +96421,7 @@ export interface operations { "application/json": { /** @description Git ref (typically a branch name) for this codespace */ ref?: string; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -98623,7 +98913,153 @@ export interface operations { 204: never; }; }; - /** List repository events */ + /** + * Get all deployment protection rules for an environment + * @description Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + */ + "repos/get-all-deployment-protection-rules": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description List of deployment protection rules */ + 200: { + content: { + "application/json": { + /** + * @description The number of enabled custom deployment protection rules for this environment + * @example 10 + */ + total_count?: number; + custom_deployment_protection_rules?: components["schemas"]["deployment-protection-rule"][]; + }; + }; + }; + }; + }; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. + * + * For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + */ + "repos/create-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The ID of the custom app that will be enabled on the environment. */ + integration_id?: number; + }; + }; + }; + responses: { + /** @description The enabled custom deployment protection rule */ + 201: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * List custom deployment rule integrations available for an environment + * @description Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. + * + * For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/rest/apps/apps#get-an-app)". + */ + "repos/list-custom-deployment-rule-integrations": { + parameters: { + query: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description A list of custom deployment rule integrations available for this environment. */ + 200: { + content: { + "application/json": { + /** + * @description The total number of custom deployment protection rule integrations available for this environment. + * @example 35 + */ + total_count?: number; + available_custom_deployment_protection_rule_integrations?: components["schemas"]["custom-deployment-rule-app"][]; + }; + }; + }; + }; + }; + /** + * Get a custom deployment protection rule + * @description Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/rest/apps/apps#get-an-app). + */ + "repos/get-custom-deployment-protection-rule": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Get an app](https://docs.github.com/rest/apps/apps#get-an-app)". + */ + "repos/disable-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 204: never; + }; + }; + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ "activity/list-repo-events": { parameters: { query: { @@ -99646,6 +100082,10 @@ export interface operations { * Get an import status * @description View the progress of an import. * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + * * **Import status** * * This section includes details about the possible values of the `status` field of the Import Progress response. @@ -99700,6 +100140,7 @@ export interface operations { /** * Start an import * @description Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response. + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/start-import": { parameters: { @@ -99746,6 +100187,10 @@ export interface operations { /** * Cancel an import * @description Stop an import for a repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/cancel-import": { parameters: { @@ -99768,6 +100213,10 @@ export interface operations { * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will * have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. * You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/update-import": { parameters: { @@ -99812,6 +100261,10 @@ export interface operations { * @description 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 `. * * This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/get-commit-authors": { parameters: { @@ -99836,7 +100289,12 @@ export interface operations { }; /** * Map a commit author - * @description Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/map-commit-author": { parameters: { @@ -99871,6 +100329,10 @@ export interface operations { /** * Get large files * @description List files larger than 100MB found during the import + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/get-large-files": { parameters: { @@ -99891,7 +100353,15 @@ export interface operations { }; /** * Update Git LFS preference - * @description 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.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/repositories/working-with-files/managing-large-files). + * @description 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.com). + * + * You can learn more about our LFS feature and working with large files [on our help + * site](https://docs.github.com/repositories/working-with-files/managing-large-files). + * + * **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end + * on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update + * these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. */ "migrations/set-lfs-preference": { parameters: { @@ -102469,7 +102939,7 @@ export interface operations { requestBody: { content: { "application/json": { - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -104141,6 +104611,35 @@ export interface operations { 422: components["responses"]["validation_failed"]; }; }; + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + "security-advisories/create-private-vulnerability-report": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["private-vulnerability-report-create"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; /** * Get a repository security advisory * @description Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. @@ -105323,9 +105822,7 @@ export interface operations { * * 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 * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. * - * **Note:** Starting on April 10, 2023, code search on GitHub.com will have a separate - * rate limit from other search types, of 10 requests per minute, and all code - * search requests will require authentication. For more information, see [this blog post](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api/). + * This endpoint requires you to authenticate and limits you to 10 requests per minute. */ "search/code": { parameters: { @@ -105334,12 +105831,12 @@ export interface operations { q: string; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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) + * @description **This field is deprecated.** 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) */ sort?: "indexed"; /** * @deprecated - * @description **Note: This field is deprecated, and will be ignored after April 10, 2023 (except on GitHub Enterprise Server).** 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`. + * @description **This field is deprecated.** 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`. */ order?: "desc" | "asc"; per_page?: components["parameters"]["per-page"]; @@ -106894,7 +107391,7 @@ export interface operations { repository_id: number; /** @description Git ref (typically a branch name) for this codespace */ ref?: string; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description IP for location auto-detection when proxying a request */ client_ip?: string; @@ -106921,7 +107418,7 @@ export interface operations { /** @description Repository id for this codespace */ repository_id: number; }; - /** @description Location for this codespace. Assigned by IP if not provided */ + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ location?: string; /** @description Machine type to use for this codespace */ machine?: string;