Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/codeScanning/listAlertsForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# List code scanning alerts for a repository

Lists all open code scanning alerts for a repository. 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.
Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. 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.

```js
octokit.codeScanning.listAlertsForRepo({
Expand Down Expand Up @@ -42,6 +42,11 @@ repo parameter

Set to `closed` to list only closed code scanning alerts.

</td></tr>
<tr><td>ref</td><td>no</td><td>

Returns a list of code scanning alerts for a specific brach reference. The `ref` must be formatted as `heads/<branch name>`.

</td></tr>
</tbody>
</table>
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "MIT",
"dependencies": {
"@octokit/types": "^2.15.0",
"@octokit/types": "^2.16.0",
"deprecation": "^2.3.1"
},
"devDependencies": {
Expand Down
15 changes: 14 additions & 1 deletion scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -20034,7 +20034,7 @@
"url": "/repos/{owner}/{repo}/code-scanning/alerts",
"isDeprecated": false,
"isLegacy": false,
"description": "Lists all open code scanning alerts for a repository. 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.",
"description": "Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. 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.",
"documentationUrl": "https://developer.github.com/v3/code-scanning/#list-code-scanning-alerts-for-a-repository",
"previews": [],
"headers": [],
Expand Down Expand Up @@ -20077,6 +20077,19 @@
"validation": null,
"alias": null,
"deprecated": null
},
{
"name": "ref",
"description": "Returns a list of code scanning alerts for a specific brach reference. The `ref` must be formatted as `heads/<branch name>`.",
"in": "QUERY",
"type": "string",
"required": false,
"enum": null,
"allowNull": false,
"mapToData": null,
"validation": null,
"alias": null,
"deprecated": null
}
],
"responses": [
Expand Down
2 changes: 1 addition & 1 deletion src/generated/method-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ export type RestEndpointMethods = {
endpoint: EndpointInterface<{ url: string }>;
};
/**
* Lists all open code scanning alerts for a repository. 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.
* Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. 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.
*/
listAlertsForRepo: {
(
Expand Down