Skip to content

Commit ff7ded7

Browse files
authored
Merge pull request #35 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-37bd18b
Bump Submodule/github/rest-api-description from `2365ff8` to `37bd18b`
2 parents f7437dd + 799e0e4 commit ff7ded7

File tree

7 files changed

+1020
-24
lines changed

7 files changed

+1020
-24
lines changed

Sources/git/Client.swift

+268
Large diffs are not rendered by default.

Sources/git/Types.swift

+307-19
Large diffs are not rendered by default.

Sources/orgs/Client.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public struct Client: APIProtocol {
4040
}
4141
/// List organizations
4242
///
43-
/// Lists all organizations, in the order that they were created on GitHub.
43+
/// Lists all organizations, in the order that they were created.
4444
///
4545
/// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations.
4646
///

Sources/orgs/Types.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import struct Foundation.Date
1313
public protocol APIProtocol: Sendable {
1414
/// List organizations
1515
///
16-
/// Lists all organizations, in the order that they were created on GitHub.
16+
/// Lists all organizations, in the order that they were created.
1717
///
1818
/// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations.
1919
///
@@ -730,7 +730,7 @@ public protocol APIProtocol: Sendable {
730730
extension APIProtocol {
731731
/// List organizations
732732
///
733-
/// Lists all organizations, in the order that they were created on GitHub.
733+
/// Lists all organizations, in the order that they were created.
734734
///
735735
/// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations.
736736
///
@@ -6965,7 +6965,7 @@ public enum Components {
69656965
public enum Operations {
69666966
/// List organizations
69676967
///
6968-
/// Lists all organizations, in the order that they were created on GitHub.
6968+
/// Lists all organizations, in the order that they were created.
69696969
///
69706970
/// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations.
69716971
///

Sources/repos/Client.swift

+162
Original file line numberDiff line numberDiff line change
@@ -6852,6 +6852,28 @@ public struct Client: APIProtocol {
68526852
preconditionFailure("bestContentType chose an invalid content type.")
68536853
}
68546854
return .unprocessableContent(.init(body: body))
6855+
case 409:
6856+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
6857+
let body: Components.Responses.conflict.Body
6858+
let chosenContentType = try converter.bestContentType(
6859+
received: contentType,
6860+
options: [
6861+
"application/json"
6862+
]
6863+
)
6864+
switch chosenContentType {
6865+
case "application/json":
6866+
body = try await converter.getResponseBodyAsJSON(
6867+
Components.Schemas.basic_hyphen_error.self,
6868+
from: responseBody,
6869+
transforming: { value in
6870+
.json(value)
6871+
}
6872+
)
6873+
default:
6874+
preconditionFailure("bestContentType chose an invalid content type.")
6875+
}
6876+
return .conflict(.init(body: body))
68556877
default:
68566878
return .undocumented(
68576879
statusCode: response.status.code,
@@ -7173,6 +7195,28 @@ public struct Client: APIProtocol {
71737195
headers: headers,
71747196
body: body
71757197
))
7198+
case 409:
7199+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
7200+
let body: Components.Responses.conflict.Body
7201+
let chosenContentType = try converter.bestContentType(
7202+
received: contentType,
7203+
options: [
7204+
"application/json"
7205+
]
7206+
)
7207+
switch chosenContentType {
7208+
case "application/json":
7209+
body = try await converter.getResponseBodyAsJSON(
7210+
Components.Schemas.basic_hyphen_error.self,
7211+
from: responseBody,
7212+
transforming: { value in
7213+
.json(value)
7214+
}
7215+
)
7216+
default:
7217+
preconditionFailure("bestContentType chose an invalid content type.")
7218+
}
7219+
return .conflict(.init(body: body))
71767220
default:
71777221
return .undocumented(
71787222
statusCode: response.status.code,
@@ -7378,6 +7422,28 @@ public struct Client: APIProtocol {
73787422
preconditionFailure("bestContentType chose an invalid content type.")
73797423
}
73807424
return .serviceUnavailable(.init(body: body))
7425+
case 409:
7426+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
7427+
let body: Components.Responses.conflict.Body
7428+
let chosenContentType = try converter.bestContentType(
7429+
received: contentType,
7430+
options: [
7431+
"application/json"
7432+
]
7433+
)
7434+
switch chosenContentType {
7435+
case "application/json":
7436+
body = try await converter.getResponseBodyAsJSON(
7437+
Components.Schemas.basic_hyphen_error.self,
7438+
from: responseBody,
7439+
transforming: { value in
7440+
.json(value)
7441+
}
7442+
)
7443+
default:
7444+
preconditionFailure("bestContentType chose an invalid content type.")
7445+
}
7446+
return .conflict(.init(body: body))
73817447
default:
73827448
return .undocumented(
73837449
statusCode: response.status.code,
@@ -13844,6 +13910,102 @@ public struct Client: APIProtocol {
1384413910
}
1384513911
)
1384613912
}
13913+
/// Check if private vulnerability reporting is enabled for a repository
13914+
///
13915+
/// Returns a boolean indicating whether or not private vulnerability reporting is enabled for the repository. For more information, see "[Evaluating the security settings of a repository](https://docs.github.com/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)".
13916+
///
13917+
/// - Remark: HTTP `GET /repos/{owner}/{repo}/private-vulnerability-reporting`.
13918+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/private-vulnerability-reporting/get(repos/check-private-vulnerability-reporting)`.
13919+
public func repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting(_ input: Operations.repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting.Input) async throws -> Operations.repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting.Output {
13920+
try await client.send(
13921+
input: input,
13922+
forOperation: Operations.repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting.id,
13923+
serializer: { input in
13924+
let path = try converter.renderedPath(
13925+
template: "/repos/{}/{}/private-vulnerability-reporting",
13926+
parameters: [
13927+
input.path.owner,
13928+
input.path.repo
13929+
]
13930+
)
13931+
var request: HTTPTypes.HTTPRequest = .init(
13932+
soar_path: path,
13933+
method: .get
13934+
)
13935+
suppressMutabilityWarning(&request)
13936+
converter.setAcceptHeader(
13937+
in: &request.headerFields,
13938+
contentTypes: input.headers.accept
13939+
)
13940+
return (request, nil)
13941+
},
13942+
deserializer: { response, responseBody in
13943+
switch response.status.code {
13944+
case 200:
13945+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
13946+
let body: Operations.repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting.Output.Ok.Body
13947+
let chosenContentType = try converter.bestContentType(
13948+
received: contentType,
13949+
options: [
13950+
"application/json"
13951+
]
13952+
)
13953+
switch chosenContentType {
13954+
case "application/json":
13955+
body = try await converter.getResponseBodyAsJSON(
13956+
Operations.repos_sol_check_hyphen_private_hyphen_vulnerability_hyphen_reporting.Output.Ok.Body.jsonPayload.self,
13957+
from: responseBody,
13958+
transforming: { value in
13959+
.json(value)
13960+
}
13961+
)
13962+
default:
13963+
preconditionFailure("bestContentType chose an invalid content type.")
13964+
}
13965+
return .ok(.init(body: body))
13966+
case 422:
13967+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
13968+
let body: Components.Responses.bad_request.Body
13969+
let chosenContentType = try converter.bestContentType(
13970+
received: contentType,
13971+
options: [
13972+
"application/json",
13973+
"application/scim+json"
13974+
]
13975+
)
13976+
switch chosenContentType {
13977+
case "application/json":
13978+
body = try await converter.getResponseBodyAsJSON(
13979+
Components.Schemas.basic_hyphen_error.self,
13980+
from: responseBody,
13981+
transforming: { value in
13982+
.json(value)
13983+
}
13984+
)
13985+
case "application/scim+json":
13986+
body = try await converter.getResponseBodyAsJSON(
13987+
Components.Schemas.scim_hyphen_error.self,
13988+
from: responseBody,
13989+
transforming: { value in
13990+
.application_scim_plus_json(value)
13991+
}
13992+
)
13993+
default:
13994+
preconditionFailure("bestContentType chose an invalid content type.")
13995+
}
13996+
return .unprocessableContent(.init(body: body))
13997+
default:
13998+
return .undocumented(
13999+
statusCode: response.status.code,
14000+
.init(
14001+
headerFields: response.headerFields,
14002+
body: responseBody
14003+
)
14004+
)
14005+
}
14006+
}
14007+
)
14008+
}
1384714009
/// Enable private vulnerability reporting for a repository
1384814010
///
1384914011
/// Enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)."

0 commit comments

Comments
 (0)