From da450cbd9eb468a33739a1ced0c78eca7b73dfeb Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 28 Jul 2022 07:58:06 -0700 Subject: [PATCH] feat: add support for pagination in new `GET /enterprises/{enterprise}/code-scanning/alerts` API (#421) feat: add support for pagination for code scanning alerts --- package-lock.json | 30 +++++++-------- package.json | 2 +- .../update-endpoints/generated/endpoints.json | 37 +++++++++++++++++++ src/generated/paginating-endpoints.ts | 9 +++++ 4 files changed, 62 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index d11099bc..bce0a937 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^6.41.0" }, "devDependencies": { "@octokit/core": "^4.0.0", @@ -2618,9 +2618,9 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "12.10.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.10.1.tgz", - "integrity": "sha512-P+SukKanjFY0ZhsK6wSVnQmxTP2eVPPE8OPSNuxaMYtgVzwJZgfGdwlYjf4RlRU4vLEw4ts2fsE2icG4nZ5ddQ==" + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, "node_modules/@octokit/plugin-rest-endpoint-methods": { "version": "6.1.2", @@ -2670,11 +2670,11 @@ } }, "node_modules/@octokit/types": { - "version": "6.40.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.40.0.tgz", - "integrity": "sha512-MFZOU5r8SwgJWDMhrLUSvyJPtVsqA6VnbVI3TNbsmw+Jnvrktzvq2fYES/6RiJA/5Ykdwq4mJmtlYUfW7CGjmw==", + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "dependencies": { - "@octokit/openapi-types": "^12.10.0" + "@octokit/openapi-types": "^12.11.0" } }, "node_modules/@pika/babel-plugin-esm-import-rewrite": { @@ -11020,9 +11020,9 @@ } }, "@octokit/openapi-types": { - "version": "12.10.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.10.1.tgz", - "integrity": "sha512-P+SukKanjFY0ZhsK6wSVnQmxTP2eVPPE8OPSNuxaMYtgVzwJZgfGdwlYjf4RlRU4vLEw4ts2fsE2icG4nZ5ddQ==" + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, "@octokit/plugin-rest-endpoint-methods": { "version": "6.1.2", @@ -11060,11 +11060,11 @@ } }, "@octokit/types": { - "version": "6.40.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.40.0.tgz", - "integrity": "sha512-MFZOU5r8SwgJWDMhrLUSvyJPtVsqA6VnbVI3TNbsmw+Jnvrktzvq2fYES/6RiJA/5Ykdwq4mJmtlYUfW7CGjmw==", + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "requires": { - "@octokit/openapi-types": "^12.10.0" + "@octokit/openapi-types": "^12.11.0" } }, "@pika/babel-plugin-esm-import-rewrite": { diff --git a/package.json b/package.json index 37148a7e..ee20305a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ ], "license": "MIT", "dependencies": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^6.41.0" }, "peerDependencies": { "@octokit/core": ">=4" diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index 6e5e523a..3240fcd8 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -4140,6 +4140,43 @@ { "name": "ref" } ] }, + { + "url": "/enterprises/{enterprise}/code-scanning/alerts", + "id": "list-alerts-for-enterprise", + "scope": "code-scanning", + "documentationUrl": "https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise", + "renamed": null, + "responses": [ + { + "code": 200, + "schema": "{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"number\":{\"type\":\"integer\",\"description\":\"The security alert number.\",\"readOnly\":true},\"created_at\":{\"type\":\"string\",\"description\":\"The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.\",\"format\":\"date-time\",\"readOnly\":true},\"updated_at\":{\"type\":\"string\",\"description\":\"The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.\",\"format\":\"date-time\",\"readOnly\":true},\"url\":{\"type\":\"string\",\"description\":\"The REST API URL of the alert resource.\",\"format\":\"uri\",\"readOnly\":true},\"html_url\":{\"type\":\"string\",\"description\":\"The GitHub URL of the alert resource.\",\"format\":\"uri\",\"readOnly\":true},\"instances_url\":{\"type\":\"string\",\"description\":\"The REST API URL for fetching the list of instances for an alert.\",\"format\":\"uri\",\"readOnly\":true},\"state\":{\"type\":\"string\",\"description\":\"State of a code scanning alert.\",\"enum\":[\"open\",\"closed\",\"dismissed\",\"fixed\"]},\"fixed_at\":{\"type\":\"string\",\"description\":\"The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.\",\"format\":\"date-time\",\"readOnly\":true,\"nullable\":true},\"dismissed_by\":{\"title\":\"Simple User\",\"description\":\"Simple User\",\"type\":\"object\",\"properties\":{\"name\":{\"nullable\":true,\"type\":\"string\"},\"email\":{\"nullable\":true,\"type\":\"string\"},\"login\":{\"type\":\"string\",\"example\":\"octocat\"},\"id\":{\"type\":\"integer\",\"example\":1},\"node_id\":{\"type\":\"string\",\"example\":\"MDQ6VXNlcjE=\"},\"avatar_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/images/error/octocat_happy.gif\"},\"gravatar_id\":{\"type\":\"string\",\"example\":\"41d064eb2195891e12d0413f63227ea7\",\"nullable\":true},\"url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat\"},\"html_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/octocat\"},\"followers_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/followers\"},\"following_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/following{/other_user}\"},\"gists_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/gists{/gist_id}\"},\"starred_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\"},\"subscriptions_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/subscriptions\"},\"organizations_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/orgs\"},\"repos_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/repos\"},\"events_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/events{/privacy}\"},\"received_events_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/received_events\"},\"type\":{\"type\":\"string\",\"example\":\"User\"},\"site_admin\":{\"type\":\"boolean\"},\"starred_at\":{\"type\":\"string\",\"example\":\"\\\"2020-07-09T00:17:55Z\\\"\"}},\"required\":[\"avatar_url\",\"events_url\",\"followers_url\",\"following_url\",\"gists_url\",\"gravatar_id\",\"html_url\",\"id\",\"node_id\",\"login\",\"organizations_url\",\"received_events_url\",\"repos_url\",\"site_admin\",\"starred_url\",\"subscriptions_url\",\"type\",\"url\"],\"nullable\":true},\"dismissed_at\":{\"type\":\"string\",\"description\":\"The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.\",\"format\":\"date-time\",\"readOnly\":true,\"nullable\":true},\"dismissed_reason\":{\"type\":\"string\",\"description\":\"**Required when the state is dismissed.** The reason for dismissing or closing the alert.\",\"nullable\":true,\"enum\":[null,\"false positive\",\"won't fix\",\"used in tests\"]},\"dismissed_comment\":{\"type\":\"string\",\"description\":\"The dismissal comment associated with the dismissal of the alert.\",\"nullable\":true,\"maxLength\":280},\"rule\":{\"type\":\"object\",\"properties\":{\"id\":{\"nullable\":true,\"type\":\"string\",\"description\":\"A unique identifier for the rule used to detect the alert.\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the rule used to detect the alert.\"},\"severity\":{\"nullable\":true,\"type\":\"string\",\"description\":\"The severity of the alert.\",\"enum\":[\"none\",\"note\",\"warning\",\"error\"]},\"security_severity_level\":{\"nullable\":true,\"type\":\"string\",\"description\":\"The security severity of the alert.\",\"enum\":[\"low\",\"medium\",\"high\",\"critical\"]},\"description\":{\"type\":\"string\",\"description\":\"A short description of the rule used to detect the alert.\"},\"full_description\":{\"type\":\"string\",\"description\":\"description of the rule used to detect the alert.\"},\"tags\":{\"nullable\":true,\"type\":\"array\",\"description\":\"A set of tags applicable for the rule.\",\"items\":{\"type\":\"string\"}},\"help\":{\"nullable\":true,\"type\":\"string\",\"description\":\"Detailed documentation for the rule as GitHub Flavored Markdown.\"}}},\"tool\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the tool used to generate the code scanning analysis.\"},\"version\":{\"nullable\":true,\"type\":\"string\",\"description\":\"The version of the tool used to generate the code scanning analysis.\"},\"guid\":{\"nullable\":true,\"type\":\"string\",\"description\":\"The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data.\"}}},\"most_recent_instance\":{\"type\":\"object\",\"properties\":{\"ref\":{\"type\":\"string\",\"description\":\"The full Git reference, formatted as `refs/heads/`,\\n`refs/pull//merge`, or `refs/pull//head`.\"},\"analysis_key\":{\"type\":\"string\",\"description\":\"Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.\"},\"environment\":{\"type\":\"string\",\"description\":\"Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.\"},\"category\":{\"type\":\"string\",\"description\":\"Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.\"},\"state\":{\"type\":\"string\",\"description\":\"State of a code scanning alert.\",\"enum\":[\"open\",\"closed\",\"dismissed\",\"fixed\"]},\"commit_sha\":{\"type\":\"string\"},\"message\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\"}}},\"location\":{\"type\":\"object\",\"description\":\"Describe a region within a file for the alert.\",\"properties\":{\"path\":{\"type\":\"string\"},\"start_line\":{\"type\":\"integer\"},\"end_line\":{\"type\":\"integer\"},\"start_column\":{\"type\":\"integer\"},\"end_column\":{\"type\":\"integer\"}}},\"html_url\":{\"type\":\"string\"},\"classifications\":{\"type\":\"array\",\"description\":\"Classifications that have been applied to the file that triggered the alert.\\nFor example identifying it as documentation, or a generated file.\",\"items\":{\"type\":\"string\",\"description\":\"A classification of the file. For example to identify it as generated.\",\"nullable\":true,\"enum\":[\"source\",\"generated\",\"test\",\"library\"]}}}},\"repository\":{\"title\":\"Simple Repository\",\"description\":\"Simple Repository\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"example\":1296269,\"description\":\"A unique identifier of the repository.\"},\"node_id\":{\"type\":\"string\",\"example\":\"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\"description\":\"The GraphQL identifier of the repository.\"},\"name\":{\"type\":\"string\",\"example\":\"Hello-World\",\"description\":\"The name of the repository.\"},\"full_name\":{\"type\":\"string\",\"example\":\"octocat/Hello-World\",\"description\":\"The full, globally unique, name of the repository.\"},\"owner\":{\"title\":\"Simple User\",\"description\":\"Simple User\",\"type\":\"object\",\"properties\":{\"name\":{\"nullable\":true,\"type\":\"string\"},\"email\":{\"nullable\":true,\"type\":\"string\"},\"login\":{\"type\":\"string\",\"example\":\"octocat\"},\"id\":{\"type\":\"integer\",\"example\":1},\"node_id\":{\"type\":\"string\",\"example\":\"MDQ6VXNlcjE=\"},\"avatar_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/images/error/octocat_happy.gif\"},\"gravatar_id\":{\"type\":\"string\",\"example\":\"41d064eb2195891e12d0413f63227ea7\",\"nullable\":true},\"url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat\"},\"html_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/octocat\"},\"followers_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/followers\"},\"following_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/following{/other_user}\"},\"gists_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/gists{/gist_id}\"},\"starred_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\"},\"subscriptions_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/subscriptions\"},\"organizations_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/orgs\"},\"repos_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/repos\"},\"events_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/events{/privacy}\"},\"received_events_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/received_events\"},\"type\":{\"type\":\"string\",\"example\":\"User\"},\"site_admin\":{\"type\":\"boolean\"},\"starred_at\":{\"type\":\"string\",\"example\":\"\\\"2020-07-09T00:17:55Z\\\"\"}},\"required\":[\"avatar_url\",\"events_url\",\"followers_url\",\"following_url\",\"gists_url\",\"gravatar_id\",\"html_url\",\"id\",\"node_id\",\"login\",\"organizations_url\",\"received_events_url\",\"repos_url\",\"site_admin\",\"starred_url\",\"subscriptions_url\",\"type\",\"url\"]},\"private\":{\"type\":\"boolean\",\"description\":\"Whether the repository is private.\"},\"html_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/octocat/Hello-World\",\"description\":\"The URL to view the repository on GitHub.com.\"},\"description\":{\"type\":\"string\",\"example\":\"This your first repo!\",\"nullable\":true,\"description\":\"The repository description.\"},\"fork\":{\"type\":\"boolean\",\"description\":\"Whether the repository is a fork.\"},\"url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World\",\"description\":\"The URL to get more information about the repository from the GitHub API.\"},\"archive_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\"description\":\"A template for the API URL to download the repository as an archive.\"},\"assignees_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\"description\":\"A template for the API URL to list the available assignees for issues in the repository.\"},\"blobs_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\"description\":\"A template for the API URL to create or retrieve a raw Git blob in the repository.\"},\"branches_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\"description\":\"A template for the API URL to get information about branches in the repository.\"},\"collaborators_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\"description\":\"A template for the API URL to get information about collaborators of the repository.\"},\"comments_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\"description\":\"A template for the API URL to get information about comments on the repository.\"},\"commits_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\"description\":\"A template for the API URL to get information about commits on the repository.\"},\"compare_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\"description\":\"A template for the API URL to compare two commits or refs.\"},\"contents_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\"description\":\"A template for the API URL to get the contents of the repository.\"},\"contributors_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/contributors\",\"description\":\"A template for the API URL to list the contributors to the repository.\"},\"deployments_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/deployments\",\"description\":\"The API URL to list the deployments of the repository.\"},\"downloads_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/downloads\",\"description\":\"The API URL to list the downloads on the repository.\"},\"events_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/events\",\"description\":\"The API URL to list the events of the repository.\"},\"forks_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/forks\",\"description\":\"The API URL to list the forks of the repository.\"},\"git_commits_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\"description\":\"A template for the API URL to get information about Git commits of the repository.\"},\"git_refs_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\"description\":\"A template for the API URL to get information about Git refs of the repository.\"},\"git_tags_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\"description\":\"A template for the API URL to get information about Git tags of the repository.\"},\"issue_comment_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\"description\":\"A template for the API URL to get information about issue comments on the repository.\"},\"issue_events_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\"description\":\"A template for the API URL to get information about issue events on the repository.\"},\"issues_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\"description\":\"A template for the API URL to get information about issues on the repository.\"},\"keys_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\"description\":\"A template for the API URL to get information about deploy keys on the repository.\"},\"labels_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\"description\":\"A template for the API URL to get information about labels of the repository.\"},\"languages_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/languages\",\"description\":\"The API URL to get information about the languages of the repository.\"},\"merges_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/merges\",\"description\":\"The API URL to merge branches in the repository.\"},\"milestones_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\"description\":\"A template for the API URL to get information about milestones of the repository.\"},\"notifications_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\"description\":\"A template for the API URL to get information about notifications on the repository.\"},\"pulls_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\"description\":\"A template for the API URL to get information about pull requests on the repository.\"},\"releases_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\"description\":\"A template for the API URL to get information about releases on the repository.\"},\"stargazers_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/stargazers\",\"description\":\"The API URL to list the stargazers on the repository.\"},\"statuses_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\"description\":\"A template for the API URL to get information about statuses of a commit.\"},\"subscribers_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/subscribers\",\"description\":\"The API URL to list the subscribers on the repository.\"},\"subscription_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/subscription\",\"description\":\"The API URL to subscribe to notifications for this repository.\"},\"tags_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/tags\",\"description\":\"The API URL to get information about tags on the repository.\"},\"teams_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/teams\",\"description\":\"The API URL to list the teams on the repository.\"},\"trees_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\"description\":\"A template for the API URL to create or retrieve a raw Git tree of the repository.\"},\"hooks_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/repos/octocat/Hello-World/hooks\",\"description\":\"The API URL to list the hooks on the repository.\"}},\"required\":[\"archive_url\",\"assignees_url\",\"blobs_url\",\"branches_url\",\"collaborators_url\",\"comments_url\",\"commits_url\",\"compare_url\",\"contents_url\",\"contributors_url\",\"deployments_url\",\"description\",\"downloads_url\",\"events_url\",\"fork\",\"forks_url\",\"full_name\",\"git_commits_url\",\"git_refs_url\",\"git_tags_url\",\"hooks_url\",\"html_url\",\"id\",\"node_id\",\"issue_comment_url\",\"issue_events_url\",\"issues_url\",\"keys_url\",\"labels_url\",\"languages_url\",\"merges_url\",\"milestones_url\",\"name\",\"notifications_url\",\"owner\",\"private\",\"pulls_url\",\"releases_url\",\"stargazers_url\",\"statuses_url\",\"subscribers_url\",\"subscription_url\",\"tags_url\",\"teams_url\",\"trees_url\",\"url\"]}},\"required\":[\"number\",\"created_at\",\"url\",\"html_url\",\"instances_url\",\"state\",\"dismissed_by\",\"dismissed_at\",\"dismissed_reason\",\"rule\",\"tool\",\"most_recent_instance\",\"repository\"]}}" + }, + { + "code": 403, + "schema": "{\"title\":\"Basic Error\",\"description\":\"Basic Error\",\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}" + }, + { + "code": 404, + "schema": "{\"title\":\"Basic Error\",\"description\":\"Basic Error\",\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}" + }, + { + "code": 503, + "schema": "{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"}}}" + } + ], + "parameters": [ + { "name": "enterprise" }, + { "name": "tool_name" }, + { "name": "tool_guid" }, + { "name": "before" }, + { "name": "after" }, + { "name": "page" }, + { "name": "per_page" }, + { "name": "direction" }, + { "name": "state" }, + { "name": "sort" } + ] + }, { "url": "/orgs/{org}/code-scanning/alerts", "id": "list-alerts-for-org", diff --git a/src/generated/paginating-endpoints.ts b/src/generated/paginating-endpoints.ts index a639d248..35a535c2 100644 --- a/src/generated/paginating-endpoints.ts +++ b/src/generated/paginating-endpoints.ts @@ -91,6 +91,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /enterprises/{enterprise}/audit-log"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code-scanning/alerts": { + parameters: Endpoints["GET /enterprises/{enterprise}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/code-scanning/alerts"]["response"]; + }; + /** * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise */ @@ -1835,6 +1843,7 @@ export const paginatingEndpoints: (keyof PaginatingEndpoints)[] = [ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", + "GET /enterprises/{enterprise}/code-scanning/alerts", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events",