Skip to content

Commit 5c4453b

Browse files
authored
Merge pull request #24 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-60482fa
2 parents 5b69fc1 + 527df7f commit 5c4453b

File tree

3 files changed

+123
-36
lines changed

3 files changed

+123
-36
lines changed

Sources/repos/Client.swift

+2-9
Original file line numberDiff line numberDiff line change
@@ -1662,9 +1662,9 @@ public struct Client: APIProtocol {
16621662
}
16631663
)
16641664
}
1665-
/// List all autolinks of a repository
1665+
/// Get all autolinks of a repository
16661666
///
1667-
/// This returns a list of autolinks configured for the given repository.
1667+
/// Gets all autolinks that are configured for a repository.
16681668
///
16691669
/// Information about autolinks are only available to repository administrators.
16701670
///
@@ -1687,13 +1687,6 @@ public struct Client: APIProtocol {
16871687
method: .get
16881688
)
16891689
suppressMutabilityWarning(&request)
1690-
try converter.setQueryItemAsURI(
1691-
in: &request,
1692-
style: .form,
1693-
explode: true,
1694-
name: "page",
1695-
value: input.query.page
1696-
)
16971690
converter.setAcceptHeader(
16981691
in: &request.headerFields,
16991692
contentTypes: input.headers.accept

Sources/repos/Types.swift

+120-26
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ public protocol APIProtocol: Sendable {
121121
/// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`.
122122
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`.
123123
func repos_sol_list_hyphen_activities(_ input: Operations.repos_sol_list_hyphen_activities.Input) async throws -> Operations.repos_sol_list_hyphen_activities.Output
124-
/// List all autolinks of a repository
124+
/// Get all autolinks of a repository
125125
///
126-
/// This returns a list of autolinks configured for the given repository.
126+
/// Gets all autolinks that are configured for a repository.
127127
///
128128
/// Information about autolinks are only available to repository administrators.
129129
///
@@ -2214,22 +2214,20 @@ extension APIProtocol {
22142214
headers: headers
22152215
))
22162216
}
2217-
/// List all autolinks of a repository
2217+
/// Get all autolinks of a repository
22182218
///
2219-
/// This returns a list of autolinks configured for the given repository.
2219+
/// Gets all autolinks that are configured for a repository.
22202220
///
22212221
/// Information about autolinks are only available to repository administrators.
22222222
///
22232223
/// - Remark: HTTP `GET /repos/{owner}/{repo}/autolinks`.
22242224
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/autolinks/get(repos/list-autolinks)`.
22252225
public func repos_sol_list_hyphen_autolinks(
22262226
path: Operations.repos_sol_list_hyphen_autolinks.Input.Path,
2227-
query: Operations.repos_sol_list_hyphen_autolinks.Input.Query = .init(),
22282227
headers: Operations.repos_sol_list_hyphen_autolinks.Input.Headers = .init()
22292228
) async throws -> Operations.repos_sol_list_hyphen_autolinks.Output {
22302229
try await repos_sol_list_hyphen_autolinks(Operations.repos_sol_list_hyphen_autolinks.Input(
22312230
path: path,
2232-
query: query,
22332231
headers: headers
22342232
))
22352233
}
@@ -12440,6 +12438,79 @@ public enum Components {
1244012438
case repository_id
1244112439
}
1244212440
}
12441+
/// Parameters for a targeting a repository property
12442+
///
12443+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec`.
12444+
public struct repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec: Codable, Hashable, Sendable {
12445+
/// The name of the repository property to target
12446+
///
12447+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/name`.
12448+
public var name: Swift.String
12449+
/// The values to match for the repository property
12450+
///
12451+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/property_values`.
12452+
public var property_values: [Swift.String]
12453+
/// Creates a new `repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec`.
12454+
///
12455+
/// - Parameters:
12456+
/// - name: The name of the repository property to target
12457+
/// - property_values: The values to match for the repository property
12458+
public init(
12459+
name: Swift.String,
12460+
property_values: [Swift.String]
12461+
) {
12462+
self.name = name
12463+
self.property_values = property_values
12464+
}
12465+
public enum CodingKeys: String, CodingKey {
12466+
case name
12467+
case property_values
12468+
}
12469+
}
12470+
/// Parameters for a repository property condition
12471+
///
12472+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-target`.
12473+
public struct repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target: Codable, Hashable, Sendable {
12474+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-target/repository_property`.
12475+
public struct repository_propertyPayload: Codable, Hashable, Sendable {
12476+
/// The repository properties and values to include. All of these properties must match for the condition to pass.
12477+
///
12478+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-target/repository_property/include`.
12479+
public var include: [Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec]?
12480+
/// The repository properties and values to exclude. The condition will not pass if any of these properties match.
12481+
///
12482+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-target/repository_property/exclude`.
12483+
public var exclude: [Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec]?
12484+
/// Creates a new `repository_propertyPayload`.
12485+
///
12486+
/// - Parameters:
12487+
/// - include: The repository properties and values to include. All of these properties must match for the condition to pass.
12488+
/// - exclude: The repository properties and values to exclude. The condition will not pass if any of these properties match.
12489+
public init(
12490+
include: [Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec]? = nil,
12491+
exclude: [Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec]? = nil
12492+
) {
12493+
self.include = include
12494+
self.exclude = exclude
12495+
}
12496+
public enum CodingKeys: String, CodingKey {
12497+
case include
12498+
case exclude
12499+
}
12500+
}
12501+
/// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-target/repository_property`.
12502+
public var repository_property: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target.repository_propertyPayload
12503+
/// Creates a new `repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target`.
12504+
///
12505+
/// - Parameters:
12506+
/// - repository_property:
12507+
public init(repository_property: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target.repository_propertyPayload) {
12508+
self.repository_property = repository_property
12509+
}
12510+
public enum CodingKeys: String, CodingKey {
12511+
case repository_property
12512+
}
12513+
}
1244312514
/// Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.
1244412515
///
1244512516
///
@@ -12511,6 +12582,39 @@ public enum Components {
1251112582
///
1251212583
/// - Remark: Generated from `#/components/schemas/org-ruleset-conditions/case2`.
1251312584
case case2(Components.Schemas.org_hyphen_ruleset_hyphen_conditions.Case2Payload)
12585+
/// Conditions to target repositories by property and refs by name
12586+
///
12587+
/// - Remark: Generated from `#/components/schemas/org-ruleset-conditions/case3`.
12588+
public struct Case3Payload: Codable, Hashable, Sendable {
12589+
/// - Remark: Generated from `#/components/schemas/org-ruleset-conditions/case3/value1`.
12590+
public var value1: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions
12591+
/// - Remark: Generated from `#/components/schemas/org-ruleset-conditions/case3/value2`.
12592+
public var value2: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target
12593+
/// Creates a new `Case3Payload`.
12594+
///
12595+
/// - Parameters:
12596+
/// - value1:
12597+
/// - value2:
12598+
public init(
12599+
value1: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions,
12600+
value2: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_target
12601+
) {
12602+
self.value1 = value1
12603+
self.value2 = value2
12604+
}
12605+
public init(from decoder: any Decoder) throws {
12606+
value1 = try .init(from: decoder)
12607+
value2 = try .init(from: decoder)
12608+
}
12609+
public func encode(to encoder: any Encoder) throws {
12610+
try value1.encode(to: encoder)
12611+
try value2.encode(to: encoder)
12612+
}
12613+
}
12614+
/// Conditions to target repositories by property and refs by name
12615+
///
12616+
/// - Remark: Generated from `#/components/schemas/org-ruleset-conditions/case3`.
12617+
case case3(Components.Schemas.org_hyphen_ruleset_hyphen_conditions.Case3Payload)
1251412618
public init(from decoder: any Decoder) throws {
1251512619
var errors: [any Error] = []
1251612620
do {
@@ -12525,6 +12629,12 @@ public enum Components {
1252512629
} catch {
1252612630
errors.append(error)
1252712631
}
12632+
do {
12633+
self = .case3(try .init(from: decoder))
12634+
return
12635+
} catch {
12636+
errors.append(error)
12637+
}
1252812638
throw Swift.DecodingError.failedToDecodeOneOfSchema(
1252912639
type: Self.self,
1253012640
codingPath: decoder.codingPath,
@@ -12537,6 +12647,8 @@ public enum Components {
1253712647
try value.encode(to: encoder)
1253812648
case let .case2(value):
1253912649
try value.encode(to: encoder)
12650+
case let .case3(value):
12651+
try value.encode(to: encoder)
1254012652
}
1254112653
}
1254212654
}
@@ -26666,9 +26778,9 @@ public enum Operations {
2666626778
}
2666726779
}
2666826780
}
26669-
/// List all autolinks of a repository
26781+
/// Get all autolinks of a repository
2667026782
///
26671-
/// This returns a list of autolinks configured for the given repository.
26783+
/// Gets all autolinks that are configured for a repository.
2667226784
///
2667326785
/// Information about autolinks are only available to repository administrators.
2667426786
///
@@ -26701,21 +26813,6 @@ public enum Operations {
2670126813
}
2670226814
}
2670326815
public var path: Operations.repos_sol_list_hyphen_autolinks.Input.Path
26704-
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/autolinks/GET/query`.
26705-
public struct Query: Sendable, Hashable {
26706-
/// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
26707-
///
26708-
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/autolinks/GET/query/page`.
26709-
public var page: Components.Parameters.page?
26710-
/// Creates a new `Query`.
26711-
///
26712-
/// - Parameters:
26713-
/// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
26714-
public init(page: Components.Parameters.page? = nil) {
26715-
self.page = page
26716-
}
26717-
}
26718-
public var query: Operations.repos_sol_list_hyphen_autolinks.Input.Query
2671926816
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/autolinks/GET/header`.
2672026817
public struct Headers: Sendable, Hashable {
2672126818
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.repos_sol_list_hyphen_autolinks.AcceptableContentType>]
@@ -26732,15 +26829,12 @@ public enum Operations {
2673226829
///
2673326830
/// - Parameters:
2673426831
/// - path:
26735-
/// - query:
2673626832
/// - headers:
2673726833
public init(
2673826834
path: Operations.repos_sol_list_hyphen_autolinks.Input.Path,
26739-
query: Operations.repos_sol_list_hyphen_autolinks.Input.Query = .init(),
2674026835
headers: Operations.repos_sol_list_hyphen_autolinks.Input.Headers = .init()
2674126836
) {
2674226837
self.path = path
26743-
self.query = query
2674426838
self.headers = headers
2674526839
}
2674626840
}

0 commit comments

Comments
 (0)