You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/code-scanning/Client.swift
+29-28Lines changed: 29 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,9 @@ public struct Client: APIProtocol {
42
42
///
43
43
/// Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
44
44
///
45
-
/// To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.
45
+
/// The authenticated user must be an owner or security manager for the organization to use this endpoint.
46
46
///
47
-
/// For public repositories, you may instead use the `public_repo` scope.
47
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//orgs/{org}/code-scanning/alerts/get(code-scanning/list-alerts-for-org)`.
@@ -232,12 +232,12 @@ public struct Client: APIProtocol {
232
232
///
233
233
/// Lists code scanning alerts.
234
234
///
235
-
/// To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope.
236
-
///
237
235
/// The response includes a `most_recent_instance` object.
238
236
/// This provides details of the most recent instance of this alert
239
237
/// for the default branch (or for the specified Git reference if you used `ref` in the request).
240
238
///
239
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
@@ -432,7 +432,9 @@ public struct Client: APIProtocol {
432
432
}
433
433
/// Get a code scanning alert
434
434
///
435
-
/// Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories, the `public_repo` scope also grants permission to read security events on public repositories only.
435
+
/// Gets a single code scanning alert.
436
+
///
437
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/get(code-scanning/get-alert)`.
@@ -566,7 +568,8 @@ public struct Client: APIProtocol {
566
568
}
567
569
/// Update a code scanning alert
568
570
///
569
-
/// Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only.
571
+
/// Updates the status of a single code scanning alert.
572
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/patch(code-scanning/update-alert)`.
@@ -708,8 +711,8 @@ public struct Client: APIProtocol {
708
711
/// List instances of a code scanning alert
709
712
///
710
713
/// Lists all instances of the specified code scanning alert.
711
-
/// You must use an access token with the `security_events` scope to use this endpoint with private repositories,
712
-
/// the `public_repo` scope also grants permission to read security events on public repositoriesonly.
714
+
///
715
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances/get(code-scanning/list-alert-instances)`.
@@ -873,12 +876,11 @@ public struct Client: APIProtocol {
873
876
/// For very old analyses this data is not available,
874
877
/// and `0` is returned in this field.
875
878
///
876
-
/// You must use an access token with the `security_events` scope to use this endpoint with private repositories,
877
-
/// the `public_repo` scope also grants permission to read security events on public repositories only.
878
-
///
879
879
/// **Deprecation notice**:
880
880
/// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
881
881
///
882
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
@@ -1066,9 +1068,6 @@ public struct Client: APIProtocol {
1066
1068
///
1067
1069
/// Gets a specified code scanning analysis for a repository.
1068
1070
///
1069
-
/// You must use an access token with the `security_events` scope to use this endpoint with private repositories,
1070
-
/// the `public_repo` scope also grants permission to read security events on public repositories only.
1071
-
///
1072
1071
/// The default JSON response contains fields that describe the analysis.
1073
1072
/// This includes the Git reference and commit SHA to which the analysis relates,
1074
1073
/// the datetime of the analysis, the name of the code scanning tool,
@@ -1083,6 +1082,8 @@ public struct Client: APIProtocol {
1083
1082
///
1084
1083
/// - **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.
1085
1084
///
1085
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
@@ -1222,10 +1223,7 @@ public struct Client: APIProtocol {
1222
1223
}
1223
1224
/// Delete a code scanning analysis from a repository
1224
1225
///
1225
-
/// Deletes a specified code scanning analysis from a repository. For
1226
-
/// private repositories, you must use an access token with the `repo` scope. For public repositories,
1227
-
/// you must use an access token with `public_repo` scope.
1228
-
/// GitHub Apps must have the `security_events` write permission to use this endpoint.
1226
+
/// Deletes a specified code scanning analysis from a repository.
1229
1227
///
1230
1228
/// You can delete one analysis at a time.
1231
1229
/// To delete a series of analyses, start with the most recent analysis and work backwards.
@@ -1288,6 +1286,8 @@ public struct Client: APIProtocol {
1288
1286
///
1289
1287
/// The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
1290
1288
///
1289
+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
@@ -1458,8 +1458,7 @@ public struct Client: APIProtocol {
1458
1458
///
1459
1459
/// Lists the CodeQL databases that are available in a repository.
1460
1460
///
1461
-
/// For private repositories, you must use an access token with the `security_events` scope.
1462
-
/// For public repositories, you can use tokens with the `security_events` or `public_repo` scope.
1461
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`.
@@ -1598,8 +1597,7 @@ public struct Client: APIProtocol {
1598
1597
/// your HTTP client is configured to follow redirects or use the `Location` header
1599
1598
/// to make a second request to get the redirect URL.
1600
1599
///
1601
-
/// For private repositories, you must use an access token with the `security_events` scope.
1602
-
/// For public repositories, you can use tokens with the `security_events` or `public_repo` scope.
1600
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`.
@@ -1734,8 +1732,8 @@ public struct Client: APIProtocol {
1734
1732
/// Get a code scanning default setup configuration
1735
1733
///
1736
1734
/// Gets a code scanning default setup configuration.
1737
-
/// You must use an access token with the `repo` scope to use this endpoint with private repositories or the `public_repo`
1738
-
/// scope for public repositories.
1735
+
///
1736
+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/default-setup/get(code-scanning/get-default-setup)`.
@@ -1867,8 +1865,8 @@ public struct Client: APIProtocol {
1867
1865
/// Update a code scanning default setup configuration
1868
1866
///
1869
1867
/// Updates a code scanning default setup configuration.
1870
-
/// You must use an access token with the `repo` scope to use this endpoint with private repositories or the `public_repo`
1871
-
/// scope for public repositories.
1868
+
///
1869
+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/default-setup/patch(code-scanning/update-default-setup)`.
@@ -2052,7 +2050,7 @@ public struct Client: APIProtocol {
2052
2050
}
2053
2051
/// Upload an analysis as SARIF data
2054
2052
///
2055
-
/// Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)."
2053
+
/// Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)."
2056
2054
///
2057
2055
/// There are two places where you can upload code scanning results.
2058
2056
/// - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
@@ -2083,6 +2081,8 @@ public struct Client: APIProtocol {
2083
2081
/// You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.
2084
2082
/// For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)."
2085
2083
///
2084
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
@@ -2225,7 +2225,8 @@ public struct Client: APIProtocol {
2225
2225
}
2226
2226
/// Get information about a SARIF upload
2227
2227
///
2228
-
/// Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repositories, the `public_repo` scope also grants permission to read security events on public repositories only.
2228
+
/// Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)."
2229
+
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
0 commit comments