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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions Sources/actions/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7855,6 +7855,10 @@ public enum Components {
///
/// - Remark: Generated from `#/components/schemas/selected-actions-url`.
public typealias SelectedActionsUrl = Swift.String
/// Whether actions must be pinned to a full-length commit SHA.
///
/// - Remark: Generated from `#/components/schemas/sha-pinning-required`.
public typealias ShaPinningRequired = Swift.Bool
/// - Remark: Generated from `#/components/schemas/actions-organization-permissions`.
public struct ActionsOrganizationPermissions: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/actions-organization-permissions/enabled_repositories`.
Expand All @@ -7867,29 +7871,35 @@ public enum Components {
public var allowedActions: Components.Schemas.AllowedActions?
/// - Remark: Generated from `#/components/schemas/actions-organization-permissions/selected_actions_url`.
public var selectedActionsUrl: Components.Schemas.SelectedActionsUrl?
/// - Remark: Generated from `#/components/schemas/actions-organization-permissions/sha_pinning_required`.
public var shaPinningRequired: Components.Schemas.ShaPinningRequired?
/// Creates a new `ActionsOrganizationPermissions`.
///
/// - Parameters:
/// - enabledRepositories:
/// - selectedRepositoriesUrl: The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`.
/// - allowedActions:
/// - selectedActionsUrl:
/// - shaPinningRequired:
public init(
enabledRepositories: Components.Schemas.EnabledRepositories,
selectedRepositoriesUrl: Swift.String? = nil,
allowedActions: Components.Schemas.AllowedActions? = nil,
selectedActionsUrl: Components.Schemas.SelectedActionsUrl? = nil
selectedActionsUrl: Components.Schemas.SelectedActionsUrl? = nil,
shaPinningRequired: Components.Schemas.ShaPinningRequired? = nil
) {
self.enabledRepositories = enabledRepositories
self.selectedRepositoriesUrl = selectedRepositoriesUrl
self.allowedActions = allowedActions
self.selectedActionsUrl = selectedActionsUrl
self.shaPinningRequired = shaPinningRequired
}
public enum CodingKeys: String, CodingKey {
case enabledRepositories = "enabled_repositories"
case selectedRepositoriesUrl = "selected_repositories_url"
case allowedActions = "allowed_actions"
case selectedActionsUrl = "selected_actions_url"
case shaPinningRequired = "sha_pinning_required"
}
}
/// - Remark: Generated from `#/components/schemas/actions-artifact-and-log-retention-response`.
Expand Down Expand Up @@ -9548,25 +9558,31 @@ public enum Components {
public var allowedActions: Components.Schemas.AllowedActions?
/// - Remark: Generated from `#/components/schemas/actions-repository-permissions/selected_actions_url`.
public var selectedActionsUrl: Components.Schemas.SelectedActionsUrl?
/// - Remark: Generated from `#/components/schemas/actions-repository-permissions/sha_pinning_required`.
public var shaPinningRequired: Components.Schemas.ShaPinningRequired?
/// Creates a new `ActionsRepositoryPermissions`.
///
/// - Parameters:
/// - enabled:
/// - allowedActions:
/// - selectedActionsUrl:
/// - shaPinningRequired:
public init(
enabled: Components.Schemas.ActionsEnabled,
allowedActions: Components.Schemas.AllowedActions? = nil,
selectedActionsUrl: Components.Schemas.SelectedActionsUrl? = nil
selectedActionsUrl: Components.Schemas.SelectedActionsUrl? = nil,
shaPinningRequired: Components.Schemas.ShaPinningRequired? = nil
) {
self.enabled = enabled
self.allowedActions = allowedActions
self.selectedActionsUrl = selectedActionsUrl
self.shaPinningRequired = shaPinningRequired
}
public enum CodingKeys: String, CodingKey {
case enabled
case allowedActions = "allowed_actions"
case selectedActionsUrl = "selected_actions_url"
case shaPinningRequired = "sha_pinning_required"
}
}
/// - Remark: Generated from `#/components/schemas/actions-workflow-access-to-repository`.
Expand Down Expand Up @@ -13952,21 +13968,27 @@ public enum Operations {
public var enabledRepositories: Components.Schemas.EnabledRepositories
/// - Remark: Generated from `#/paths/orgs/{org}/actions/permissions/PUT/requestBody/json/allowed_actions`.
public var allowedActions: Components.Schemas.AllowedActions?
/// - Remark: Generated from `#/paths/orgs/{org}/actions/permissions/PUT/requestBody/json/sha_pinning_required`.
public var shaPinningRequired: Components.Schemas.ShaPinningRequired?
/// Creates a new `JsonPayload`.
///
/// - Parameters:
/// - enabledRepositories:
/// - allowedActions:
/// - shaPinningRequired:
public init(
enabledRepositories: Components.Schemas.EnabledRepositories,
allowedActions: Components.Schemas.AllowedActions? = nil
allowedActions: Components.Schemas.AllowedActions? = nil,
shaPinningRequired: Components.Schemas.ShaPinningRequired? = nil
) {
self.enabledRepositories = enabledRepositories
self.allowedActions = allowedActions
self.shaPinningRequired = shaPinningRequired
}
public enum CodingKeys: String, CodingKey {
case enabledRepositories = "enabled_repositories"
case allowedActions = "allowed_actions"
case shaPinningRequired = "sha_pinning_required"
}
}
/// - Remark: Generated from `#/paths/orgs/{org}/actions/permissions/PUT/requestBody/content/application\/json`.
Expand Down Expand Up @@ -27040,21 +27062,27 @@ public enum Operations {
public var enabled: Components.Schemas.ActionsEnabled
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/permissions/PUT/requestBody/json/allowed_actions`.
public var allowedActions: Components.Schemas.AllowedActions?
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/permissions/PUT/requestBody/json/sha_pinning_required`.
public var shaPinningRequired: Components.Schemas.ShaPinningRequired?
/// Creates a new `JsonPayload`.
///
/// - Parameters:
/// - enabled:
/// - allowedActions:
/// - shaPinningRequired:
public init(
enabled: Components.Schemas.ActionsEnabled,
allowedActions: Components.Schemas.AllowedActions? = nil
allowedActions: Components.Schemas.AllowedActions? = nil,
shaPinningRequired: Components.Schemas.ShaPinningRequired? = nil
) {
self.enabled = enabled
self.allowedActions = allowedActions
self.shaPinningRequired = shaPinningRequired
}
public enum CodingKeys: String, CodingKey {
case enabled
case allowedActions = "allowed_actions"
case shaPinningRequired = "sha_pinning_required"
}
}
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/permissions/PUT/requestBody/content/application\/json`.
Expand Down
166 changes: 165 additions & 1 deletion Sources/activity/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2907,6 +2907,164 @@ public enum Components {
case totalBlocking = "total_blocking"
}
}
/// A value assigned to an issue field
///
/// - Remark: Generated from `#/components/schemas/issue-field-value`.
public struct IssueFieldValue: Codable, Hashable, Sendable {
/// Unique identifier for the issue field.
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`.
public var issueFieldId: Swift.Int64
/// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`.
public var nodeId: Swift.String
/// The data type of the issue field
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
@frozen public enum DataTypePayload: String, Codable, Hashable, Sendable, CaseIterable {
case text = "text"
case singleSelect = "single_select"
case number = "number"
case date = "date"
}
/// The data type of the issue field
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
public var dataType: Components.Schemas.IssueFieldValue.DataTypePayload
/// The value of the issue field
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
public struct ValuePayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value1`.
public var value1: Swift.String?
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value2`.
public var value2: Swift.Double?
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value3`.
public var value3: Swift.Int?
/// Creates a new `ValuePayload`.
///
/// - Parameters:
/// - value1:
/// - value2:
/// - value3:
public init(
value1: Swift.String? = nil,
value2: Swift.Double? = nil,
value3: Swift.Int? = nil
) {
self.value1 = value1
self.value2 = value2
self.value3 = value3
}
public init(from decoder: any Decoder) throws {
var errors: [any Error] = []
do {
self.value1 = try decoder.decodeFromSingleValueContainer()
} catch {
errors.append(error)
}
do {
self.value2 = try decoder.decodeFromSingleValueContainer()
} catch {
errors.append(error)
}
do {
self.value3 = try decoder.decodeFromSingleValueContainer()
} catch {
errors.append(error)
}
try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil(
[
self.value1,
self.value2,
self.value3
],
type: Self.self,
codingPath: decoder.codingPath,
errors: errors
)
}
public func encode(to encoder: any Encoder) throws {
try encoder.encodeFirstNonNilValueToSingleValueContainer([
self.value1,
self.value2,
self.value3
])
}
}
/// The value of the issue field
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
public var value: Components.Schemas.IssueFieldValue.ValuePayload?
/// Details about the selected option (only present for single_select fields)
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
public struct SingleSelectOptionPayload: Codable, Hashable, Sendable {
/// Unique identifier for the option.
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/id`.
public var id: Swift.Int64
/// The name of the option
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/name`.
public var name: Swift.String
/// The color of the option
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/color`.
public var color: Swift.String
/// Creates a new `SingleSelectOptionPayload`.
///
/// - Parameters:
/// - id: Unique identifier for the option.
/// - name: The name of the option
/// - color: The color of the option
public init(
id: Swift.Int64,
name: Swift.String,
color: Swift.String
) {
self.id = id
self.name = name
self.color = color
}
public enum CodingKeys: String, CodingKey {
case id
case name
case color
}
}
/// Details about the selected option (only present for single_select fields)
///
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
public var singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload?
/// Creates a new `IssueFieldValue`.
///
/// - Parameters:
/// - issueFieldId: Unique identifier for the issue field.
/// - nodeId:
/// - dataType: The data type of the issue field
/// - value: The value of the issue field
/// - singleSelectOption: Details about the selected option (only present for single_select fields)
public init(
issueFieldId: Swift.Int64,
nodeId: Swift.String,
dataType: Components.Schemas.IssueFieldValue.DataTypePayload,
value: Components.Schemas.IssueFieldValue.ValuePayload? = nil,
singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload? = nil
) {
self.issueFieldId = issueFieldId
self.nodeId = nodeId
self.dataType = dataType
self.value = value
self.singleSelectOption = singleSelectOption
}
public enum CodingKeys: String, CodingKey {
case issueFieldId = "issue_field_id"
case nodeId = "node_id"
case dataType = "data_type"
case value
case singleSelectOption = "single_select_option"
}
}
/// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.
///
/// - Remark: Generated from `#/components/schemas/issue`.
Expand Down Expand Up @@ -3141,6 +3299,8 @@ public enum Components {
public var subIssuesSummary: Components.Schemas.SubIssuesSummary?
/// - Remark: Generated from `#/components/schemas/issue/issue_dependencies_summary`.
public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary?
/// - Remark: Generated from `#/components/schemas/issue/issue_field_values`.
public var issueFieldValues: [Components.Schemas.IssueFieldValue]?
/// Creates a new `Issue`.
///
/// - Parameters:
Expand Down Expand Up @@ -3181,6 +3341,7 @@ public enum Components {
/// - reactions:
/// - subIssuesSummary:
/// - issueDependenciesSummary:
/// - issueFieldValues:
public init(
id: Swift.Int64,
nodeId: Swift.String,
Expand Down Expand Up @@ -3218,7 +3379,8 @@ public enum Components {
authorAssociation: Components.Schemas.AuthorAssociation,
reactions: Components.Schemas.ReactionRollup? = nil,
subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil,
issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil
issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil,
issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil
) {
self.id = id
self.nodeId = nodeId
Expand Down Expand Up @@ -3257,6 +3419,7 @@ public enum Components {
self.reactions = reactions
self.subIssuesSummary = subIssuesSummary
self.issueDependenciesSummary = issueDependenciesSummary
self.issueFieldValues = issueFieldValues
}
public enum CodingKeys: String, CodingKey {
case id
Expand Down Expand Up @@ -3296,6 +3459,7 @@ public enum Components {
case reactions
case subIssuesSummary = "sub_issues_summary"
case issueDependenciesSummary = "issue_dependencies_summary"
case issueFieldValues = "issue_field_values"
}
}
/// Comments provide a way for people to collaborate on an issue.
Expand Down
4 changes: 2 additions & 2 deletions Sources/dependabot/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ public struct Client: APIProtocol {
in: &request,
style: .form,
explode: true,
name: "artifact_registry_url",
value: input.query.artifactRegistryUrl
name: "package_registry_url",
value: input.query.packageRegistryUrl
)
try converter.setQueryItemAsURI(
in: &request,
Expand Down
Loading