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/orgs/Client.swift
+1-1
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ public struct Client: APIProtocol {
40
40
}
41
41
/// List organizations
42
42
///
43
-
/// Lists all organizations, in the order that they were created on GitHub.
43
+
/// Lists all organizations, in the order that they were created.
44
44
///
45
45
/// **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.
Copy file name to clipboardExpand all lines: Sources/orgs/Types.swift
+3-3
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ import struct Foundation.Date
13
13
public protocol APIProtocol: Sendable {
14
14
/// List organizations
15
15
///
16
-
/// Lists all organizations, in the order that they were created on GitHub.
16
+
/// Lists all organizations, in the order that they were created.
17
17
///
18
18
/// **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.
19
19
///
@@ -730,7 +730,7 @@ public protocol APIProtocol: Sendable {
730
730
extension APIProtocol {
731
731
/// List organizations
732
732
///
733
-
/// Lists all organizations, in the order that they were created on GitHub.
733
+
/// Lists all organizations, in the order that they were created.
734
734
///
735
735
/// **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.
736
736
///
@@ -6965,7 +6965,7 @@ public enum Components {
6965
6965
public enum Operations {
6966
6966
/// List organizations
6967
6967
///
6968
-
/// Lists all organizations, in the order that they were created on GitHub.
6968
+
/// Lists all organizations, in the order that they were created.
6969
6969
///
6970
6970
/// **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.
Copy file name to clipboardExpand all lines: Sources/repos/Client.swift
+162
Original file line number
Diff line number
Diff line change
@@ -6852,6 +6852,28 @@ public struct Client: APIProtocol {
6852
6852
preconditionFailure("bestContentType chose an invalid content type.")
6853
6853
}
6854
6854
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))
6855
6877
default:
6856
6878
return .undocumented(
6857
6879
statusCode: response.status.code,
@@ -7173,6 +7195,28 @@ public struct Client: APIProtocol {
7173
7195
headers: headers,
7174
7196
body: body
7175
7197
))
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))
7176
7220
default:
7177
7221
return .undocumented(
7178
7222
statusCode: response.status.code,
@@ -7378,6 +7422,28 @@ public struct Client: APIProtocol {
7378
7422
preconditionFailure("bestContentType chose an invalid content type.")
7379
7423
}
7380
7424
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))
7381
7447
default:
7382
7448
return .undocumented(
7383
7449
statusCode: response.status.code,
@@ -13844,6 +13910,102 @@ public struct Client: APIProtocol {
13844
13910
}
13845
13911
)
13846
13912
}
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)".
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
+
}
13847
14009
/// Enable private vulnerability reporting for a repository
13848
14010
///
13849
14011
/// 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