Skip to content

Commit c9c561f

Browse files
committed
WIP octokit/openapi updated
1 parent 170f818 commit c9c561f

File tree

4 files changed

+145
-1
lines changed

4 files changed

+145
-1
lines changed

scripts/update-endpoints/generated/endpoints.json

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11485,6 +11485,118 @@
1148511485
],
1148611486
"renamed": null
1148711487
},
11488+
{
11489+
"name": "List code scanning alerts for a repository",
11490+
"scope": "codeScanning",
11491+
"id": "listAlertInstances",
11492+
"method": "GET",
11493+
"url": "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
11494+
"isDeprecated": false,
11495+
"deprecationDate": null,
11496+
"description": "Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.",
11497+
"documentationUrl": "https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert",
11498+
"previews": [],
11499+
"headers": [],
11500+
"parameters": [
11501+
{
11502+
"name": "owner",
11503+
"description": "",
11504+
"in": "PATH",
11505+
"type": "string",
11506+
"required": true,
11507+
"enum": null,
11508+
"allowNull": false,
11509+
"mapToData": null,
11510+
"validation": null,
11511+
"alias": null,
11512+
"deprecated": null
11513+
},
11514+
{
11515+
"name": "repo",
11516+
"description": "",
11517+
"in": "PATH",
11518+
"type": "string",
11519+
"required": true,
11520+
"enum": null,
11521+
"allowNull": false,
11522+
"mapToData": null,
11523+
"validation": null,
11524+
"alias": null,
11525+
"deprecated": null
11526+
},
11527+
{
11528+
"name": "alert_number",
11529+
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
11530+
"in": "PATH",
11531+
"type": "integer",
11532+
"required": true,
11533+
"enum": null,
11534+
"allowNull": false,
11535+
"mapToData": null,
11536+
"validation": null,
11537+
"alias": null,
11538+
"deprecated": null
11539+
},
11540+
{
11541+
"name": "page",
11542+
"description": "Page number of the results to fetch.",
11543+
"in": "QUERY",
11544+
"type": "integer",
11545+
"required": false,
11546+
"enum": null,
11547+
"allowNull": false,
11548+
"mapToData": null,
11549+
"validation": null,
11550+
"alias": null,
11551+
"deprecated": null
11552+
},
11553+
{
11554+
"name": "per_page",
11555+
"description": "Results per page (max 100).",
11556+
"in": "QUERY",
11557+
"type": "integer",
11558+
"required": false,
11559+
"enum": null,
11560+
"allowNull": false,
11561+
"mapToData": null,
11562+
"validation": null,
11563+
"alias": null,
11564+
"deprecated": null
11565+
},
11566+
{
11567+
"name": "ref",
11568+
"description": "The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.",
11569+
"in": "QUERY",
11570+
"type": "string",
11571+
"required": false,
11572+
"enum": null,
11573+
"allowNull": false,
11574+
"mapToData": null,
11575+
"validation": null,
11576+
"alias": null,
11577+
"deprecated": null
11578+
}
11579+
],
11580+
"responses": [
11581+
{
11582+
"code": 200,
11583+
"description": "Response",
11584+
"examples": [
11585+
{
11586+
"data": "[{\"ref\":\"refs/heads/main\",\"analysis_key\":\".github/workflows/codeql-analysis.yml:CodeQL-Build\",\"environment\":\"\",\"state\":\"open\",\"commit_sha\":\"39406e42cb832f683daa691dd652a8dc36ee8930\",\"message\":{\"text\":\"This path depends on a user-provided value.\"},\"location\":{\"path\":\"lib/ab12-gen.js\",\"start_line\":917,\"end_line\":917,\"start_column\":7,\"end_column\":18},\"classifications\":[\"library\"]},{\"ref\":\"refs/pull/3740/merge\",\"analysis_key\":\".github/workflows/codeql-analysis.yml:CodeQL-Build\",\"environment\":\"\",\"state\":\"fixed\",\"commit_sha\":\"b09da05606e27f463a2b49287684b4ae777092f2\",\"message\":{\"text\":\"This suffix check is missing a length comparison to correctly handle lastIndexOf returning -1.\"},\"location\":{\"path\":\"app/script.js\",\"start_line\":2,\"end_line\":2,\"start_column\":10,\"end_column\":50},\"classifications\":[\"source\"]}]"
11587+
}
11588+
]
11589+
},
11590+
{
11591+
"code": 403,
11592+
"description": "Response if GitHub Advanced Security is not enabled for this repository",
11593+
"examples": null
11594+
},
11595+
{ "code": 404, "description": "Resource not found", "examples": null },
11596+
{ "code": 503, "description": "Service unavailable", "examples": null }
11597+
],
11598+
"renamed": null
11599+
},
1148811600
{
1148911601
"name": "List code scanning alerts for a repository",
1149011602
"scope": "codeScanning",
@@ -11621,7 +11733,12 @@
1162111733
{ "code": 404, "description": "Resource not found", "examples": null },
1162211734
{ "code": 503, "description": "Service unavailable", "examples": null }
1162311735
],
11624-
"renamed": null
11736+
"renamed": {
11737+
"before": { "scope": "codeScanning", "id": "listAlertsInstances" },
11738+
"after": { "scope": "codeScanning", "id": "listAlertInstances" },
11739+
"date": "2021-04-30",
11740+
"note": null
11741+
}
1162511742
},
1162611743
{
1162711744
"name": "List code scanning analyses for a repository",

src/generated/endpoints.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
326326
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
327327
],
328328
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
329+
listAlertsInstances: [
330+
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
331+
{},
332+
{ renamed: ["codeScanning", "listAlertInstances"] },
333+
],
334+
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
329335
listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
330336
updateAlert: [
331337
"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",

src/generated/method-types.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,19 @@ export type RestEndpointMethods = {
24292429
defaults: RequestInterface["defaults"];
24302430
endpoint: EndpointInterface<{ url: string }>;
24312431
};
2432+
/**
2433+
* Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.
2434+
* @deprecated octokit.rest.codeScanning.listAlertsInstances() has been renamed to octokit.rest.codeScanning.listAlertInstances() (2021-04-30)
2435+
*/
2436+
listAlertsInstances: {
2437+
(
2438+
params?: RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["parameters"]
2439+
): Promise<
2440+
RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["response"]
2441+
>;
2442+
defaults: RequestInterface["defaults"];
2443+
endpoint: EndpointInterface<{ url: string }>;
2444+
};
24322445
/**
24332446
* Lists the details of all code scanning analyses for a repository,
24342447
* starting with the most recent.

src/generated/parameters-and-response-types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,14 @@ export type RestEndpointMethodTypes = {
12681268
>;
12691269
response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"];
12701270
};
1271+
listAlertsForRepo: {
1272+
parameters: RequestParameters &
1273+
Omit<
1274+
Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["parameters"],
1275+
"baseUrl" | "headers" | "mediaType"
1276+
>;
1277+
response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"];
1278+
};
12711279
listAlertsForRepo: {
12721280
parameters: RequestParameters &
12731281
Omit<

0 commit comments

Comments
 (0)