Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/apps/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2531,15 +2531,15 @@ public enum Components {
///
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_org_roles`.
public var organizationCustomOrgRoles: Components.Schemas.AppPermissions.OrganizationCustomOrgRolesPayload?
/// The level of permission to grant the access token for custom property management.
/// The level of permission to grant the access token for repository custom properties management at the organization level.
///
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`.
@frozen public enum OrganizationCustomPropertiesPayload: String, Codable, Hashable, Sendable, CaseIterable {
case read = "read"
case write = "write"
case admin = "admin"
}
/// The level of permission to grant the access token for custom property management.
/// The level of permission to grant the access token for repository custom properties management at the organization level.
///
/// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`.
public var organizationCustomProperties: Components.Schemas.AppPermissions.OrganizationCustomPropertiesPayload?
Expand Down Expand Up @@ -2790,7 +2790,7 @@ public enum Components {
/// - organizationAdministration: The level of permission to grant the access token to manage access to an organization.
/// - organizationCustomRoles: The level of permission to grant the access token for custom repository roles management.
/// - organizationCustomOrgRoles: The level of permission to grant the access token for custom organization roles management.
/// - organizationCustomProperties: The level of permission to grant the access token for custom property management.
/// - organizationCustomProperties: The level of permission to grant the access token for repository custom properties management at the organization level.
/// - 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.
/// - organizationAnnouncementBanners: The level of permission to grant the access token to view and manage announcement banners for an organization.
/// - organizationEvents: The level of permission to grant the access token to view events triggered by an activity in an organization.
Expand Down
7 changes: 7 additions & 0 deletions Sources/dependabot/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,13 @@ public struct Client: APIProtocol {
name: "has",
value: input.query.has
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
explode: true,
name: "runtime_risk",
value: input.query.runtimeRisk
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
Expand Down
142 changes: 127 additions & 15 deletions Sources/dependabot/Types.swift

Large diffs are not rendered by default.

334 changes: 334 additions & 0 deletions Sources/orgs/Client.swift

Large diffs are not rendered by default.

907 changes: 904 additions & 3 deletions Sources/orgs/Types.swift

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions Sources/repos/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12245,6 +12245,208 @@ public struct Client: APIProtocol {
}
)
}
/// Check if immutable releases are enabled for a repository
///
/// Shows whether immutable releases are enabled or disabled. Also identifies whether immutability is being
/// enforced by the repository owner. The authenticated user must have admin read access to the repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/immutable-releases`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/get(repos/check-immutable-releases)`.
public func reposCheckImmutableReleases(_ input: Operations.ReposCheckImmutableReleases.Input) async throws -> Operations.ReposCheckImmutableReleases.Output {
try await client.send(
input: input,
forOperation: Operations.ReposCheckImmutableReleases.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/repos/{}/{}/immutable-releases",
parameters: [
input.path.owner,
input.path.repo
]
)
var request: HTTPTypes.HTTPRequest = .init(
soar_path: path,
method: .get
)
suppressMutabilityWarning(&request)
converter.setAcceptHeader(
in: &request.headerFields,
contentTypes: input.headers.accept
)
return (request, nil)
},
deserializer: { response, responseBody in
switch response.status.code {
case 200:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.ReposCheckImmutableReleases.Output.Ok.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Schemas.CheckImmutableReleases.self,
from: responseBody,
transforming: { value in
.json(value)
}
)
default:
preconditionFailure("bestContentType chose an invalid content type.")
}
return .ok(.init(body: body))
case 404:
return .notFound(.init())
default:
return .undocumented(
statusCode: response.status.code,
.init(
headerFields: response.headerFields,
body: responseBody
)
)
}
}
)
}
/// Enable immutable releases
///
/// Enables immutable releases for a repository. The authenticated user must have admin access to the repository.
///
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/immutable-releases`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/put(repos/enable-immutable-releases)`.
public func reposEnableImmutableReleases(_ input: Operations.ReposEnableImmutableReleases.Input) async throws -> Operations.ReposEnableImmutableReleases.Output {
try await client.send(
input: input,
forOperation: Operations.ReposEnableImmutableReleases.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/repos/{}/{}/immutable-releases",
parameters: [
input.path.owner,
input.path.repo
]
)
var request: HTTPTypes.HTTPRequest = .init(
soar_path: path,
method: .put
)
suppressMutabilityWarning(&request)
converter.setAcceptHeader(
in: &request.headerFields,
contentTypes: input.headers.accept
)
return (request, nil)
},
deserializer: { response, responseBody in
switch response.status.code {
case 204:
return .noContent(.init())
case 409:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Components.Responses.Conflict.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Schemas.BasicError.self,
from: responseBody,
transforming: { value in
.json(value)
}
)
default:
preconditionFailure("bestContentType chose an invalid content type.")
}
return .conflict(.init(body: body))
default:
return .undocumented(
statusCode: response.status.code,
.init(
headerFields: response.headerFields,
body: responseBody
)
)
}
}
)
}
/// Disable immutable releases
///
/// Disables immutable releases for a repository. The authenticated user must have admin access to the repository.
///
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/immutable-releases`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/immutable-releases/delete(repos/disable-immutable-releases)`.
public func reposDisableImmutableReleases(_ input: Operations.ReposDisableImmutableReleases.Input) async throws -> Operations.ReposDisableImmutableReleases.Output {
try await client.send(
input: input,
forOperation: Operations.ReposDisableImmutableReleases.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/repos/{}/{}/immutable-releases",
parameters: [
input.path.owner,
input.path.repo
]
)
var request: HTTPTypes.HTTPRequest = .init(
soar_path: path,
method: .delete
)
suppressMutabilityWarning(&request)
converter.setAcceptHeader(
in: &request.headerFields,
contentTypes: input.headers.accept
)
return (request, nil)
},
deserializer: { response, responseBody in
switch response.status.code {
case 204:
return .noContent(.init())
case 409:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Components.Responses.Conflict.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Schemas.BasicError.self,
from: responseBody,
transforming: { value in
.json(value)
}
)
default:
preconditionFailure("bestContentType chose an invalid content type.")
}
return .conflict(.init(body: body))
default:
return .undocumented(
statusCode: response.status.code,
.init(
headerFields: response.headerFields,
body: responseBody
)
)
}
}
)
}
/// List repository invitations
///
/// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
Expand Down
Loading