Skip to content

Commit

Permalink
Update OpenAPI Descriptions (github#23259)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-openapi-bot authored Dec 1, 2021
1 parent 0cc679b commit b4d15cd
Show file tree
Hide file tree
Showing 12 changed files with 707 additions and 15 deletions.
109 changes: 109 additions & 0 deletions lib/rest/static/decorated/api.github.com.json
Original file line number Diff line number Diff line change
Expand Up @@ -78136,6 +78136,115 @@
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"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.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true
},
"descriptionHTML": "<p>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 <code>number</code> field in the response from the <code>GET /repos/{owner}/{repo}/code-scanning/alerts</code> operation.</p>"
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
},
"descriptionHTML": "<p>Page number of the results to fetch.</p>"
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "<p>Results per page (max 100)</p>"
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts/42/locations",
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts/42/locations</code></pre>"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})",
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.<span class=\"hljs-title hljs-function\">request</span>(<span class=\"hljs-string\">'GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">alert_number</span>: <span class=\"hljs-number\">42</span>\n})\n</code></pre>"
}
],
"summary": "List locations for a secret scanning alert",
"description": "Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-locations-for-alert",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "secret-scanning",
"subcategory": null
},
"slug": "list-locations-for-a-secret-scanning-alert",
"category": "secret-scanning",
"categoryLabel": "Secret scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "<p>Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the <code>repo</code> scope or <code>security_events</code> scope.</p>\n<p>GitHub Apps must have the <code>secret_scanning_alerts</code> read permission to use this endpoint.</p>",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">[</span>\n <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"type\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"commit\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"details\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"path\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"/example/secrets.txt\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">1</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">1</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">1</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">64</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"af5626b4a114abcb82d63db7c8082c3c4756e51b\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/blobs/af5626b4a114abcb82d63db7c8082c3c4756e51b\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"f14d7debf9775f957cf4f1e8176da0786431f72b\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/commits/f14d7debf9775f957cf4f1e8176da0786431f72b\"</span>\n <span class=\"hljs-punctuation\">}</span>\n <span class=\"hljs-punctuation\">}</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"type\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"commit\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"details\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"path\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"/example/secrets.txt\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">5</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">5</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">1</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">64</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"9def38117ab2d8355b982429aa924e268b4b0065\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/blobs/9def38117ab2d8355b982429aa924e268b4b0065\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"588483b99a46342501d99e3f10630cfc1219ea32\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/commits/588483b99a46342501d99e3f10630cfc1219ea32\"</span>\n <span class=\"hljs-punctuation\">}</span>\n <span class=\"hljs-punctuation\">}</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"type\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"commit\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"details\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n <span class=\"hljs-attr\">\"path\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"/example/secrets.txt\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">12</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_line\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">12</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"start_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">1</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"end_column\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">64</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"0b33e9c66e19f7fb15137a82ff1c04c10cba6caf\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"blob_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/blobs/0b33e9c66e19f7fb15137a82ff1c04c10cba6caf\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_sha\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"9def38117ab2d8355b982429aa924e268b4b0065\"</span><span class=\"hljs-punctuation\">,</span>\n <span class=\"hljs-attr\">\"commit_url\"</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">\"https://api.github.com/repos/octocat/hello-world/git/commits/9def38117ab2d8355b982429aa924e268b4b0065\"</span>\n <span class=\"hljs-punctuation\">}</span>\n <span class=\"hljs-punctuation\">}</span>\n<span class=\"hljs-punctuation\">]</span>\n</code></pre>"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Repository is public, or secret scanning is disabled for the repository, or the resource is not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stargazers",
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/static/decorated/ghes-3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -36767,7 +36767,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
},
Expand Down Expand Up @@ -37469,7 +37469,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
]
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/static/decorated/ghes-3.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -36889,7 +36889,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
},
Expand Down Expand Up @@ -37591,7 +37591,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
]
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/static/decorated/ghes-3.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38135,7 +38135,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
},
Expand Down Expand Up @@ -38837,7 +38837,7 @@
"name": "contexts",
"in": "body",
"rawType": "array",
"rawDescription": "The list of status checks to require in order to merge into this branch.\n",
"rawDescription": "The list of status checks to require in order to merge into this branch.",
"childParamsGroups": []
}
]
Expand Down
Loading

0 comments on commit b4d15cd

Please sign in to comment.