Skip to content

Commit fbf3b8a

Browse files
Merge pull request #52 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-1e07c60
Bump Submodule/github/rest-api-description from `315cea7` to `1e07c60`
2 parents 9c38ea7 + 5c2e792 commit fbf3b8a

File tree

6 files changed

+186
-1
lines changed

6 files changed

+186
-1
lines changed

Sources/code-scanning/Client.swift

+2
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,8 @@ public struct Client: APIProtocol {
20832083
///
20842084
/// 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.
20852085
///
2086+
/// This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
2087+
///
20862088
/// - Remark: HTTP `POST /repos/{owner}/{repo}/code-scanning/sarifs`.
20872089
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)`.
20882090
public func code_hyphen_scanning_sol_upload_hyphen_sarif(_ input: Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Input) async throws -> Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Output {

Sources/code-scanning/Types.swift

+6
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ public protocol APIProtocol: Sendable {
252252
///
253253
/// 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.
254254
///
255+
/// This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
256+
///
255257
/// - Remark: HTTP `POST /repos/{owner}/{repo}/code-scanning/sarifs`.
256258
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)`.
257259
func code_hyphen_scanning_sol_upload_hyphen_sarif(_ input: Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Input) async throws -> Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Output
@@ -618,6 +620,8 @@ extension APIProtocol {
618620
///
619621
/// 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.
620622
///
623+
/// This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
624+
///
621625
/// - Remark: HTTP `POST /repos/{owner}/{repo}/code-scanning/sarifs`.
622626
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)`.
623627
public func code_hyphen_scanning_sol_upload_hyphen_sarif(
@@ -6277,6 +6281,8 @@ public enum Operations {
62776281
///
62786282
/// 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.
62796283
///
6284+
/// This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
6285+
///
62806286
/// - Remark: HTTP `POST /repos/{owner}/{repo}/code-scanning/sarifs`.
62816287
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)`.
62826288
public enum code_hyphen_scanning_sol_upload_hyphen_sarif {

Sources/gists/Types.swift

+11
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,8 @@ public enum Components {
12661266
public var location: Swift.String?
12671267
/// - Remark: Generated from `#/components/schemas/public-user/email`.
12681268
public var email: Swift.String?
1269+
/// - Remark: Generated from `#/components/schemas/public-user/notification_email`.
1270+
public var notification_email: Swift.String?
12691271
/// - Remark: Generated from `#/components/schemas/public-user/hireable`.
12701272
public var hireable: Swift.Bool?
12711273
/// - Remark: Generated from `#/components/schemas/public-user/bio`.
@@ -1359,6 +1361,7 @@ public enum Components {
13591361
/// - blog:
13601362
/// - location:
13611363
/// - email:
1364+
/// - notification_email:
13621365
/// - hireable:
13631366
/// - bio:
13641367
/// - twitter_username:
@@ -1399,6 +1402,7 @@ public enum Components {
13991402
blog: Swift.String? = nil,
14001403
location: Swift.String? = nil,
14011404
email: Swift.String? = nil,
1405+
notification_email: Swift.String? = nil,
14021406
hireable: Swift.Bool? = nil,
14031407
bio: Swift.String? = nil,
14041408
twitter_username: Swift.String? = nil,
@@ -1439,6 +1443,7 @@ public enum Components {
14391443
self.blog = blog
14401444
self.location = location
14411445
self.email = email
1446+
self.notification_email = notification_email
14421447
self.hireable = hireable
14431448
self.bio = bio
14441449
self.twitter_username = twitter_username
@@ -1480,6 +1485,7 @@ public enum Components {
14801485
case blog
14811486
case location
14821487
case email
1488+
case notification_email
14831489
case hireable
14841490
case bio
14851491
case twitter_username
@@ -1591,6 +1597,10 @@ public enum Components {
15911597
Swift.String.self,
15921598
forKey: .email
15931599
)
1600+
notification_email = try container.decodeIfPresent(
1601+
Swift.String.self,
1602+
forKey: .notification_email
1603+
)
15941604
hireable = try container.decodeIfPresent(
15951605
Swift.Bool.self,
15961606
forKey: .hireable
@@ -1679,6 +1689,7 @@ public enum Components {
16791689
"blog",
16801690
"location",
16811691
"email",
1692+
"notification_email",
16821693
"hireable",
16831694
"bio",
16841695
"twitter_username",

Sources/repos/Types.swift

+149
Original file line numberDiff line numberDiff line change
@@ -12034,6 +12034,108 @@ public enum Components {
1203412034
case parameters
1203512035
}
1203612036
}
12037+
/// A tool that must provide code scanning results for this rule to pass.
12038+
///
12039+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool`.
12040+
public struct repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool: Codable, Hashable, Sendable {
12041+
/// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12042+
///
12043+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/alerts_threshold`.
12044+
@frozen public enum alerts_thresholdPayload: String, Codable, Hashable, Sendable {
12045+
case none = "none"
12046+
case errors = "errors"
12047+
case errors_and_warnings = "errors_and_warnings"
12048+
case all = "all"
12049+
}
12050+
/// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12051+
///
12052+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/alerts_threshold`.
12053+
public var alerts_threshold: Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool.alerts_thresholdPayload
12054+
/// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12055+
///
12056+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/security_alerts_threshold`.
12057+
@frozen public enum security_alerts_thresholdPayload: String, Codable, Hashable, Sendable {
12058+
case none = "none"
12059+
case critical = "critical"
12060+
case high_or_higher = "high_or_higher"
12061+
case medium_or_higher = "medium_or_higher"
12062+
case all = "all"
12063+
}
12064+
/// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12065+
///
12066+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/security_alerts_threshold`.
12067+
public var security_alerts_threshold: Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool.security_alerts_thresholdPayload
12068+
/// The name of a code scanning tool
12069+
///
12070+
/// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/tool`.
12071+
public var tool: Swift.String
12072+
/// Creates a new `repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool`.
12073+
///
12074+
/// - Parameters:
12075+
/// - alerts_threshold: The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12076+
/// - security_alerts_threshold: The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
12077+
/// - tool: The name of a code scanning tool
12078+
public init(
12079+
alerts_threshold: Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool.alerts_thresholdPayload,
12080+
security_alerts_threshold: Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool.security_alerts_thresholdPayload,
12081+
tool: Swift.String
12082+
) {
12083+
self.alerts_threshold = alerts_threshold
12084+
self.security_alerts_threshold = security_alerts_threshold
12085+
self.tool = tool
12086+
}
12087+
public enum CodingKeys: String, CodingKey {
12088+
case alerts_threshold
12089+
case security_alerts_threshold
12090+
case tool
12091+
}
12092+
}
12093+
/// Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.
12094+
///
12095+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning`.
12096+
public struct repository_hyphen_rule_hyphen_code_hyphen_scanning: Codable, Hashable, Sendable {
12097+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/type`.
12098+
@frozen public enum _typePayload: String, Codable, Hashable, Sendable {
12099+
case code_scanning = "code_scanning"
12100+
}
12101+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/type`.
12102+
public var _type: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning._typePayload
12103+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/parameters`.
12104+
public struct parametersPayload: Codable, Hashable, Sendable {
12105+
/// Tools that must provide code scanning results for this rule to pass.
12106+
///
12107+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/parameters/code_scanning_tools`.
12108+
public var code_scanning_tools: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool]
12109+
/// Creates a new `parametersPayload`.
12110+
///
12111+
/// - Parameters:
12112+
/// - code_scanning_tools: Tools that must provide code scanning results for this rule to pass.
12113+
public init(code_scanning_tools: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_code_hyphen_scanning_hyphen_tool]) {
12114+
self.code_scanning_tools = code_scanning_tools
12115+
}
12116+
public enum CodingKeys: String, CodingKey {
12117+
case code_scanning_tools
12118+
}
12119+
}
12120+
/// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/parameters`.
12121+
public var parameters: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning.parametersPayload?
12122+
/// Creates a new `repository_hyphen_rule_hyphen_code_hyphen_scanning`.
12123+
///
12124+
/// - Parameters:
12125+
/// - _type:
12126+
/// - parameters:
12127+
public init(
12128+
_type: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning._typePayload,
12129+
parameters: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning.parametersPayload? = nil
12130+
) {
12131+
self._type = _type
12132+
self.parameters = parameters
12133+
}
12134+
public enum CodingKeys: String, CodingKey {
12135+
case _type = "type"
12136+
case parameters
12137+
}
12138+
}
1203712139
/// A repository rule.
1203812140
///
1203912141
/// - Remark: Generated from `#/components/schemas/repository-rule`.
@@ -12284,6 +12386,8 @@ public enum Components {
1228412386
case case18(Components.Schemas.repository_hyphen_rule.Case18Payload)
1228512387
/// - Remark: Generated from `#/components/schemas/repository-rule/case19`.
1228612388
case repository_hyphen_rule_hyphen_workflows(Components.Schemas.repository_hyphen_rule_hyphen_workflows)
12389+
/// - Remark: Generated from `#/components/schemas/repository-rule/case20`.
12390+
case repository_hyphen_rule_hyphen_code_hyphen_scanning(Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning)
1228712391
public init(from decoder: any Decoder) throws {
1228812392
var errors: [any Error] = []
1228912393
do {
@@ -12400,6 +12504,12 @@ public enum Components {
1240012504
} catch {
1240112505
errors.append(error)
1240212506
}
12507+
do {
12508+
self = .repository_hyphen_rule_hyphen_code_hyphen_scanning(try .init(from: decoder))
12509+
return
12510+
} catch {
12511+
errors.append(error)
12512+
}
1240312513
throw Swift.DecodingError.failedToDecodeOneOfSchema(
1240412514
type: Self.self,
1240512515
codingPath: decoder.codingPath,
@@ -12446,6 +12556,8 @@ public enum Components {
1244612556
try value.encode(to: encoder)
1244712557
case let .repository_hyphen_rule_hyphen_workflows(value):
1244812558
try value.encode(to: encoder)
12559+
case let .repository_hyphen_rule_hyphen_code_hyphen_scanning(value):
12560+
try value.encode(to: encoder)
1244912561
}
1245012562
}
1245112563
}
@@ -20835,6 +20947,35 @@ public enum Components {
2083520947
}
2083620948
/// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15`.
2083720949
case case15(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case15Payload)
20950+
/// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`.
20951+
public struct Case16Payload: Codable, Hashable, Sendable {
20952+
/// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value1`.
20953+
public var value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning
20954+
/// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value2`.
20955+
public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info
20956+
/// Creates a new `Case16Payload`.
20957+
///
20958+
/// - Parameters:
20959+
/// - value1:
20960+
/// - value2:
20961+
public init(
20962+
value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning,
20963+
value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info
20964+
) {
20965+
self.value1 = value1
20966+
self.value2 = value2
20967+
}
20968+
public init(from decoder: any Decoder) throws {
20969+
value1 = try .init(from: decoder)
20970+
value2 = try .init(from: decoder)
20971+
}
20972+
public func encode(to encoder: any Encoder) throws {
20973+
try value1.encode(to: encoder)
20974+
try value2.encode(to: encoder)
20975+
}
20976+
}
20977+
/// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`.
20978+
case case16(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case16Payload)
2083820979
public init(from decoder: any Decoder) throws {
2083920980
var errors: [any Error] = []
2084020981
do {
@@ -20927,6 +21068,12 @@ public enum Components {
2092721068
} catch {
2092821069
errors.append(error)
2092921070
}
21071+
do {
21072+
self = .case16(try .init(from: decoder))
21073+
return
21074+
} catch {
21075+
errors.append(error)
21076+
}
2093021077
throw Swift.DecodingError.failedToDecodeOneOfSchema(
2093121078
type: Self.self,
2093221079
codingPath: decoder.codingPath,
@@ -20965,6 +21112,8 @@ public enum Components {
2096521112
try value.encode(to: encoder)
2096621113
case let .case15(value):
2096721114
try value.encode(to: encoder)
21115+
case let .case16(value):
21116+
try value.encode(to: encoder)
2096821117
}
2096921118
}
2097021119
}

0 commit comments

Comments
 (0)