Skip to content

Commit 0622f7d

Browse files
Merge pull request #148 from wei18/dependabot/submodules/Submodule/github/rest-api-description-dee4dc2
Bump Submodule/github/rest-api-description from `23ea15f` to `dee4dc2`
2 parents e463a4a + e580605 commit 0622f7d

File tree

11 files changed

+2155
-49
lines changed

11 files changed

+2155
-49
lines changed

Sources/apps/Types.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,15 +2531,15 @@ public enum Components {
25312531
///
25322532
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_org_roles`.
25332533
public var organizationCustomOrgRoles: Components.Schemas.AppPermissions.OrganizationCustomOrgRolesPayload?
2534-
/// The level of permission to grant the access token for custom property management.
2534+
/// The level of permission to grant the access token for repository custom properties management at the organization level.
25352535
///
25362536
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`.
25372537
@frozen public enum OrganizationCustomPropertiesPayload: String, Codable, Hashable, Sendable, CaseIterable {
25382538
case read = "read"
25392539
case write = "write"
25402540
case admin = "admin"
25412541
}
2542-
/// The level of permission to grant the access token for custom property management.
2542+
/// The level of permission to grant the access token for repository custom properties management at the organization level.
25432543
///
25442544
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`.
25452545
public var organizationCustomProperties: Components.Schemas.AppPermissions.OrganizationCustomPropertiesPayload?
@@ -2790,7 +2790,7 @@ public enum Components {
27902790
/// - organizationAdministration: The level of permission to grant the access token to manage access to an organization.
27912791
/// - organizationCustomRoles: The level of permission to grant the access token for custom repository roles management.
27922792
/// - organizationCustomOrgRoles: The level of permission to grant the access token for custom organization roles management.
2793-
/// - organizationCustomProperties: The level of permission to grant the access token for custom property management.
2793+
/// - organizationCustomProperties: The level of permission to grant the access token for repository custom properties management at the organization level.
27942794
/// - organizationCopilotSeatManagement: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.
27952795
/// - organizationAnnouncementBanners: The level of permission to grant the access token to view and manage announcement banners for an organization.
27962796
/// - organizationEvents: The level of permission to grant the access token to view events triggered by an activity in an organization.

Sources/dependabot/Client.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,13 @@ public struct Client: APIProtocol {
693693
name: "has",
694694
value: input.query.has
695695
)
696+
try converter.setQueryItemAsURI(
697+
in: &request,
698+
style: .form,
699+
explode: true,
700+
name: "runtime_risk",
701+
value: input.query.runtimeRisk
702+
)
696703
try converter.setQueryItemAsURI(
697704
in: &request,
698705
style: .form,

Sources/dependabot/Types.swift

Lines changed: 127 additions & 15 deletions
Large diffs are not rendered by default.

Sources/orgs/Client.swift

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.

Sources/orgs/Types.swift

Lines changed: 904 additions & 3 deletions
Large diffs are not rendered by default.

Sources/repos/Client.swift

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12245,6 +12245,208 @@ public struct Client: APIProtocol {
1224512245
}
1224612246
)
1224712247
}
12248+
/// Check if immutable releases are enabled for a repository
12249+
///
12250+
/// Shows whether immutable releases are enabled or disabled. Also identifies whether immutability is being
12251+
/// enforced by the repository owner. The authenticated user must have admin read access to the repository.
12252+
///
12253+
/// - Remark: HTTP `GET /repos/{owner}/{repo}/immutable-releases`.
12254+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/get(repos/check-immutable-releases)`.
12255+
public func reposCheckImmutableReleases(_ input: Operations.ReposCheckImmutableReleases.Input) async throws -> Operations.ReposCheckImmutableReleases.Output {
12256+
try await client.send(
12257+
input: input,
12258+
forOperation: Operations.ReposCheckImmutableReleases.id,
12259+
serializer: { input in
12260+
let path = try converter.renderedPath(
12261+
template: "/repos/{}/{}/immutable-releases",
12262+
parameters: [
12263+
input.path.owner,
12264+
input.path.repo
12265+
]
12266+
)
12267+
var request: HTTPTypes.HTTPRequest = .init(
12268+
soar_path: path,
12269+
method: .get
12270+
)
12271+
suppressMutabilityWarning(&request)
12272+
converter.setAcceptHeader(
12273+
in: &request.headerFields,
12274+
contentTypes: input.headers.accept
12275+
)
12276+
return (request, nil)
12277+
},
12278+
deserializer: { response, responseBody in
12279+
switch response.status.code {
12280+
case 200:
12281+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
12282+
let body: Operations.ReposCheckImmutableReleases.Output.Ok.Body
12283+
let chosenContentType = try converter.bestContentType(
12284+
received: contentType,
12285+
options: [
12286+
"application/json"
12287+
]
12288+
)
12289+
switch chosenContentType {
12290+
case "application/json":
12291+
body = try await converter.getResponseBodyAsJSON(
12292+
Components.Schemas.CheckImmutableReleases.self,
12293+
from: responseBody,
12294+
transforming: { value in
12295+
.json(value)
12296+
}
12297+
)
12298+
default:
12299+
preconditionFailure("bestContentType chose an invalid content type.")
12300+
}
12301+
return .ok(.init(body: body))
12302+
case 404:
12303+
return .notFound(.init())
12304+
default:
12305+
return .undocumented(
12306+
statusCode: response.status.code,
12307+
.init(
12308+
headerFields: response.headerFields,
12309+
body: responseBody
12310+
)
12311+
)
12312+
}
12313+
}
12314+
)
12315+
}
12316+
/// Enable immutable releases
12317+
///
12318+
/// Enables immutable releases for a repository. The authenticated user must have admin access to the repository.
12319+
///
12320+
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/immutable-releases`.
12321+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/put(repos/enable-immutable-releases)`.
12322+
public func reposEnableImmutableReleases(_ input: Operations.ReposEnableImmutableReleases.Input) async throws -> Operations.ReposEnableImmutableReleases.Output {
12323+
try await client.send(
12324+
input: input,
12325+
forOperation: Operations.ReposEnableImmutableReleases.id,
12326+
serializer: { input in
12327+
let path = try converter.renderedPath(
12328+
template: "/repos/{}/{}/immutable-releases",
12329+
parameters: [
12330+
input.path.owner,
12331+
input.path.repo
12332+
]
12333+
)
12334+
var request: HTTPTypes.HTTPRequest = .init(
12335+
soar_path: path,
12336+
method: .put
12337+
)
12338+
suppressMutabilityWarning(&request)
12339+
converter.setAcceptHeader(
12340+
in: &request.headerFields,
12341+
contentTypes: input.headers.accept
12342+
)
12343+
return (request, nil)
12344+
},
12345+
deserializer: { response, responseBody in
12346+
switch response.status.code {
12347+
case 204:
12348+
return .noContent(.init())
12349+
case 409:
12350+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
12351+
let body: Components.Responses.Conflict.Body
12352+
let chosenContentType = try converter.bestContentType(
12353+
received: contentType,
12354+
options: [
12355+
"application/json"
12356+
]
12357+
)
12358+
switch chosenContentType {
12359+
case "application/json":
12360+
body = try await converter.getResponseBodyAsJSON(
12361+
Components.Schemas.BasicError.self,
12362+
from: responseBody,
12363+
transforming: { value in
12364+
.json(value)
12365+
}
12366+
)
12367+
default:
12368+
preconditionFailure("bestContentType chose an invalid content type.")
12369+
}
12370+
return .conflict(.init(body: body))
12371+
default:
12372+
return .undocumented(
12373+
statusCode: response.status.code,
12374+
.init(
12375+
headerFields: response.headerFields,
12376+
body: responseBody
12377+
)
12378+
)
12379+
}
12380+
}
12381+
)
12382+
}
12383+
/// Disable immutable releases
12384+
///
12385+
/// Disables immutable releases for a repository. The authenticated user must have admin access to the repository.
12386+
///
12387+
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/immutable-releases`.
12388+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/delete(repos/disable-immutable-releases)`.
12389+
public func reposDisableImmutableReleases(_ input: Operations.ReposDisableImmutableReleases.Input) async throws -> Operations.ReposDisableImmutableReleases.Output {
12390+
try await client.send(
12391+
input: input,
12392+
forOperation: Operations.ReposDisableImmutableReleases.id,
12393+
serializer: { input in
12394+
let path = try converter.renderedPath(
12395+
template: "/repos/{}/{}/immutable-releases",
12396+
parameters: [
12397+
input.path.owner,
12398+
input.path.repo
12399+
]
12400+
)
12401+
var request: HTTPTypes.HTTPRequest = .init(
12402+
soar_path: path,
12403+
method: .delete
12404+
)
12405+
suppressMutabilityWarning(&request)
12406+
converter.setAcceptHeader(
12407+
in: &request.headerFields,
12408+
contentTypes: input.headers.accept
12409+
)
12410+
return (request, nil)
12411+
},
12412+
deserializer: { response, responseBody in
12413+
switch response.status.code {
12414+
case 204:
12415+
return .noContent(.init())
12416+
case 409:
12417+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
12418+
let body: Components.Responses.Conflict.Body
12419+
let chosenContentType = try converter.bestContentType(
12420+
received: contentType,
12421+
options: [
12422+
"application/json"
12423+
]
12424+
)
12425+
switch chosenContentType {
12426+
case "application/json":
12427+
body = try await converter.getResponseBodyAsJSON(
12428+
Components.Schemas.BasicError.self,
12429+
from: responseBody,
12430+
transforming: { value in
12431+
.json(value)
12432+
}
12433+
)
12434+
default:
12435+
preconditionFailure("bestContentType chose an invalid content type.")
12436+
}
12437+
return .conflict(.init(body: body))
12438+
default:
12439+
return .undocumented(
12440+
statusCode: response.status.code,
12441+
.init(
12442+
headerFields: response.headerFields,
12443+
body: responseBody
12444+
)
12445+
)
12446+
}
12447+
}
12448+
)
12449+
}
1224812450
/// List repository invitations
1224912451
///
1225012452
/// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.

0 commit comments

Comments
 (0)