Skip to content

Commit 391af50

Browse files
Commit via running ake Sources/repos
1 parent f5520dd commit 391af50

File tree

1 file changed

+149
-0
lines changed

1 file changed

+149
-0
lines changed

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)