Skip to content

Commit

Permalink
feat!: Rename DeploymentAction to DeploymentActionSlug for external f…
Browse files Browse the repository at this point in the history
…eed trigger packages (#245)

* feat!: rename DeploymentAction to DeploymentActionSlug for feed trigger packages

* feat: add trigger types for external feed triggers to spec
  • Loading branch information
kevjt authored May 1, 2024
1 parent 55cc5a1 commit e16546f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
6 changes: 4 additions & 2 deletions api/octopus_deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -38987,7 +38987,8 @@
"AutoDeploy",
"DeployLatestRelease",
"DeployNewRelease",
"RunRunbook"
"RunRunbook",
"CreateRelease"
],
"type": "string",
"readOnly": true
Expand Down Expand Up @@ -39021,7 +39022,8 @@
"DaysPerMonthSchedule",
"DaysPerWeekSchedule",
"MachineFilter",
"OnceDailySchedule"
"OnceDailySchedule",
"FeedFilter"
],
"type": "string",
"readOnly": true
Expand Down
6 changes: 4 additions & 2 deletions api/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9804,7 +9804,8 @@
"AutoDeploy",
"DeployLatestRelease",
"DeployNewRelease",
"RunRunbook"
"RunRunbook",
"CreateRelease"
],
"type": "string"
},
Expand Down Expand Up @@ -9840,7 +9841,8 @@
"DaysPerMonthSchedule",
"CronExpressionSchedule",
"OnceDailySchedule",
"ContinuousDailySchedule"
"ContinuousDailySchedule",
"FeedFilter"
],
"type": "string"
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/filters/feed_trigger_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package filters
import "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/packages"

type FeedTriggerFilter struct {
Packages []packages.DeploymentActionPackage `json:"Packages,omitempty"`
Packages []packages.DeploymentActionSlugPackage `json:"Packages,omitempty"`

triggerFilter
}

func NewFeedTriggerFilter(packages []packages.DeploymentActionPackage) *FeedTriggerFilter {
func NewFeedTriggerFilter(packages []packages.DeploymentActionSlugPackage) *FeedTriggerFilter {
return &FeedTriggerFilter{
Packages: packages,
triggerFilter: *newTriggerFilter(FeedFilter),
Expand Down
6 changes: 6 additions & 0 deletions pkg/packages/deployment_action_slug_package.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package packages

type DeploymentActionSlugPackage struct {
DeploymentActionSlug string `json:"DeploymentActionSlug,omitempty"`
PackageReference string `json:"PackageReference,omitempty"`
}

0 comments on commit e16546f

Please sign in to comment.