Skip to content

Commit 5158e49

Browse files
feat(typescript): optional ref parameter for .codeScanning.listAlertsForRepo() method (#79)
Co-authored-by: Octokit Bot <33075676+octokitbot@users.noreply.github.com>
1 parent be2a924 commit 5158e49

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

docs/codeScanning/listAlertsForRepo.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# List code scanning alerts for a repository
1010

11-
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.
11+
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.
1212

1313
```js
1414
octokit.codeScanning.listAlertsForRepo({
@@ -42,6 +42,11 @@ repo parameter
4242

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

45+
</td></tr>
46+
<tr><td>ref</td><td>no</td><td>
47+
48+
Returns a list of code scanning alerts for a specific brach reference. The `ref` must be formatted as `heads/<branch name>`.
49+
4550
</td></tr>
4651
</tbody>
4752
</table>

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"author": "Gregor Martynus (https://twitter.com/gr2m)",
2525
"license": "MIT",
2626
"dependencies": {
27-
"@octokit/types": "^2.15.0",
27+
"@octokit/types": "^2.16.0",
2828
"deprecation": "^2.3.1"
2929
},
3030
"devDependencies": {

scripts/update-endpoints/generated/endpoints.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20034,7 +20034,7 @@
2003420034
"url": "/repos/{owner}/{repo}/code-scanning/alerts",
2003520035
"isDeprecated": false,
2003620036
"isLegacy": false,
20037-
"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.",
20037+
"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.",
2003820038
"documentationUrl": "https://developer.github.com/v3/code-scanning/#list-code-scanning-alerts-for-a-repository",
2003920039
"previews": [],
2004020040
"headers": [],
@@ -20077,6 +20077,19 @@
2007720077
"validation": null,
2007820078
"alias": null,
2007920079
"deprecated": null
20080+
},
20081+
{
20082+
"name": "ref",
20083+
"description": "Returns a list of code scanning alerts for a specific brach reference. The `ref` must be formatted as `heads/<branch name>`.",
20084+
"in": "QUERY",
20085+
"type": "string",
20086+
"required": false,
20087+
"enum": null,
20088+
"allowNull": false,
20089+
"mapToData": null,
20090+
"validation": null,
20091+
"alias": null,
20092+
"deprecated": null
2008020093
}
2008120094
],
2008220095
"responses": [

src/generated/method-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ export type RestEndpointMethods = {
17531753
endpoint: EndpointInterface<{ url: string }>;
17541754
};
17551755
/**
1756-
* 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.
1756+
* 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.
17571757
*/
17581758
listAlertsForRepo: {
17591759
(

0 commit comments

Comments
 (0)