Skip to content

Introduce API for adding new platform hub compliance policy#406

Open
denys-octopus wants to merge 1 commit intomainfrom
mas/add-platform-hub-policies
Open

Introduce API for adding new platform hub compliance policy#406
denys-octopus wants to merge 1 commit intomainfrom
mas/add-platform-hub-policies

Conversation

@denys-octopus
Copy link
Contributor

@denys-octopus denys-octopus commented Mar 6, 2026

Background

We want to allow user to manage compliance policies via go-client.

Part of MAS-6 (I want to create a new policy in Platform Hub)

Result

This PR introduces new package with exposed function to add new compliance policy. Other functionalities will be added in next pull requests.

ScopeRego string `json:"ScopeRego" validate:"required,notblank"`
ConditionsRego string `json:"ConditionsRego" validate:"required,notblank"`
ViolationReason string `json:"ViolationReason,omitempty"`
ViolationAction string `json:"ViolationAction" validate:"required,notblank"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to have a dedicated type for ViolationAction, because it can have only two values "Block" and "Warn", but decided to keep it a string, so we can add new actions in Octopus Deploy without breaking go-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant