From 295693f39a5e90e316351017e750145aa3f78211 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 17 Sep 2024 17:41:28 +0800 Subject: [PATCH 01/36] Revert "Delete .gitmodules" --- .github/dependabot.yml | 9 ++++----- .gitmodules | 4 ++++ Submodule/github/rest-api-description | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 Submodule/github/rest-api-description 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/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..cfdc733eb75 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "Submodule/github/rest-api-description"] + path = Submodule/github/rest-api-description + url = https://github.com/github/rest-api-description.git + shallow = true diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description new file mode 160000 index 00000000000..38baa7aebf2 --- /dev/null +++ b/Submodule/github/rest-api-description @@ -0,0 +1 @@ +Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca From cc8315ff0ecc1136c75a82e70e4c7c1d2da93dd6 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 17:42:12 +0800 Subject: [PATCH 02/36] Create .github/workflows/Release.yml --- .github/workflows/Release.yml | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 00000000000..cdf920f02ab --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,82 @@ +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 + outputs: + branch: ${{ steps.release_branch.outputs.value }} + steps: + - uses: actions/checkout@v3 # Use the latest stable version + + - name: Create release branch + env: + RELEASE_BRANCH: release + id: release_branch + run: | + git checkout -B $RELEASE_BRANCH + echo "value=$RELEASE_BRANCH" >> $GITHUB_OUTPUT + + - name: Remove submodule (if exists) + env: + SUBMODULE_PATH: Submodule/github/rest-api-description + run: | + if [ -d "$SUBMODULE_PATH" ]; then + 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" + git push + else + echo "Submodule not found, skipping removal." + fi + + create-github-release: + needs: create-git-branch-release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get latest version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName) + echo "Latest release version: $LATEST_VERSION" + echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV + + - name: Bump patch version + run: | + # Extract version numbers + VERSION=${LATEST_VERSION#v} + MAJOR=$(echo $VERSION | cut -d. -f1) + MINOR=$(echo $VERSION | cut -d. -f2) + PATCH=$(echo $VERSION | cut -d. -f3) + + # Bump the patch number + PATCH=$((PATCH+1)) + + # Form new version + NEW_VERSION="v$MAJOR.$MINOR.$PATCH" + echo "New version: $NEW_VERSION" + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Create new GitHub release + env: + GIT_REF: ${{ needs.create-git-branch-release.outputs.branch }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create $NEW_VERSION \ + --repo ${{ github.repository }} \ + --generate-notes \ + --target "$GIT_REF" From f5aa1814f28a0aa64bb1bd5047c92fb16397b910 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:45:56 +0000 Subject: [PATCH 03/36] Bump Submodule/github/rest-api-description from `38baa7a` to `066dbf5` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `38baa7a` to `066dbf5`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/38baa7aebf29fe927aac6aa0ae769b7a8d3204ca...066dbf5dc65b77a59b36a517cafeda2feb369334) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 38baa7aebf2..066dbf5dc65 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca +Subproject commit 066dbf5dc65b77a59b36a517cafeda2feb369334 From c6f85835e92c6df18c5f75331d675085cba455be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:46:00 +0000 Subject: [PATCH 04/36] Bump actions/checkout from 3 to 4 in /.github/workflows Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/Release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index cdf920f02ab..f6c3fa6c814 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -16,7 +16,7 @@ jobs: outputs: branch: ${{ steps.release_branch.outputs.value }} steps: - - uses: actions/checkout@v3 # Use the latest stable version + - uses: actions/checkout@v4 # Use the latest stable version - name: Create release branch env: @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get latest version env: From 9648d576e401c3f1ad28d0961c6b3dc07f21efce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:05:57 +0000 Subject: [PATCH 05/36] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 098effdac07..4cba28c20b6 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. From 92126e70d3363ef7e7beb5292a8ede1d2bb7c8da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:07:00 +0000 Subject: [PATCH 06/36] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) 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", From 04de8e74c00111943f9d50278386a6833c0334b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:07:41 +0000 Subject: [PATCH 07/36] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`. From c9ceaeadb5db8eb3c2d45d6b00e92de317cb816e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:08:43 +0000 Subject: [PATCH 08/36] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`. From 32716934b0ffbc87d9e30054771501108959a264 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:10:06 +0000 Subject: [PATCH 09/36] Commit via running ake Sources/meta --- Sources/meta/Types.swift | 6 ++++++ 1 file changed, 6 insertions(+) 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 From a2d8ea1ce03d7744a039657f4c90c67db9f822b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:12:12 +0000 Subject: [PATCH 10/36] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 981a93264fc..2b0ecccaa7a 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -6761,7 +6761,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`. From ecf43dbb672fd2109d7befa25357481b71c7c198 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:12:53 +0000 Subject: [PATCH 11/36] Commit via running ake Sources/reactions --- Sources/reactions/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`. From 425a68bb59922444e0066a379004c535b74ad38d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:13:15 +0000 Subject: [PATCH 12/36] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 4 +- Sources/repos/Types.swift | 79 ++++---------------------------------- 2 files changed, 9 insertions(+), 74 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index de935b61842..d47ff7f774a 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)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f498e59a45c..248dfda1fe3 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)`. @@ -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,12 +10977,10 @@ 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. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable { case always = "always" @@ -10992,7 +10988,6 @@ public enum Components { } /// 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. /// - /// /// - 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 /// Creates a new `repository_hyphen_ruleset_hyphen_bypass_hyphen_actor`. @@ -11236,7 +11231,6 @@ public enum Components { } /// 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. /// - /// /// - Remark: Generated from `#/components/schemas/org-ruleset-conditions`. @frozen public enum org_hyphen_ruleset_hyphen_conditions: Codable, Hashable, Sendable { /// Conditions to target repositories by name and refs by name @@ -12498,9 +12492,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 +12538,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 +12588,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 +12638,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 +12688,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 +12891,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 +12899,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 @@ -22120,7 +22084,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 +22111,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 +23655,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 +23663,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 +23888,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 +24552,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 +24560,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 +26324,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 +28586,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 +31026,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]? @@ -57119,9 +57067,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 +57075,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 +57309,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 +58005,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 +58013,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`. From c45ed8fa55760c40d10f00c057db04b7b388df11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:15:41 +0000 Subject: [PATCH 13/36] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 99 +++++++++++++++++++++++++ 1 file changed, 99 insertions(+) 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", From 14beb9ac5bada9fc8d2eb456898d166c506f1e48 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:15:58 +0800 Subject: [PATCH 14/36] Update Release.yml --- .github/workflows/Release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f6c3fa6c814..f38aea1b603 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -16,7 +16,7 @@ jobs: outputs: branch: ${{ steps.release_branch.outputs.value }} steps: - - uses: actions/checkout@v4 # Use the latest stable version + - uses: actions/checkout@v4 - name: Create release branch env: @@ -44,9 +44,6 @@ jobs: needs: create-git-branch-release runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Get latest version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 96b8665903547a85a033c47fbff441721def8289 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:17:24 +0000 Subject: [PATCH 15/36] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) 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" ]) From 6250547bac9361ea58b733eaeaa4373d99755bce Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:26:30 +0800 Subject: [PATCH 16/36] Feat, uses make -j 3 --- .github/workflows/{Dependabot.yml => CI-Dependabot.yml} | 6 +++--- Makefile | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) rename .github/workflows/{Dependabot.yml => CI-Dependabot.yml} (88%) 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/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: From 9a00a32acf851667cbcbc6a3763e3c0f1cf9313e Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:28:40 +0800 Subject: [PATCH 17/36] Fix, Author identity unknown --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f38aea1b603..e6c0f9b7463 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -31,6 +31,8 @@ jobs: 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 From 9b11396d96c09939f6eb5e4644085f982e5d62d7 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:33:31 +0800 Subject: [PATCH 18/36] Fix, fatal: The current branch release has no upstream branch. --- .github/workflows/Release.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index e6c0f9b7463..b93696a0abf 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -13,18 +13,15 @@ jobs: create-git-branch-release: runs-on: ubuntu-latest + env: + RELEASE_BRANCH: release outputs: - branch: ${{ steps.release_branch.outputs.value }} + branch: ${{ env.RELEASE_BRANCH }} steps: - uses: actions/checkout@v4 - name: Create release branch - env: - RELEASE_BRANCH: release - id: release_branch - run: | - git checkout -B $RELEASE_BRANCH - echo "value=$RELEASE_BRANCH" >> $GITHUB_OUTPUT + run: git checkout -B $RELEASE_BRANCH - name: Remove submodule (if exists) env: @@ -37,11 +34,13 @@ jobs: git rm -f $SUBMODULE_PATH || true rm -rf .git/modules/$SUBMODULE_PATH || true git commit -m "Remove submodule" - git push 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 From 1bbb90f0ba2766aa3155deb88cff95023dc25d71 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:40:12 +0800 Subject: [PATCH 19/36] Fix, remote: Permission to Wei18/github-rest-api-swift-openapi.git denied to github-actions[bot]. --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index b93696a0abf..5ceec69bad0 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -13,6 +13,8 @@ jobs: create-git-branch-release: runs-on: ubuntu-latest + permissions: + contents: write env: RELEASE_BRANCH: release outputs: From 27dcaff35290b2fa16980a1e5f60a5f91076a6bf Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:43:58 +0800 Subject: [PATCH 20/36] Fix, HTTP 403: Resource not accessible by integration (https://api.github.com/repos/Wei18/github-rest-api-swift-openapi/releases) --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 5ceec69bad0..1bab78419ed 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -46,6 +46,8 @@ jobs: create-github-release: needs: create-git-branch-release runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Get latest version env: From d5c11fe9082b738fdc963e72be93ef9e17814d20 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:05 +0800 Subject: [PATCH 21/36] Update Release.yml --- .github/workflows/Release.yml | 40 ++++++----------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1bab78419ed..42ee39db534 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,36 +49,10 @@ jobs: permissions: contents: write steps: - - name: Get latest version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName) - echo "Latest release version: $LATEST_VERSION" - echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV - - - name: Bump patch version - run: | - # Extract version numbers - VERSION=${LATEST_VERSION#v} - MAJOR=$(echo $VERSION | cut -d. -f1) - MINOR=$(echo $VERSION | cut -d. -f2) - PATCH=$(echo $VERSION | cut -d. -f3) - - # Bump the patch number - PATCH=$((PATCH+1)) - - # Form new version - NEW_VERSION="v$MAJOR.$MINOR.$PATCH" - echo "New version: $NEW_VERSION" - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - - - name: Create new GitHub release - env: - GIT_REF: ${{ needs.create-git-branch-release.outputs.branch }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create $NEW_VERSION \ - --repo ${{ github.repository }} \ - --generate-notes \ - --target "$GIT_REF" + - uses: Wei18/GitHubSwiftActions/Actions/Release@main + with: + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ needs.create-git-branch-release.outputs.branch }} + type: "patch" From e14ce4586ab1951b73a81f83cabd4eb1c4db5996 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:45 +0800 Subject: [PATCH 22/36] Update Release.yml --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 42ee39db534..1fdf097face 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,7 +49,7 @@ jobs: permissions: contents: write steps: - - uses: Wei18/GitHubSwiftActions/Actions/Release@main + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.3 with: owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }} From d60a45a4671294d69f8a3ed0a2af4b77eda3204e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:22:13 +0000 Subject: [PATCH 23/36] Bump Submodule/github/rest-api-description from `066dbf5` to `d6e386e` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `066dbf5` to `d6e386e`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/066dbf5dc65b77a59b36a517cafeda2feb369334...d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 066dbf5dc65..d6e386ed6bb 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 066dbf5dc65b77a59b36a517cafeda2feb369334 +Subproject commit d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1 From 5f5f0e18b3b2984021a73d04b01c031975b62b14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:48:06 +0000 Subject: [PATCH 24/36] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 2 +- Sources/orgs/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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..dd1b77ecbff 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)`. @@ -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)`. From e6692c2ef8caf6d8d55fb61cdf07a344b9156734 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:50:16 +0000 Subject: [PATCH 25/36] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 248dfda1fe3..57957a70520 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -13169,6 +13169,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`. /// @@ -13281,14 +13282,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? @@ -13358,7 +13360,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? @@ -13369,7 +13371,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, @@ -13412,7 +13414,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, @@ -17673,6 +17675,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`. @@ -17691,8 +17695,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`. @@ -17741,7 +17743,6 @@ public enum Components { /// - size: /// - name: /// - path: - /// - content: /// - sha: /// - url: /// - git_url: @@ -17753,7 +17754,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, @@ -17765,7 +17765,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 @@ -17778,7 +17777,6 @@ public enum Components { case size case name case path - case content case sha case url case git_url @@ -17830,6 +17828,7 @@ public enum Components { /// - name: /// - path: /// - sha: + /// - content: /// - url: /// - git_url: /// - html_url: @@ -17842,6 +17841,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, @@ -17854,6 +17854,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 @@ -17867,6 +17868,7 @@ public enum Components { case name case path case sha + case content case url case git_url case html_url From d3579b408e9b33c309980fd52a777b32b64620bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:52:04 +0000 Subject: [PATCH 26/36] Commit via running ake Sources/codespaces --- Sources/codespaces/Client.swift | 2 -- Sources/codespaces/Types.swift | 6 ------ 2 files changed, 8 deletions(-) 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`. From baf9c71151a4827d21bbcc2cbded5ce873ef71fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:52:25 +0000 Subject: [PATCH 27/36] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 1b9fd1199b9..977bb18d727 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -1752,7 +1752,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 { From 0755aedd7068c16d7c15ebfedd1ab9560a777457 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:25:18 +0000 Subject: [PATCH 28/36] Bump Submodule/github/rest-api-description from `d6e386e` to `aa5e982` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `d6e386e` to `aa5e982`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1...aa5e982025ea1f38241ba0319f72b512abf51896) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index d6e386ed6bb..aa5e982025e 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1 +Subproject commit aa5e982025ea1f38241ba0319f72b512abf51896 From 661f54586cc2127db49c3040765908b3029b89d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:43:35 +0000 Subject: [PATCH 29/36] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 118 +++++-------------------------------- 1 file changed, 14 insertions(+), 104 deletions(-) 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) } } } From 59835d2dce8d285b67be7e60c6507900698fbdf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:43:56 +0000 Subject: [PATCH 30/36] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Client.swift | 21 +++++++++++++++++++++ Sources/code-scanning/Types.swift | 27 ++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) 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 4cba28c20b6..7681eaa8523 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -3296,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`. @@ -3899,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" @@ -3933,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. @@ -3943,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, @@ -3953,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 @@ -4717,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 @@ -4979,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`. @@ -5011,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. @@ -5020,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, @@ -5029,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 From 796caa71ef454430668f118cd1aef4593fca18f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:49:13 +0000 Subject: [PATCH 31/36] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 170 +++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index dd1b77ecbff..8f37d238880 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -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`. From 2d605dbcc133ec150f6e0d7be3d6c54c1ed0a939 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:50:16 +0000 Subject: [PATCH 32/36] Commit via running ake Sources/pulls --- Sources/pulls/Client.swift | 1 + Sources/pulls/Types.swift | 3 +++ 2 files changed, 4 insertions(+) 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 2b0ecccaa7a..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)`. @@ -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)`. From d9540c0c7511074c3c29240e45275d25e09667c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:51:21 +0000 Subject: [PATCH 33/36] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 35 +-- Sources/repos/Types.swift | 495 ++++++++----------------------------- 2 files changed, 111 insertions(+), 419 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index d47ff7f774a..0729e4c8161 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -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 57957a70520..58b0a108c8e 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -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, @@ -10979,27 +10979,27 @@ public enum Components { /// /// - 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 @@ -11229,7 +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 { @@ -32773,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: @@ -32837,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 @@ -33007,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: @@ -33071,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 @@ -33241,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: @@ -33305,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 @@ -34533,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: @@ -34597,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 @@ -34771,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: @@ -34835,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 @@ -35009,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: @@ -35073,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 @@ -39909,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 - ) } } } From 18395b1a8e9a40dff07b2522ade7d74e8037b0de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:53:28 +0000 Subject: [PATCH 34/36] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 104 ++++++++---------------------------- 1 file changed, 23 insertions(+), 81 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 977bb18d727..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( From d32bb092fbc0f85374ce163f374f6879a3c67647 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:54:31 +0000 Subject: [PATCH 35/36] Commit via running ake Sources/classroom --- Sources/classroom/Client.swift | 8 +++--- Sources/classroom/Types.swift | 50 +++++++++++++++++----------------- 2 files changed, 29 insertions(+), 29 deletions(-) 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): From 756cbf81f22c18ac382438ceccbede452a35dba8 Mon Sep 17 00:00:00 2001 From: Wei18 Date: Tue, 1 Oct 2024 01:20:47 +0000 Subject: [PATCH 36/36] Remove submodule --- .gitmodules | 4 ---- Submodule/github/rest-api-description | 1 - 2 files changed, 5 deletions(-) delete mode 160000 Submodule/github/rest-api-description diff --git a/.gitmodules b/.gitmodules index cfdc733eb75..e69de29bb2d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "Submodule/github/rest-api-description"] - path = Submodule/github/rest-api-description - url = https://github.com/github/rest-api-description.git - shallow = true diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description deleted file mode 160000 index aa5e982025e..00000000000 --- a/Submodule/github/rest-api-description +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa5e982025ea1f38241ba0319f72b512abf51896