diff --git a/.spi.yml b/.spi.yml index 7a1c48df9f..c5f8ce72ee 100644 --- a/.spi.yml +++ b/.spi.yml @@ -9,6 +9,7 @@ builder: - GitHubRestAPIChecks - GitHubRestAPIClassroom - GitHubRestAPICode_Scanning + - GitHubRestAPICode_Security - GitHubRestAPICodes_Of_Conduct - GitHubRestAPICodespaces - GitHubRestAPICopilot diff --git a/Package.swift b/Package.swift index 44928c1d42..abb5eac1ca 100644 --- a/Package.swift +++ b/Package.swift @@ -18,6 +18,7 @@ let package = Package( .library(name: "GitHubRestAPIChecks", targets: ["GitHubRestAPIChecks"]), .library(name: "GitHubRestAPIClassroom", targets: ["GitHubRestAPIClassroom"]), .library(name: "GitHubRestAPICode_Scanning", targets: ["GitHubRestAPICode_Scanning"]), + .library(name: "GitHubRestAPICode_Security", targets: ["GitHubRestAPICode_Security"]), .library(name: "GitHubRestAPICodes_Of_Conduct", targets: ["GitHubRestAPICodes_Of_Conduct"]), .library(name: "GitHubRestAPICodespaces", targets: ["GitHubRestAPICodespaces"]), .library(name: "GitHubRestAPICopilot", targets: ["GitHubRestAPICopilot"]), @@ -111,6 +112,14 @@ let package = Package( ], path: "Sources/code-scanning" ), + .target( + name: "GitHubRestAPICode_Security", + dependencies: [ + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"), + ], + path: "Sources/code-security" + ), .target( name: "GitHubRestAPICodes_Of_Conduct", dependencies: [ diff --git a/Sources/code-security/Client.swift b/Sources/code-security/Client.swift new file mode 100644 index 0000000000..87202523ac --- /dev/null +++ b/Sources/code-security/Client.swift @@ -0,0 +1,41 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +import HTTPTypes +/// GitHub's v3 REST API. +public struct Client: APIProtocol { + /// The underlying HTTP client. + private let client: UniversalClient + /// Creates a new client. + /// - Parameters: + /// - serverURL: The server URL that the client connects to. Any server + /// URLs defined in the OpenAPI document are available as static methods + /// on the ``Servers`` type. + /// - configuration: A set of configuration values for the client. + /// - transport: A transport that performs HTTP operations. + /// - middlewares: A list of middlewares to call before the transport. + public init( + serverURL: Foundation.URL, + configuration: Configuration = .init(), + transport: any ClientTransport, + middlewares: [any ClientMiddleware] = [] + ) { + self.client = .init( + serverURL: serverURL, + configuration: configuration, + transport: transport, + middlewares: middlewares + ) + } + private var converter: Converter { + client.converter + } +} diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift new file mode 100644 index 0000000000..2a210decbf --- /dev/null +++ b/Sources/code-security/Types.swift @@ -0,0 +1,44 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +/// A type that performs HTTP operations defined by the OpenAPI document. +public protocol APIProtocol: Sendable {} + +/// Convenience overloads for operation inputs. +extension APIProtocol { +} + +/// Server URLs defined in the OpenAPI document. +public enum Servers { + public static func server1() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } +} + +/// Types generated from the components section of the OpenAPI document. +public enum Components { + /// Types generated from the `#/components/schemas` section of the OpenAPI document. + public enum Schemas {} + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters {} + /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. + public enum RequestBodies {} + /// Types generated from the `#/components/responses` section of the OpenAPI document. + public enum Responses {} + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers {} +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations {} diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index cc50c47e61..11537e9966 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -50,10 +50,9 @@ public struct Client: APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage - /// metrics for the enterprise. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. @@ -1281,10 +1280,9 @@ public struct Client: APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view - /// Copilot usage metrics. + /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 0ce93ce87c..d8c6b23c05 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -23,10 +23,9 @@ public protocol APIProtocol: Sendable { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage - /// metrics for the enterprise. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. @@ -143,10 +142,9 @@ public protocol APIProtocol: Sendable { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view - /// Copilot usage metrics. + /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. @@ -180,10 +178,9 @@ extension APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage - /// metrics for the enterprise. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. @@ -368,10 +365,9 @@ extension APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view - /// Copilot usage metrics. + /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. @@ -1959,10 +1955,9 @@ public enum Operations { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage - /// metrics for the enterprise. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. @@ -4017,10 +4012,9 @@ public enum Operations { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view - /// Copilot usage metrics. + /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. /// - /// OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 34e664888d..ace3c8c9a6 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -2084,7 +2084,10 @@ public struct Client: APIProtocol { } /// List pending organization invitations /// - /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + /// The return hash contains a `role` field which refers to the Organization + /// Invitation role and will be one of the following values: `direct_member`, `admin`, + /// `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub + /// member, the `login` field in the return hash will be `null`. /// /// - Remark: HTTP `GET /orgs/{org}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/invitations/get(orgs/list-pending-invitations)`. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 9cb950ed27..81ae2addf4 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -266,7 +266,10 @@ public protocol APIProtocol: Sendable { func orgs_sol_list_hyphen_app_hyphen_installations(_ input: Operations.orgs_sol_list_hyphen_app_hyphen_installations.Input) async throws -> Operations.orgs_sol_list_hyphen_app_hyphen_installations.Output /// List pending organization invitations /// - /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + /// The return hash contains a `role` field which refers to the Organization + /// Invitation role and will be one of the following values: `direct_member`, `admin`, + /// `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub + /// member, the `login` field in the return hash will be `null`. /// /// - Remark: HTTP `GET /orgs/{org}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/invitations/get(orgs/list-pending-invitations)`. @@ -1242,7 +1245,10 @@ extension APIProtocol { } /// List pending organization invitations /// - /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + /// The return hash contains a `role` field which refers to the Organization + /// Invitation role and will be one of the following values: `direct_member`, `admin`, + /// `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub + /// member, the `login` field in the return hash will be `null`. /// /// - Remark: HTTP `GET /orgs/{org}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/invitations/get(orgs/list-pending-invitations)`. @@ -11384,7 +11390,10 @@ public enum Operations { } /// List pending organization invitations /// - /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + /// The return hash contains a `role` field which refers to the Organization + /// Invitation role and will be one of the following values: `direct_member`, `admin`, + /// `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub + /// member, the `login` field in the return hash will be `null`. /// /// - Remark: HTTP `GET /orgs/{org}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/invitations/get(orgs/list-pending-invitations)`. diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 9d007d851d..4fd5a8a824 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -7777,7 +7777,7 @@ public struct Client: APIProtocol { /// /// To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: /// - /// - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + /// - The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison. /// - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. /// /// For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." @@ -17329,7 +17329,10 @@ public struct Client: APIProtocol { } ) } - /// List tag protection states for a repository + /// Deprecated - List tag protection states for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -17337,6 +17340,7 @@ public struct Client: APIProtocol { /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/get(repos/list-tag-protection)`. + @available(*, deprecated) public func repos_sol_list_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_list_hyphen_tag_hyphen_protection.Output { try await client.send( input: input, @@ -17440,13 +17444,17 @@ public struct Client: APIProtocol { } ) } - /// Create a tag protection state for a repository + /// Deprecated - Create a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/post(repos/create-tag-protection)`. + @available(*, deprecated) public func repos_sol_create_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_create_hyphen_tag_hyphen_protection.Output { try await client.send( input: input, @@ -17559,13 +17567,17 @@ public struct Client: APIProtocol { } ) } - /// Delete a tag protection state for a repository + /// Deprecated - Delete a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/{tag_protection_id}/delete(repos/delete-tag-protection)`. + @available(*, deprecated) public func repos_sol_delete_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Output { try await client.send( input: input, diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f135162c84..f9a4d08a5f 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -836,7 +836,7 @@ public protocol APIProtocol: Sendable { /// /// To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: /// - /// - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + /// - The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison. /// - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. /// /// For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." @@ -1823,7 +1823,10 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/tags`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/get(repos/list-tags)`. func repos_sol_list_hyphen_tags(_ input: Operations.repos_sol_list_hyphen_tags.Input) async throws -> Operations.repos_sol_list_hyphen_tags.Output - /// List tag protection states for a repository + /// Deprecated - List tag protection states for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -1831,22 +1834,31 @@ public protocol APIProtocol: Sendable { /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/get(repos/list-tag-protection)`. + @available(*, deprecated) func repos_sol_list_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_list_hyphen_tag_hyphen_protection.Output - /// Create a tag protection state for a repository + /// Deprecated - Create a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/post(repos/create-tag-protection)`. + @available(*, deprecated) func repos_sol_create_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_create_hyphen_tag_hyphen_protection.Output - /// Delete a tag protection state for a repository + /// Deprecated - Delete a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/{tag_protection_id}/delete(repos/delete-tag-protection)`. + @available(*, deprecated) func repos_sol_delete_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Output /// Download a repository archive (tar) /// @@ -3493,7 +3505,7 @@ extension APIProtocol { /// /// To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: /// - /// - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + /// - The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison. /// - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. /// /// For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." @@ -5328,7 +5340,10 @@ extension APIProtocol { headers: headers )) } - /// List tag protection states for a repository + /// Deprecated - List tag protection states for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -5336,6 +5351,7 @@ extension APIProtocol { /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/get(repos/list-tag-protection)`. + @available(*, deprecated) public func repos_sol_list_hyphen_tag_hyphen_protection( path: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input.Path, headers: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input.Headers = .init() @@ -5345,13 +5361,17 @@ extension APIProtocol { headers: headers )) } - /// Create a tag protection state for a repository + /// Deprecated - Create a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/tags/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/post(repos/create-tag-protection)`. + @available(*, deprecated) public func repos_sol_create_hyphen_tag_hyphen_protection( path: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input.Path, headers: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input.Headers = .init(), @@ -5363,13 +5383,17 @@ extension APIProtocol { body: body )) } - /// Delete a tag protection state for a repository + /// Deprecated - Delete a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/{tag_protection_id}/delete(repos/delete-tag-protection)`. + @available(*, deprecated) public func repos_sol_delete_hyphen_tag_hyphen_protection( path: Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Input.Path, headers: Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Input.Headers = .init() @@ -38357,7 +38381,7 @@ public enum Operations { /// /// To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: /// - /// - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + /// - The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison. /// - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. /// /// For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." @@ -58465,7 +58489,10 @@ public enum Operations { } } } - /// List tag protection states for a repository + /// Deprecated - List tag protection states for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -58654,7 +58681,10 @@ public enum Operations { } } } - /// Create a tag protection state for a repository + /// Deprecated - Create a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -58868,7 +58898,10 @@ public enum Operations { } } } - /// Delete a tag protection state for a repository + /// Deprecated - Delete a tag protection state for a repository + /// + /// **Note**: This operation is deprecated and will be removed after August 30th 2024 + /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index e04c0a4453..4adfd3e5dd 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit e04c0a4453fdbc5f21f5b3275a7d480e90174875 +Subproject commit 4adfd3e5dd6abe3d8e334ba494079071d78c7fd4