diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 26a285de274..d92c5ad8035 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,8 +11,7 @@ updates: schedule: interval: "weekly" -# FIXME: Need other way to update OAS. - # - package-ecosystem: "gitsubmodule" - # directory: "/" - # schedule: - # interval: "weekly" + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/CI-Dependabot.yml similarity index 88% rename from .github/workflows/Dependabot.yml rename to .github/workflows/CI-Dependabot.yml index 8083e4d1339..df8e19bae5d 100644 --- a/.github/workflows/Dependabot.yml +++ b/.github/workflows/CI-Dependabot.yml @@ -31,13 +31,13 @@ jobs: os: ${{ matrix.os }} - name: "Sync code base" env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh pr checkout ${{ github.event.pull_request.number }} git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - make install + make -j 3 install git push gh pr merge --auto --merge "$PR_URL" gh pr review --approve "$PR_URL" diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 00000000000..1fdf097face --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,58 @@ +name: Release + +on: + schedule: + - cron: '0 0 1 * *' # 每月的第一天 00:00 UTC + workflow_dispatch: # 允許手動觸發工作流 + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + + create-git-branch-release: + runs-on: ubuntu-latest + permissions: + contents: write + env: + RELEASE_BRANCH: release + outputs: + branch: ${{ env.RELEASE_BRANCH }} + steps: + - uses: actions/checkout@v4 + + - name: Create release branch + run: git checkout -B $RELEASE_BRANCH + + - name: Remove submodule (if exists) + env: + SUBMODULE_PATH: Submodule/github/rest-api-description + run: | + if [ -d "$SUBMODULE_PATH" ]; then + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git submodule deinit -f $SUBMODULE_PATH || true + git rm -f $SUBMODULE_PATH || true + rm -rf .git/modules/$SUBMODULE_PATH || true + git commit -m "Remove submodule" + else + echo "Submodule not found, skipping removal." + fi + + - name: Push release branch + run: git push --force --set-upstream origin $RELEASE_BRANCH + + create-github-release: + needs: create-git-branch-release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.3 + with: + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ needs.create-git-branch-release.outputs.branch }} + type: "patch" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Makefile b/Makefile index f608a353573..00ec777e20d 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,9 @@ commit: Sources/%: Sources/%/Client.swift Sources/%/Types.swift @$(MAKE) commit file="$@" +# Prevent submodule update from running in parallel with other jobs +.NOTPARALLEL: Submodule + # Update openapi specification if needed .PHONY: Submodule Submodule: diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index ab0d2c93dc3..122d36f2fe2 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -2802,116 +2802,26 @@ public enum Operations { @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json`. @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1/status`. - public var status: OpenAPIRuntime.OpenAPIValueContainer - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - status: - /// - additionalProperties: A container of undocumented properties. - public init( - status: OpenAPIRuntime.OpenAPIValueContainer, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() - ) { - self.status = status - self.additionalProperties = additionalProperties - } - public enum CodingKeys: String, CodingKey { - case status - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decode( - OpenAPIRuntime.OpenAPIValueContainer.self, - forKey: .status - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "status" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode( - status, - forKey: .status - ) - try encoder.encodeAdditionalProperties(additionalProperties) - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1`. - case case1(Operations.checks_sol_create.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2`. - public struct Case2Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2/status`. - public var status: OpenAPIRuntime.OpenAPIValueContainer? - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `Case2Payload`. - /// - /// - Parameters: - /// - status: - /// - additionalProperties: A container of undocumented properties. - public init( - status: OpenAPIRuntime.OpenAPIValueContainer? = nil, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() - ) { - self.status = status - self.additionalProperties = additionalProperties - } - public enum CodingKeys: String, CodingKey { - case status - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decodeIfPresent( - OpenAPIRuntime.OpenAPIValueContainer.self, - forKey: .status - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "status" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent( - status, - forKey: .status - ) - try encoder.encodeAdditionalProperties(additionalProperties) - } + public enum CodingKeys: String, CodingKey { + case status } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2`. - case case2(Operations.checks_sol_create.Input.Body.jsonPayload.Case2Payload) public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: .status ) + switch discriminator { + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys.status, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } } public func encode(to encoder: any Encoder) throws { switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try value.encode(to: encoder) } } } diff --git a/Sources/classroom/Client.swift b/Sources/classroom/Client.swift index d1897771cd4..783acbf5322 100644 --- a/Sources/classroom/Client.swift +++ b/Sources/classroom/Client.swift @@ -129,11 +129,11 @@ public struct Client: APIProtocol { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output { + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output { try await client.send( input: input, - forOperation: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.id, + forOperation: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.id, serializer: { input in let path = try converter.renderedPath( template: "/assignments/{}/accepted_assignments", @@ -170,7 +170,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body + let body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ diff --git a/Sources/classroom/Types.swift b/Sources/classroom/Types.swift index 64f7c02223f..27a08163617 100644 --- a/Sources/classroom/Types.swift +++ b/Sources/classroom/Types.swift @@ -23,8 +23,8 @@ public protocol APIProtocol: Sendable { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output /// Get assignment grades /// /// Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. @@ -77,13 +77,13 @@ extension APIProtocol { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment( - path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, - query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), - headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() - ) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output { - try await classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input( + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment( + path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, + query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), + headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() + ) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output { + try await classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input( path: path, query: query, headers: headers @@ -1168,9 +1168,9 @@ public enum Operations { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public enum classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment { - public static let id: Swift.String = "classroom/list-accepted-assigments-for-an-assignment" + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public enum classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment { + public static let id: Swift.String = "classroom/list-accepted-assignments-for-an-assignment" public struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/path`. public struct Path: Sendable, Hashable { @@ -1186,7 +1186,7 @@ public enum Operations { self.assignment_id = assignment_id } } - public var path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path + public var path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/query`. public struct Query: Sendable, Hashable { /// 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)." @@ -1210,19 +1210,19 @@ public enum Operations { self.per_page = per_page } } - public var query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query + public var query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers + public var headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -1230,9 +1230,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, - query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), - headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() + path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, + query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), + headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() ) { self.path = path self.query = query @@ -1259,26 +1259,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body + public var body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body) { + public init(body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)/responses/200`. + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok) + case ok(Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok { + public var ok: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok { get throws { switch self { case let .ok(response): diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index 4f1ba064bfe..a0d4edc944c 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -292,6 +292,13 @@ public struct Client: APIProtocol { name: "ref", value: input.query.ref ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -755,6 +762,13 @@ public struct Client: APIProtocol { name: "ref", value: input.query.ref ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -928,6 +942,13 @@ public struct Client: APIProtocol { name: "per_page", value: input.query.per_page ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) try converter.setQueryItemAsURI( in: &request, style: .form, diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 098effdac07..7681eaa8523 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -1631,10 +1631,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/description`. public var description: Swift.String? + /// A description of the rule used to detect the alert. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/full_description`. + public var full_description: Swift.String? /// A set of tags applicable for the rule. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/tags`. public var tags: [Swift.String]? + /// Detailed documentation for the rule as GitHub Flavored Markdown. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/help`. + public var help: Swift.String? + /// A link to the documentation for the rule used to detect the alert. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/help_uri`. + public var help_uri: Swift.String? /// Creates a new `code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary`. /// /// - Parameters: @@ -1643,21 +1655,30 @@ public enum Components { /// - severity: The severity of the alert. /// - security_severity_level: The security severity of the alert. /// - description: A short description of the rule used to detect the alert. + /// - full_description: A description of the rule used to detect the alert. /// - tags: A set of tags applicable for the rule. + /// - help: Detailed documentation for the rule as GitHub Flavored Markdown. + /// - help_uri: A link to the documentation for the rule used to detect the alert. public init( id: Swift.String? = nil, name: Swift.String? = nil, severity: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.severityPayload? = nil, security_severity_level: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.security_severity_levelPayload? = nil, description: Swift.String? = nil, - tags: [Swift.String]? = nil + full_description: Swift.String? = nil, + tags: [Swift.String]? = nil, + help: Swift.String? = nil, + help_uri: Swift.String? = nil ) { self.id = id self.name = name self.severity = severity self.security_severity_level = security_severity_level self.description = description + self.full_description = full_description self.tags = tags + self.help = help + self.help_uri = help_uri } public enum CodingKeys: String, CodingKey { case id @@ -1665,7 +1686,10 @@ public enum Components { case severity case security_severity_level case description + case full_description case tags + case help + case help_uri } } /// The version of the tool used to generate the code scanning analysis. @@ -2107,7 +2131,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/description`. public var description: Swift.String? - /// description of the rule used to detect the alert. + /// A description of the rule used to detect the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/full_description`. public var full_description: Swift.String? @@ -2131,7 +2155,7 @@ public enum Components { /// - severity: The severity of the alert. /// - security_severity_level: The security severity of the alert. /// - description: A short description of the rule used to detect the alert. - /// - full_description: description of the rule used to detect the alert. + /// - full_description: A description of the rule used to detect the alert. /// - tags: A set of tags applicable for the rule. /// - help: Detailed documentation for the rule as GitHub Flavored Markdown. /// - help_uri: A link to the documentation for the rule used to detect the alert. @@ -3272,6 +3296,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/git-ref`. public typealias git_hyphen_ref = Components.Schemas.code_hyphen_scanning_hyphen_ref + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/components/parameters/pr-alias`. + public typealias pr_hyphen_alias = Swift.Int /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. /// /// - Remark: Generated from `#/components/parameters/alert-number`. @@ -3875,6 +3903,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/ref`. public var ref: Components.Parameters.git_hyphen_ref? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// - Remark: Generated from `#/components/parameters/direction`. @frozen public enum direction: String, Codable, Hashable, Sendable { case asc = "asc" @@ -3909,6 +3941,7 @@ public enum Operations { /// - 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)." /// - per_page: The number of results per page (max 100). 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)." /// - ref: The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + /// - pr: The number of the pull request for the results you want to list. /// - direction: The direction to sort the results by. /// - sort: The property by which to sort the results. /// - state: If specified, only code scanning alerts with this state will be returned. @@ -3919,6 +3952,7 @@ public enum Operations { page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, ref: Components.Parameters.git_hyphen_ref? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil, direction: Components.Parameters.direction? = nil, sort: Operations.code_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_repo.Input.Query.sortPayload? = nil, state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query? = nil, @@ -3929,6 +3963,7 @@ public enum Operations { self.page = page self.per_page = per_page self.ref = ref + self.pr = pr self.direction = direction self.sort = sort self.state = state @@ -4693,20 +4728,27 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances/GET/query/ref`. public var ref: Components.Parameters.git_hyphen_ref? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// Creates a new `Query`. /// /// - Parameters: /// - 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)." /// - per_page: The number of results per page (max 100). 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)." /// - ref: The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + /// - pr: The number of the pull request for the results you want to list. public init( page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, - ref: Components.Parameters.git_hyphen_ref? = nil + ref: Components.Parameters.git_hyphen_ref? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil ) { self.page = page self.per_page = per_page self.ref = ref + self.pr = pr } } public var query: Operations.code_hyphen_scanning_sol_list_hyphen_alert_hyphen_instances.Input.Query @@ -4955,6 +4997,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/ref`. @@ -4987,6 +5033,7 @@ public enum Operations { /// - tool_guid: The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. /// - 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)." /// - per_page: The number of results per page (max 100). 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)." + /// - pr: The number of the pull request for the results you want to list. /// - ref: The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. /// - sarif_id: Filter analyses belonging to the same SARIF upload. /// - direction: The direction to sort the results by. @@ -4996,6 +5043,7 @@ public enum Operations { tool_guid: Components.Parameters.tool_hyphen_guid? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil, ref: Components.Schemas.code_hyphen_scanning_hyphen_ref? = nil, sarif_id: Components.Schemas.code_hyphen_scanning_hyphen_analysis_hyphen_sarif_hyphen_id? = nil, direction: Components.Parameters.direction? = nil, @@ -5005,6 +5053,7 @@ public enum Operations { self.tool_guid = tool_guid self.page = page self.per_page = per_page + self.pr = pr self.ref = ref self.sarif_id = sarif_id self.direction = direction diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 76d78c0936f..9b9bca817fe 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1150,6 +1150,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. @@ -1202,6 +1214,7 @@ public enum Components { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration /// - url: The URL of the configuration @@ -1223,6 +1236,7 @@ public enum Components { secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? = nil, enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? = nil, url: Swift.String? = nil, @@ -1244,6 +1258,7 @@ public enum Components { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement self.url = url @@ -1266,6 +1281,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement case url @@ -2004,6 +2020,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. @@ -2042,6 +2070,7 @@ public enum Operations { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration public init( @@ -2057,6 +2086,7 @@ public enum Operations { secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { @@ -2072,6 +2102,7 @@ public enum Operations { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement } @@ -2088,6 +2119,7 @@ public enum Operations { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement } @@ -2141,6 +2173,10 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) + secret_scanning_non_provider_patterns = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, + forKey: .secret_scanning_non_provider_patterns + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting @@ -2162,6 +2198,7 @@ public enum Operations { "secret_scanning", "secret_scanning_push_protection", "secret_scanning_validity_checks", + "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", "enforcement" ]) @@ -3123,6 +3160,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. @@ -3161,6 +3210,7 @@ public enum Operations { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration public init( @@ -3176,6 +3226,7 @@ public enum Operations { secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { @@ -3191,6 +3242,7 @@ public enum Operations { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement } @@ -3207,6 +3259,7 @@ public enum Operations { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement } @@ -3260,6 +3313,10 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) + secret_scanning_non_provider_patterns = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, + forKey: .secret_scanning_non_provider_patterns + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting @@ -3281,6 +3338,7 @@ public enum Operations { "secret_scanning", "secret_scanning_push_protection", "secret_scanning_validity_checks", + "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", "enforcement" ]) diff --git a/Sources/codespaces/Client.swift b/Sources/codespaces/Client.swift index afcb24fb1a8..3857cc6486d 100644 --- a/Sources/codespaces/Client.swift +++ b/Sources/codespaces/Client.swift @@ -3072,8 +3072,6 @@ public struct Client: APIProtocol { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 1ecce119c17..3e31259f699 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -238,8 +238,6 @@ public protocol APIProtocol: Sendable { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. @@ -939,8 +937,6 @@ extension APIProtocol { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. @@ -12384,8 +12380,6 @@ public enum Operations { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 1b9fd1199b9..389eebee9d1 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -779,33 +779,33 @@ public enum Components { } /// A GitHub organization. /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple`. + public struct nullable_hyphen_organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/login`. public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/repos_url`. public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/events_url`. public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/hooks_url`. public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/issues_url`. public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/members_url`. public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/public_members_url`. public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/avatar_url`. public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/description`. public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. + /// Creates a new `nullable_hyphen_organization_hyphen_simple`. /// /// - Parameters: /// - login: @@ -1184,68 +1184,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details`. public struct copilot_hyphen_seat_hyphen_details: Codable, Hashable, Sendable { - /// The assignee that has been granted access to GitHub Copilot. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - @frozen public enum assigneePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. - case simple_hyphen_user(Components.Schemas.simple_hyphen_user) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .simple_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .simple_hyphen_user(value): - try value.encode(to: encoder) - } - } - } - /// The assignee that has been granted access to GitHub Copilot. - /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload - /// The organization to which this seat belongs. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - @frozen public enum organizationPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization/case1`. - case organization_hyphen_simple(Components.Schemas.organization_hyphen_simple) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .organization_hyphen_simple(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .organization_hyphen_simple(value): - try value.encode(to: encoder) - } - } - } - /// The organization to which this seat belongs. - /// + public var assignee: Components.Schemas.simple_hyphen_user /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? + public var organization: Components.Schemas.nullable_hyphen_organization_hyphen_simple? /// The team through which the assignee is granted access to GitHub Copilot, if applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. @@ -1310,8 +1252,8 @@ public enum Components { /// Creates a new `copilot_hyphen_seat_hyphen_details`. /// /// - Parameters: - /// - assignee: The assignee that has been granted access to GitHub Copilot. - /// - organization: The organization to which this seat belongs. + /// - assignee: + /// - organization: /// - assigning_team: The team through which the assignee is granted access to GitHub Copilot, if applicable. /// - pending_cancellation_date: The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. @@ -1319,8 +1261,8 @@ public enum Components { /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. public init( - assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, - organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = nil, + assignee: Components.Schemas.simple_hyphen_user, + organization: Components.Schemas.nullable_hyphen_organization_hyphen_simple? = nil, assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, pending_cancellation_date: Swift.String? = nil, last_activity_at: Foundation.Date? = nil, @@ -1350,11 +1292,11 @@ public enum Components { public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) assignee = try container.decode( - Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload.self, + Components.Schemas.simple_hyphen_user.self, forKey: .assignee ) organization = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, + Components.Schemas.nullable_hyphen_organization_hyphen_simple.self, forKey: .organization ) assigning_team = try container.decodeIfPresent( @@ -1752,7 +1694,7 @@ public enum Components { case inactive_this_cycle } } - /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. + /// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 3e93aff0c8b..07269ad7f7a 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -551,6 +551,83 @@ public enum Servers { public enum Components { /// Types generated from the `#/components/schemas` section of the OpenAPI document. public enum Schemas { + /// - Remark: Generated from `#/components/schemas/cvss-severities`. + public struct cvss_hyphen_severities: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public struct cvss_v3Payload: Codable, Hashable, Sendable { + /// The CVSS 3 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 3 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v3Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 3 vector string. + /// - score: The CVSS 3 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public var cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public struct cvss_v4Payload: Codable, Hashable, Sendable { + /// The CVSS 4 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 4 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v4Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 4 vector string. + /// - score: The CVSS 4 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public var cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? + /// Creates a new `cvss_hyphen_severities`. + /// + /// - Parameters: + /// - cvss_v3: + /// - cvss_v4: + public init( + cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? = nil, + cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? = nil + ) { + self.cvss_v3 = cvss_v3 + self.cvss_v4 = cvss_v4 + } + public enum CodingKeys: String, CodingKey { + case cvss_v3 + case cvss_v4 + } + } /// A GitHub user. /// /// - Remark: Generated from `#/components/schemas/simple-user`. @@ -1228,6 +1305,8 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cvss`. public var cvss: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload + /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// A CWE weakness assigned to the advisory. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cwesPayload`. @@ -1398,6 +1477,7 @@ public enum Components { /// - vulnerabilities: Vulnerable version range information for the advisory. /// - severity: The severity of the advisory. /// - cvss: Details for the advisory pertaining to the Common Vulnerability Scoring System. + /// - cvss_severities: /// - cwes: Details for the advisory pertaining to Common Weakness Enumeration. /// - identifiers: Values that identify this advisory among security information sources. /// - references: Links to additional advisory information. @@ -1412,6 +1492,7 @@ public enum Components { vulnerabilities: [Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability], severity: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.severityPayload, cvss: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = nil, cwes: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cwesPayload, identifiers: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.identifiersPayload, references: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.referencesPayload, @@ -1426,6 +1507,7 @@ public enum Components { self.vulnerabilities = vulnerabilities self.severity = severity self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.identifiers = identifiers self.references = references @@ -1441,6 +1523,7 @@ public enum Components { case vulnerabilities case severity case cvss + case cvss_severities case cwes case identifiers case references @@ -1478,6 +1561,10 @@ public enum Components { Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -1510,6 +1597,7 @@ public enum Components { "vulnerabilities", "severity", "cvss", + "cvss_severities", "cwes", "identifiers", "references", diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index 1b538eb8d6d..36b45b5f90b 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -2389,7 +2389,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The handle for the GitHub user account. /// /// - Remark: Generated from `#/components/parameters/username`. diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 094041126fb..205062939b1 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -7991,7 +7991,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// A list of comma separated label names. Example: `bug,ui,@high` /// /// - Remark: Generated from `#/components/parameters/labels`. diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 3ada4926c35..938e1e9ec1e 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -443,6 +443,8 @@ public enum Components { public var actions: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/actions_macos`. public var actions_macos: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/codespaces`. + public var codespaces: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/dependabot`. public var dependabot: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/copilot`. @@ -535,6 +537,7 @@ public enum Components { /// - importer: /// - actions: /// - actions_macos: + /// - codespaces: /// - dependabot: /// - copilot: /// - domains: @@ -552,6 +555,7 @@ public enum Components { importer: [Swift.String]? = nil, actions: [Swift.String]? = nil, actions_macos: [Swift.String]? = nil, + codespaces: [Swift.String]? = nil, dependabot: [Swift.String]? = nil, copilot: [Swift.String]? = nil, domains: Components.Schemas.api_hyphen_overview.domainsPayload? = nil @@ -569,6 +573,7 @@ public enum Components { self.importer = importer self.actions = actions self.actions_macos = actions_macos + self.codespaces = codespaces self.dependabot = dependabot self.copilot = copilot self.domains = domains @@ -587,6 +592,7 @@ public enum Components { case importer case actions case actions_macos + case codespaces case dependabot case copilot case domains diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 3ab8bd3028e..ccf10410ff9 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -6735,7 +6735,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 4c8aef3c32c..8f37d238880 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -700,7 +700,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. @@ -1966,7 +1966,7 @@ extension APIProtocol { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. @@ -4085,91 +4085,6 @@ public enum Components { case html_url } } - /// A GitHub organization. - /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. - /// - /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - public init( - login: Swift.String, - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil - ) { - self.login = login - self.id = id - self.node_id = node_id - self.url = url - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - } - public enum CodingKeys: String, CodingKey { - case login - case id - case node_id - case url - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - } - } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -5183,6 +5098,91 @@ public enum Components { case security_and_analysis } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// Organization Full /// /// - Remark: Generated from `#/components/schemas/organization-full`. @@ -20384,7 +20384,7 @@ public enum Operations { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. diff --git a/Sources/pulls/Client.swift b/Sources/pulls/Client.swift index 0d806b85bb7..3849b3f6274 100644 --- a/Sources/pulls/Client.swift +++ b/Sources/pulls/Client.swift @@ -3094,6 +3094,7 @@ public struct Client: APIProtocol { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 981a93264fc..1b4851a6dd9 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -394,6 +394,7 @@ public protocol APIProtocol: Sendable { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. @@ -1025,6 +1026,7 @@ extension APIProtocol { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. @@ -6761,7 +6763,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The property to sort the results by. /// /// - Remark: Generated from `#/components/parameters/sort`. @@ -13275,6 +13277,7 @@ public enum Operations { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index 4d42b545b3a..0a4bf435183 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -1106,7 +1106,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index de935b61842..0729e4c8161 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -1675,9 +1675,9 @@ public struct Client: APIProtocol { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -4575,10 +4575,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -4676,10 +4674,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -4777,10 +4773,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5365,10 +5359,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5470,10 +5462,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5575,10 +5565,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -8255,8 +8243,7 @@ public struct Client: APIProtocol { let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/vnd.github.object", - "application/json" + "application/vnd.github.object" ] ) switch chosenContentType { @@ -8268,14 +8255,6 @@ public struct Client: APIProtocol { .application_vnd_period_github_period_object(value) } ) - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) default: preconditionFailure("bestContentType chose an invalid content type.") } diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f498e59a45c..58b0a108c8e 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -127,9 +127,9 @@ public protocol APIProtocol: Sendable { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -2319,9 +2319,9 @@ extension APIProtocol { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -2868,7 +2868,7 @@ extension APIProtocol { public func repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -2887,7 +2887,7 @@ extension APIProtocol { public func repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -2906,7 +2906,7 @@ extension APIProtocol { public func repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3020,7 +3020,7 @@ extension APIProtocol { public func repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3043,7 +3043,7 @@ extension APIProtocol { public func repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3066,7 +3066,7 @@ extension APIProtocol { public func repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -10963,12 +10963,10 @@ public enum Components { public struct repository_hyphen_ruleset_hyphen_bypass_hyphen_actor: Codable, Hashable, Sendable { /// The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_id`. public var actor_id: Swift.Int? /// The type of actor that can bypass a ruleset. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. @frozen public enum actor_typePayload: String, Codable, Hashable, Sendable { case Integration = "Integration" @@ -10979,32 +10977,29 @@ public enum Components { } /// The type of actor that can bypass a ruleset. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. public var actor_type: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.actor_typePayload - /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. - /// + /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable { case always = "always" case pull_request = "pull_request" } - /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. - /// + /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. - public var bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload + public var bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload? /// Creates a new `repository_hyphen_ruleset_hyphen_bypass_hyphen_actor`. /// /// - Parameters: /// - actor_id: The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. /// - actor_type: The type of actor that can bypass a ruleset. - /// - bypass_mode: When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + /// - bypass_mode: When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. public init( actor_id: Swift.Int? = nil, actor_type: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.actor_typePayload, - bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload + bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload? = nil ) { self.actor_id = actor_id self.actor_type = actor_type @@ -11234,8 +11229,9 @@ public enum Components { case repository_property } } - /// 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. - /// + /// Conditions for an organization ruleset. + /// The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties. + /// The push rulesets conditions object does not require the `ref_name` property. /// /// - Remark: Generated from `#/components/schemas/org-ruleset-conditions`. @frozen public enum org_hyphen_ruleset_hyphen_conditions: Codable, Hashable, Sendable { @@ -12498,9 +12494,6 @@ public enum Components { case repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case15`. case repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern) - /// > [!NOTE] - /// > `file_path_restriction` is in beta and subject to change. - /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. @@ -12547,16 +12540,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `file_path_restriction` is in beta and subject to change. - /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. case case16(Components.Schemas.repository_hyphen_rule.Case16Payload) - /// > [!NOTE] - /// > `max_file_path_length` is in beta and subject to change. - /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. @@ -12603,16 +12590,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `max_file_path_length` is in beta and subject to change. - /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. case case17(Components.Schemas.repository_hyphen_rule.Case17Payload) - /// > [!NOTE] - /// > `file_extension_restriction` is in beta and subject to change. - /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. @@ -12659,16 +12640,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `file_extension_restriction` is in beta and subject to change. - /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. case case18(Components.Schemas.repository_hyphen_rule.Case18Payload) - /// > [!NOTE] - /// > `max_file_size` is in beta and subject to change. - /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. @@ -12715,9 +12690,6 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `max_file_size` is in beta and subject to change. - /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. @@ -12921,9 +12893,6 @@ public enum Components { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -12932,9 +12901,6 @@ public enum Components { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. public var target: Components.Schemas.repository_hyphen_ruleset.targetPayload? /// The type of the source of the ruleset @@ -13205,6 +13171,7 @@ public enum Components { @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { case pass = "pass" case fail = "fail" + case bypass = "bypass" } /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. /// @@ -13317,14 +13284,15 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/rule-suite/result`. public var result: Components.Schemas.rule_hyphen_suite.resultPayload? - /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// /// - Remark: Generated from `#/components/schemas/rule-suite/evaluation_result`. @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { case pass = "pass" case fail = "fail" + case bypass = "bypass" } - /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// /// - Remark: Generated from `#/components/schemas/rule-suite/evaluation_result`. public var evaluation_result: Components.Schemas.rule_hyphen_suite.evaluation_resultPayload? @@ -13394,7 +13362,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/rule_type`. public var rule_type: Swift.String? - /// Any associated details with the rule evaluation. + /// The detailed failure message for the rule. Null if the rule passed. /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/details`. public var details: Swift.String? @@ -13405,7 +13373,7 @@ public enum Components { /// - enforcement: The enforcement level of this rule source. /// - result: The result of the evaluation of the individual rule. /// - rule_type: The type of rule. - /// - details: Any associated details with the rule evaluation. + /// - details: The detailed failure message for the rule. Null if the rule passed. public init( rule_source: Components.Schemas.rule_hyphen_suite.rule_evaluationsPayloadPayload.rule_sourcePayload? = nil, enforcement: Components.Schemas.rule_hyphen_suite.rule_evaluationsPayloadPayload.enforcementPayload? = nil, @@ -13448,7 +13416,7 @@ public enum Components { /// - repository_name: The name of the repository without the `.git` extension. /// - pushed_at: /// - result: The result of the rule evaluations for rules with the `active` enforcement status. - /// - evaluation_result: The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// - evaluation_result: The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// - rule_evaluations: Details on the evaluated rules. public init( id: Swift.Int? = nil, @@ -17709,6 +17677,8 @@ public enum Components { public var path: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/sha`. public var sha: Swift.String + /// - Remark: Generated from `#/components/schemas/content-tree/content`. + public var content: Swift.String? /// - Remark: Generated from `#/components/schemas/content-tree/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/git_url`. @@ -17727,8 +17697,6 @@ public enum Components { public var name: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/path`. public var path: Swift.String - /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/content`. - public var content: Swift.String? /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/sha`. public var sha: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/url`. @@ -17777,7 +17745,6 @@ public enum Components { /// - size: /// - name: /// - path: - /// - content: /// - sha: /// - url: /// - git_url: @@ -17789,7 +17756,6 @@ public enum Components { size: Swift.Int, name: Swift.String, path: Swift.String, - content: Swift.String? = nil, sha: Swift.String, url: Swift.String, git_url: Swift.String? = nil, @@ -17801,7 +17767,6 @@ public enum Components { self.size = size self.name = name self.path = path - self.content = content self.sha = sha self.url = url self.git_url = git_url @@ -17814,7 +17779,6 @@ public enum Components { case size case name case path - case content case sha case url case git_url @@ -17866,6 +17830,7 @@ public enum Components { /// - name: /// - path: /// - sha: + /// - content: /// - url: /// - git_url: /// - html_url: @@ -17878,6 +17843,7 @@ public enum Components { name: Swift.String, path: Swift.String, sha: Swift.String, + content: Swift.String? = nil, url: Swift.String, git_url: Swift.String? = nil, html_url: Swift.String? = nil, @@ -17890,6 +17856,7 @@ public enum Components { self.name = name self.path = path self.sha = sha + self.content = content self.url = url self.git_url = git_url self.html_url = html_url @@ -17903,6 +17870,7 @@ public enum Components { case name case path case sha + case content case url case git_url case html_url @@ -22120,7 +22088,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -22147,7 +22115,6 @@ public enum Components { public typealias invitation_hyphen_id = Swift.Int /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/components/parameters/ref-in-query`. public typealias ref_hyphen_in_hyphen_query = Swift.String /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. @@ -23692,9 +23659,6 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -23703,9 +23667,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/enforcement`. @@ -23931,7 +23892,6 @@ public enum Operations { public struct Query: Sendable, Hashable { /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. @@ -24596,9 +24556,6 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -24607,9 +24564,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/enforcement`. @@ -26374,9 +26328,9 @@ public enum Operations { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -28636,7 +28590,6 @@ public enum Operations { public var strict: Swift.Bool /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/PUT/requestBody/json/required_status_checks/contexts`. @available(*, deprecated) public var contexts: [Swift.String] @@ -31077,7 +31030,6 @@ public enum Operations { public var strict: Swift.Bool? /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/PATCH/requestBody/json/contexts`. @available(*, deprecated) public var contexts: [Swift.String]? @@ -32823,61 +32775,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1`. - case case1(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/content/application\/json`. case json(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -32887,7 +32804,7 @@ public enum Operations { public init( path: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -33057,61 +32974,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1`. - case case1(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/content/application\/json`. case json(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -33121,7 +33003,7 @@ public enum Operations { public init( path: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -33291,61 +33173,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1`. - case case1(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/content/application\/json`. case json(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -33355,7 +33202,7 @@ public enum Operations { public init( path: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -34583,61 +34430,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1`. - case case1(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/content/application\/json`. case json(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -34647,7 +34459,7 @@ public enum Operations { public init( path: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -34821,61 +34633,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1`. - case case1(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/content/application\/json`. case json(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -34885,7 +34662,7 @@ public enum Operations { public init( path: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -35059,61 +34836,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1`. - case case1(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/content/application\/json`. case json(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -35123,7 +34865,7 @@ public enum Operations { public init( path: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -39959,85 +39701,6 @@ public enum Operations { switch self { case let .application_vnd_period_github_period_object(body): return body - default: - try throwUnexpectedResponseBody( - expectedContent: "application/vnd.github.object", - body: self - ) - } - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case1`. - case content_hyphen_directory(Components.Schemas.content_hyphen_directory) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case2`. - case content_hyphen_file(Components.Schemas.content_hyphen_file) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case3`. - case content_hyphen_symlink(Components.Schemas.content_hyphen_symlink) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case4`. - case content_hyphen_submodule(Components.Schemas.content_hyphen_submodule) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .content_hyphen_directory(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_file(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_symlink(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_submodule(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .content_hyphen_directory(value): - try encoder.encodeToSingleValueContainer(value) - case let .content_hyphen_file(value): - try value.encode(to: encoder) - case let .content_hyphen_symlink(value): - try value.encode(to: encoder) - case let .content_hyphen_submodule(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/application\/json`. - case json(Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload { - get throws { - switch self { - case let .json(body): - return body - default: - try throwUnexpectedResponseBody( - expectedContent: "application/json", - body: self - ) } } } @@ -57119,9 +56782,6 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -57130,9 +56790,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/enforcement`. @@ -57367,7 +57024,6 @@ public enum Operations { public struct Query: Sendable, Hashable { /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/time-period`. @@ -58064,9 +57720,6 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -58075,9 +57728,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/enforcement`. diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 4f7aa8f66c4..faf4c6ee707 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -423,6 +423,83 @@ public enum Components { case vulnerable_functions } } + /// - Remark: Generated from `#/components/schemas/cvss-severities`. + public struct cvss_hyphen_severities: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public struct cvss_v3Payload: Codable, Hashable, Sendable { + /// The CVSS 3 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 3 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v3Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 3 vector string. + /// - score: The CVSS 3 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public var cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public struct cvss_v4Payload: Codable, Hashable, Sendable { + /// The CVSS 4 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 4 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v4Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 4 vector string. + /// - score: The CVSS 4 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public var cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? + /// Creates a new `cvss_hyphen_severities`. + /// + /// - Parameters: + /// - cvss_v3: + /// - cvss_v4: + public init( + cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? = nil, + cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? = nil + ) { + self.cvss_v3 = cvss_v3 + self.cvss_v4 = cvss_v4 + } + public enum CodingKeys: String, CodingKey { + case cvss_v3 + case cvss_v4 + } + } /// A GitHub user. /// /// - Remark: Generated from `#/components/schemas/simple-user`. @@ -733,6 +810,8 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/global-advisory/cvss`. public var cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? + /// - Remark: Generated from `#/components/schemas/global-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// - Remark: Generated from `#/components/schemas/global-advisory/cwesPayload`. public struct cwesPayloadPayload: Codable, Hashable, Sendable { /// The Common Weakness Enumeration (CWE) identifier. @@ -842,6 +921,7 @@ public enum Components { /// - withdrawn_at: The date and time of when the advisory was withdrawn, in ISO 8601 format. /// - vulnerabilities: The products and respective version ranges affected by the advisory. /// - cvss: + /// - cvss_severities: /// - cwes: /// - epss: /// - credits: The users who contributed to the advisory. @@ -865,6 +945,7 @@ public enum Components { withdrawn_at: Foundation.Date? = nil, vulnerabilities: [Components.Schemas.vulnerability]? = nil, cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? = nil, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = nil, cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? = nil, epss: Components.Schemas.global_hyphen_advisory.epssPayload? = nil, credits: Components.Schemas.global_hyphen_advisory.creditsPayload? = nil @@ -888,6 +969,7 @@ public enum Components { self.withdrawn_at = withdrawn_at self.vulnerabilities = vulnerabilities self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.epss = epss self.credits = credits @@ -912,6 +994,7 @@ public enum Components { case withdrawn_at case vulnerabilities case cvss + case cvss_severities case cwes case epss case credits @@ -994,6 +1077,10 @@ public enum Components { Components.Schemas.global_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -1026,6 +1113,7 @@ public enum Components { "withdrawn_at", "vulnerabilities", "cvss", + "cvss_severities", "cwes", "epss", "credits" @@ -4889,6 +4977,8 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/repository-advisory/cvss`. public var cvss: Components.Schemas.repository_hyphen_advisory.cvssPayload? + /// - Remark: Generated from `#/components/schemas/repository-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// - Remark: Generated from `#/components/schemas/repository-advisory/cwesPayload`. public struct cwesPayloadPayload: Codable, Hashable, Sendable { /// The Common Weakness Enumeration (CWE) identifier. @@ -5009,6 +5099,7 @@ public enum Components { /// - submission: /// - vulnerabilities: /// - cvss: + /// - cvss_severities: /// - cwes: /// - cwe_ids: A list of only the CWE IDs. /// - credits: @@ -5036,6 +5127,7 @@ public enum Components { submission: Components.Schemas.repository_hyphen_advisory.submissionPayload? = nil, vulnerabilities: [Components.Schemas.repository_hyphen_advisory_hyphen_vulnerability]? = nil, cvss: Components.Schemas.repository_hyphen_advisory.cvssPayload? = nil, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = nil, cwes: Components.Schemas.repository_hyphen_advisory.cwesPayload? = nil, cwe_ids: [Swift.String]? = nil, credits: Components.Schemas.repository_hyphen_advisory.creditsPayload? = nil, @@ -5063,6 +5155,7 @@ public enum Components { self.submission = submission self.vulnerabilities = vulnerabilities self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.cwe_ids = cwe_ids self.credits = credits @@ -5091,6 +5184,7 @@ public enum Components { case submission case vulnerabilities case cvss + case cvss_severities case cwes case cwe_ids case credits @@ -5177,6 +5271,10 @@ public enum Components { Components.Schemas.repository_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -5225,6 +5323,7 @@ public enum Components { "submission", "vulnerabilities", "cvss", + "cvss_severities", "cwes", "cwe_ids", "credits",