Skip to content

Commit 45fa270

Browse files
Merge pull request #181 from wei18/dependabot/submodules/Submodule/github/rest-api-description-d786d3f
Bump Submodule/github/rest-api-description from `2b6e93c` to `d786d3f`
2 parents 3b24f1a + c13f1fd commit 45fa270

17 files changed

Lines changed: 8323 additions & 6295 deletions

File tree

.spi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ builder:
1010
- GitHubRestAPICampaigns
1111
- GitHubRestAPIChecks
1212
- GitHubRestAPIClassroom
13+
- GitHubRestAPICode_Quality
1314
- GitHubRestAPICode_Scanning
1415
- GitHubRestAPICode_Security
1516
- GitHubRestAPICodes_Of_Conduct

Package.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ let package = Package(
1919
.library(name: "GitHubRestAPICampaigns", targets: ["GitHubRestAPICampaigns"]),
2020
.library(name: "GitHubRestAPIChecks", targets: ["GitHubRestAPIChecks"]),
2121
.library(name: "GitHubRestAPIClassroom", targets: ["GitHubRestAPIClassroom"]),
22+
.library(name: "GitHubRestAPICode_Quality", targets: ["GitHubRestAPICode_Quality"]),
2223
.library(name: "GitHubRestAPICode_Scanning", targets: ["GitHubRestAPICode_Scanning"]),
2324
.library(name: "GitHubRestAPICode_Security", targets: ["GitHubRestAPICode_Security"]),
2425
.library(name: "GitHubRestAPICodes_Of_Conduct", targets: ["GitHubRestAPICodes_Of_Conduct"]),
@@ -128,6 +129,14 @@ let package = Package(
128129
],
129130
path: "Sources/classroom"
130131
),
132+
.target(
133+
name: "GitHubRestAPICode_Quality",
134+
dependencies: [
135+
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
136+
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
137+
],
138+
path: "Sources/code-quality"
139+
),
131140
.target(
132141
name: "GitHubRestAPICode_Scanning",
133142
dependencies: [

Sources/actions/Types.swift

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10598,21 +10598,37 @@ public enum Components {
1059810598
///
1059910599
/// - Remark: Generated from `#/components/schemas/oidc-custom-sub-repo/include_claim_keys`.
1060010600
public var includeClaimKeys: [Swift.String]?
10601+
/// Whether the repository has opted in to the immutable OIDC subject claim format. When `true`, OIDC tokens will use a stable, repository-ID-based `sub` claim. If not set at the repository level, falls back to the organization-level setting.
10602+
///
10603+
/// - Remark: Generated from `#/components/schemas/oidc-custom-sub-repo/use_immutable_subject`.
10604+
public var useImmutableSubject: Swift.Bool?
10605+
/// The current `sub` claim prefix for this repository.
10606+
///
10607+
/// - Remark: Generated from `#/components/schemas/oidc-custom-sub-repo/sub_claim_prefix`.
10608+
public var subClaimPrefix: Swift.String?
1060110609
/// Creates a new `OidcCustomSubRepo`.
1060210610
///
1060310611
/// - Parameters:
1060410612
/// - useDefault: Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored.
1060510613
/// - includeClaimKeys: Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.
10614+
/// - useImmutableSubject: Whether the repository has opted in to the immutable OIDC subject claim format. When `true`, OIDC tokens will use a stable, repository-ID-based `sub` claim. If not set at the repository level, falls back to the organization-level setting.
10615+
/// - subClaimPrefix: The current `sub` claim prefix for this repository.
1060610616
public init(
1060710617
useDefault: Swift.Bool,
10608-
includeClaimKeys: [Swift.String]? = nil
10618+
includeClaimKeys: [Swift.String]? = nil,
10619+
useImmutableSubject: Swift.Bool? = nil,
10620+
subClaimPrefix: Swift.String? = nil
1060910621
) {
1061010622
self.useDefault = useDefault
1061110623
self.includeClaimKeys = includeClaimKeys
10624+
self.useImmutableSubject = useImmutableSubject
10625+
self.subClaimPrefix = subClaimPrefix
1061210626
}
1061310627
public enum CodingKeys: String, CodingKey {
1061410628
case useDefault = "use_default"
1061510629
case includeClaimKeys = "include_claim_keys"
10630+
case useImmutableSubject = "use_immutable_subject"
10631+
case subClaimPrefix = "sub_claim_prefix"
1061610632
}
1061710633
}
1061810634
/// Set secrets for GitHub Actions.
@@ -16917,6 +16933,18 @@ public enum Operations {
1691716933
///
1691816934
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/size`.
1691916935
public var size: Swift.String?
16936+
/// The source type of the runner image to use. Must match the source of the image specified by `image_id`. Can be one of `github`, `partner`, or `custom`.
16937+
///
16938+
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_source`.
16939+
@frozen public enum ImageSourcePayload: String, Codable, Hashable, Sendable, CaseIterable {
16940+
case github = "github"
16941+
case partner = "partner"
16942+
case custom = "custom"
16943+
}
16944+
/// The source type of the runner image to use. Must match the source of the image specified by `image_id`. Can be one of `github`, `partner`, or `custom`.
16945+
///
16946+
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_source`.
16947+
public var imageSource: Operations.ActionsUpdateHostedRunnerForOrg.Input.Body.JsonPayload.ImageSourcePayload?
1692016948
/// The unique identifier of the runner image. To list available images, use `GET /actions/hosted-runners/images/github-owned`, `GET /actions/hosted-runners/images/partner`, or `GET /actions/hosted-runners/images/custom`.
1692116949
///
1692216950
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_id`.
@@ -16925,6 +16953,10 @@ public enum Operations {
1692516953
///
1692616954
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_version`.
1692716955
public var imageVersion: Swift.String?
16956+
/// Whether to enable image generation for this runner pool. When enabled, the runner pool is used to build and publish custom runner images.
16957+
///
16958+
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_gen`.
16959+
public var imageGen: Swift.Bool?
1692816960
/// Creates a new `JsonPayload`.
1692916961
///
1693016962
/// - Parameters:
@@ -16933,33 +16965,41 @@ public enum Operations {
1693316965
/// - maximumRunners: The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.
1693416966
/// - enableStaticIp: Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits`
1693516967
/// - size: The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes`
16968+
/// - imageSource: The source type of the runner image to use. Must match the source of the image specified by `image_id`. Can be one of `github`, `partner`, or `custom`.
1693616969
/// - imageId: The unique identifier of the runner image. To list available images, use `GET /actions/hosted-runners/images/github-owned`, `GET /actions/hosted-runners/images/partner`, or `GET /actions/hosted-runners/images/custom`.
1693716970
/// - imageVersion: The version of the runner image to deploy. This is relevant only for runners using custom images.
16971+
/// - imageGen: Whether to enable image generation for this runner pool. When enabled, the runner pool is used to build and publish custom runner images.
1693816972
public init(
1693916973
name: Swift.String? = nil,
1694016974
runnerGroupId: Swift.Int? = nil,
1694116975
maximumRunners: Swift.Int? = nil,
1694216976
enableStaticIp: Swift.Bool? = nil,
1694316977
size: Swift.String? = nil,
16978+
imageSource: Operations.ActionsUpdateHostedRunnerForOrg.Input.Body.JsonPayload.ImageSourcePayload? = nil,
1694416979
imageId: Swift.String? = nil,
16945-
imageVersion: Swift.String? = nil
16980+
imageVersion: Swift.String? = nil,
16981+
imageGen: Swift.Bool? = nil
1694616982
) {
1694716983
self.name = name
1694816984
self.runnerGroupId = runnerGroupId
1694916985
self.maximumRunners = maximumRunners
1695016986
self.enableStaticIp = enableStaticIp
1695116987
self.size = size
16988+
self.imageSource = imageSource
1695216989
self.imageId = imageId
1695316990
self.imageVersion = imageVersion
16991+
self.imageGen = imageGen
1695416992
}
1695516993
public enum CodingKeys: String, CodingKey {
1695616994
case name
1695716995
case runnerGroupId = "runner_group_id"
1695816996
case maximumRunners = "maximum_runners"
1695916997
case enableStaticIp = "enable_static_ip"
1696016998
case size
16999+
case imageSource = "image_source"
1696117000
case imageId = "image_id"
1696217001
case imageVersion = "image_version"
17002+
case imageGen = "image_gen"
1696317003
}
1696417004
}
1696517005
/// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/content/application\/json`.
@@ -30462,21 +30502,29 @@ public enum Operations {
3046230502
///
3046330503
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/oidc/customization/sub/PUT/requestBody/json/include_claim_keys`.
3046430504
public var includeClaimKeys: [Swift.String]?
30505+
/// Whether to opt in to the immutable OIDC subject claim format for this repository. When `true`, OIDC tokens will use a stable, repository-ID-based `sub` claim.
30506+
///
30507+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/oidc/customization/sub/PUT/requestBody/json/use_immutable_subject`.
30508+
public var useImmutableSubject: Swift.Bool?
3046530509
/// Creates a new `JsonPayload`.
3046630510
///
3046730511
/// - Parameters:
3046830512
/// - useDefault: Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored.
3046930513
/// - includeClaimKeys: Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.
30514+
/// - useImmutableSubject: Whether to opt in to the immutable OIDC subject claim format for this repository. When `true`, OIDC tokens will use a stable, repository-ID-based `sub` claim.
3047030515
public init(
3047130516
useDefault: Swift.Bool,
30472-
includeClaimKeys: [Swift.String]? = nil
30517+
includeClaimKeys: [Swift.String]? = nil,
30518+
useImmutableSubject: Swift.Bool? = nil
3047330519
) {
3047430520
self.useDefault = useDefault
3047530521
self.includeClaimKeys = includeClaimKeys
30522+
self.useImmutableSubject = useImmutableSubject
3047630523
}
3047730524
public enum CodingKeys: String, CodingKey {
3047830525
case useDefault = "use_default"
3047930526
case includeClaimKeys = "include_claim_keys"
30527+
case useImmutableSubject = "use_immutable_subject"
3048030528
}
3048130529
}
3048230530
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/oidc/customization/sub/PUT/requestBody/content/application\/json`.

Sources/code-quality/Client.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Generated by swift-openapi-generator, do not modify.
2+
@_spi(Generated) import OpenAPIRuntime
3+
#if os(Linux)
4+
@preconcurrency import struct Foundation.URL
5+
@preconcurrency import struct Foundation.Data
6+
@preconcurrency import struct Foundation.Date
7+
#else
8+
import struct Foundation.URL
9+
import struct Foundation.Data
10+
import struct Foundation.Date
11+
#endif
12+
import HTTPTypes
13+
/// GitHub's v3 REST API.
14+
public struct Client: APIProtocol {
15+
/// The underlying HTTP client.
16+
private let client: UniversalClient
17+
/// Creates a new client.
18+
/// - Parameters:
19+
/// - serverURL: The server URL that the client connects to. Any server
20+
/// URLs defined in the OpenAPI document are available as static methods
21+
/// on the ``Servers`` type.
22+
/// - configuration: A set of configuration values for the client.
23+
/// - transport: A transport that performs HTTP operations.
24+
/// - middlewares: A list of middlewares to call before the transport.
25+
public init(
26+
serverURL: Foundation.URL,
27+
configuration: Configuration = .init(),
28+
transport: any ClientTransport,
29+
middlewares: [any ClientMiddleware] = []
30+
) {
31+
self.client = .init(
32+
serverURL: serverURL,
33+
configuration: configuration,
34+
transport: transport,
35+
middlewares: middlewares
36+
)
37+
}
38+
private var converter: Converter {
39+
client.converter
40+
}
41+
}

Sources/code-quality/Types.swift

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Generated by swift-openapi-generator, do not modify.
2+
@_spi(Generated) import OpenAPIRuntime
3+
#if os(Linux)
4+
@preconcurrency import struct Foundation.URL
5+
@preconcurrency import struct Foundation.Data
6+
@preconcurrency import struct Foundation.Date
7+
#else
8+
import struct Foundation.URL
9+
import struct Foundation.Data
10+
import struct Foundation.Date
11+
#endif
12+
/// A type that performs HTTP operations defined by the OpenAPI document.
13+
public protocol APIProtocol: Sendable {}
14+
15+
/// Convenience overloads for operation inputs.
16+
extension APIProtocol {
17+
}
18+
19+
/// Server URLs defined in the OpenAPI document.
20+
public enum Servers {
21+
public enum Server1 {
22+
public static func url() throws -> Foundation.URL {
23+
try Foundation.URL(
24+
validatingOpenAPIServerURL: "https://api.github.com",
25+
variables: []
26+
)
27+
}
28+
}
29+
@available(*, deprecated, renamed: "Servers.Server1.url")
30+
public static func server1() throws -> Foundation.URL {
31+
try Foundation.URL(
32+
validatingOpenAPIServerURL: "https://api.github.com",
33+
variables: []
34+
)
35+
}
36+
}
37+
38+
/// Types generated from the components section of the OpenAPI document.
39+
public enum Components {
40+
/// Types generated from the `#/components/schemas` section of the OpenAPI document.
41+
public enum Schemas {}
42+
/// Types generated from the `#/components/parameters` section of the OpenAPI document.
43+
public enum Parameters {}
44+
/// Types generated from the `#/components/requestBodies` section of the OpenAPI document.
45+
public enum RequestBodies {}
46+
/// Types generated from the `#/components/responses` section of the OpenAPI document.
47+
public enum Responses {}
48+
/// Types generated from the `#/components/headers` section of the OpenAPI document.
49+
public enum Headers {}
50+
}
51+
52+
/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document.
53+
public enum Operations {}

Sources/code-security/Types.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6445,20 +6445,20 @@ public enum Operations {
64456445
/// An array of repository IDs to detach from configurations. Up to 250 IDs can be provided.
64466446
///
64476447
/// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`.
6448-
public var selectedRepositoryIds: [Swift.Int]?
6448+
public var selectedRepositoryIds: [Swift.Int]
64496449
/// Creates a new `JsonPayload`.
64506450
///
64516451
/// - Parameters:
64526452
/// - selectedRepositoryIds: An array of repository IDs to detach from configurations. Up to 250 IDs can be provided.
6453-
public init(selectedRepositoryIds: [Swift.Int]? = nil) {
6453+
public init(selectedRepositoryIds: [Swift.Int]) {
64546454
self.selectedRepositoryIds = selectedRepositoryIds
64556455
}
64566456
public enum CodingKeys: String, CodingKey {
64576457
case selectedRepositoryIds = "selected_repository_ids"
64586458
}
64596459
public init(from decoder: any Swift.Decoder) throws {
64606460
let container = try decoder.container(keyedBy: CodingKeys.self)
6461-
self.selectedRepositoryIds = try container.decodeIfPresent(
6461+
self.selectedRepositoryIds = try container.decode(
64626462
[Swift.Int].self,
64636463
forKey: .selectedRepositoryIds
64646464
)

0 commit comments

Comments
 (0)