diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 909635049d0..045abfb4562 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -5528,6 +5528,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -5535,22 +5557,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 34219d0ef17..3ce59e162af 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -3493,6 +3493,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -3500,22 +3522,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 1060b596e65..b19df27f944 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -1086,6 +1086,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1093,22 +1115,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/code-security/Client.swift b/Sources/code-security/Client.swift index 03d06cab2f8..c7c472015bd 100644 --- a/Sources/code-security/Client.swift +++ b/Sources/code-security/Client.swift @@ -369,6 +369,161 @@ public struct Client: APIProtocol { } ) } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_detach_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/detach", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 4f3dec2e9da..2243d502a7a 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -44,6 +44,18 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -181,6 +193,28 @@ extension APIProtocol { headers: headers )) } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await code_hyphen_security_sol_detach_hyphen_configuration(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -1039,6 +1073,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - 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 private vulnerability reporting /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. @@ -1051,6 +1097,17 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. public var private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + public var enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? /// The URL of the configuration /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/url`. @@ -1077,7 +1134,9 @@ public enum Components { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - 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 /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The enforcement status for a security configuration /// - url: The URL of the configuration /// - html_url: The URL of the configuration /// - created_at: @@ -1094,7 +1153,9 @@ public enum Components { code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, 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, 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, html_url: Swift.String? = nil, created_at: Foundation.Date? = nil, @@ -1111,7 +1172,9 @@ public enum Components { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement self.url = url self.html_url = html_url self.created_at = created_at @@ -1129,7 +1192,9 @@ public enum Components { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement case url case html_url case created_at @@ -1770,6 +1835,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - 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 private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. @@ -1782,6 +1859,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? /// Creates a new `jsonPayload`. /// /// - Parameters: @@ -1794,7 +1882,9 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - 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 /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The status of enforcement public init( name: Swift.String, description: Swift.String, @@ -1805,7 +1895,9 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, 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, - private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = 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 ) { self.name = name self.description = description @@ -1816,7 +1908,9 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement } public enum CodingKeys: String, CodingKey { case name @@ -1828,7 +1922,9 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -1868,10 +1964,18 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_validity_checks = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, + forKey: .secret_scanning_validity_checks + ) 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 ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "name", "description", @@ -1882,7 +1986,9 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", - "private_vulnerability_reporting" + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" ]) } } @@ -2194,6 +2300,249 @@ public enum Operations { } } } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public enum code_hyphen_security_sol_detach_hyphen_configuration { + public static let id: Swift.String = "code-security/detach-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// An array of repository IDs to detach from configurations. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - selected_repository_ids: An array of repository IDs to detach from configurations. + public init(selected_repository_ids: [Swift.Int]? = nil) { + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case selected_repository_ids + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + selected_repository_ids = try container.decodeIfPresent( + [Swift.Int].self, + forKey: .selected_repository_ids + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "selected_repository_ids" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Conflict + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Components.Responses.conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Components.Responses.conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -2552,6 +2901,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - 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 private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. @@ -2564,6 +2925,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? /// Creates a new `jsonPayload`. /// /// - Parameters: @@ -2576,7 +2948,9 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - 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 /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The status of enforcement public init( name: Swift.String? = nil, description: Swift.String? = nil, @@ -2587,7 +2961,9 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, 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, - private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = 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 ) { self.name = name self.description = description @@ -2598,7 +2974,9 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement } public enum CodingKeys: String, CodingKey { case name @@ -2610,7 +2988,9 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -2650,10 +3030,18 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_validity_checks = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, + forKey: .secret_scanning_validity_checks + ) 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 ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "name", "description", @@ -2664,7 +3052,9 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", - "private_vulnerability_reporting" + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" ]) } } diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index a8a344dfdbd..1ecce119c17 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -2822,6 +2822,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2829,22 +2851,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 0345e957af1..3e93aff0c8b 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -2287,6 +2287,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2294,22 +2316,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 3b6c5a8c62d..46c861f1dec 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -2131,6 +2131,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2138,22 +2160,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index d025132e07c..e4804752110 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -134,17 +134,6 @@ public struct Client: APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -235,18 +224,9 @@ public struct Client: APIProtocol { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 7a3f4dc6f4c..ac9573b07f7 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -28,17 +28,6 @@ public protocol APIProtocol: Sendable { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -50,18 +39,9 @@ public protocol APIProtocol: Sendable { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -846,17 +826,6 @@ extension APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -876,18 +845,9 @@ extension APIProtocol { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -4687,6 +4647,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -4694,22 +4676,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -5468,46 +5454,59 @@ public enum Components { public var members_can_fork_private_repositories: Swift.Bool? /// - Remark: Generated from `#/components/schemas/organization-full/web_commit_signoff_required`. public var web_commit_signoff_required: Swift.Bool? + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. + @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// to this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. + @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// transferred to this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// @@ -5572,12 +5571,12 @@ public enum Components { /// - members_can_create_private_pages: /// - members_can_fork_private_repositories: /// - web_commit_signoff_required: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - dependabot_alerts_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// - dependabot_security_updates_enabled_for_new_repositories: Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories and repositories + /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: An optional URL string to display to contributors who are blocked from pushing a secret. /// - created_at: @@ -7692,17 +7691,6 @@ public enum Operations { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -7862,18 +7850,9 @@ public enum Operations { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -8016,53 +7995,71 @@ public enum Operations { public var web_commit_signoff_required: Swift.Bool? /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/blog`. public var blog: Swift.String? - /// Whether GitHub Advanced Security is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/advanced_security_enabled_for_new_repositories`. + @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether Dependabot alerts is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_alerts_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether Dependabot security updates is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_security_updates_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependency_graph_enabled_for_new_repositories`. + @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// @@ -8096,12 +8093,12 @@ public enum Operations { /// - members_can_fork_private_repositories: Whether organization members can fork private organization repositories. /// - web_commit_signoff_required: Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. /// - blog: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories. - /// - dependabot_alerts_enabled_for_new_repositories: Whether Dependabot alerts is automatically enabled for new repositories. - /// - dependabot_security_updates_enabled_for_new_repositories: Whether Dependabot security updates is automatically enabled for new repositories. - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories. - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories. - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories. + /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. public init( diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index 155b7d5360f..097e4b06541 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -1281,6 +1281,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1288,22 +1310,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index b5ed2955722..719cf194fee 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -2766,6 +2766,16 @@ public enum Components { case rocket } } + /// An object without any properties. + /// + /// - Remark: Generated from `#/components/schemas/empty-object`. + public struct empty_hyphen_object: Codable, Hashable, Sendable { + /// Creates a new `empty_hyphen_object`. + public init() {} + public init(from decoder: any Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/team-simple`. @@ -3121,9 +3131,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? + /// - Remark: Generated from `#/components/schemas/commit/committer`. + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -3211,8 +3291,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 0470ec86c92..99a89ff539b 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -8604,6 +8604,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -8611,22 +8633,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -14953,9 +14979,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? + /// - Remark: Generated from `#/components/schemas/commit/committer`. + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -15043,8 +15139,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil @@ -24875,25 +24971,52 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// Can be `enabled` or `disabled`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns/status`. + public var status: Swift.String? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: Can be `enabled` or `disabled`. + public init(status: Swift.String? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_and_analysisPayload`. /// /// - Parameters: /// - advanced_security: Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." /// - secret_scanning: Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." /// - secret_scanning_push_protection: Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + /// - secret_scanning_non_provider_patterns: Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." public init( advanced_security: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.advanced_securityPayload? = nil, secret_scanning: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanningPayload? = nil, - secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Specify which security and analysis features to enable or disable for the repository. @@ -27250,7 +27373,7 @@ public enum Operations { self.body = body } } - /// Response if dependabot is enabled + /// Response if Dependabot is enabled /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/200`. /// @@ -27277,7 +27400,7 @@ public enum Operations { /// Creates a new `NotFound`. public init() {} } - /// Not Found if dependabot is not enabled for the repository + /// Not Found if Dependabot is not enabled for the repository /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/404`. /// diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 09ed2c2ba3b..7fc0a2ed1d2 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -2132,6 +2132,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2139,22 +2161,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 343a885a89e..44c750f8be3 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -2888,6 +2888,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2895,22 +2917,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// A repository on GitHub. diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 3c20991e57a..81bdd6ed5e7 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -2817,6 +2817,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2824,22 +2846,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index fd544c2b878..3e3e13801b9 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit fd544c2b878458798c8af979affb0407da2ef34e +Subproject commit 3e3e13801b9b2cb62958385c2a70b15f2eae4b88