Skip to content

Modify and Get operations for platform hub policy#407

Merged
denys-octopus merged 3 commits intomas/add-platform-hub-policiesfrom
mas/modify-platform-hub-policies
Mar 11, 2026
Merged

Modify and Get operations for platform hub policy#407
denys-octopus merged 3 commits intomas/add-platform-hub-policiesfrom
mas/modify-platform-hub-policies

Conversation

@denys-octopus
Copy link
Contributor

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

Background

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

Part of MAS-6
I want to read the contents of a policy in Platform Hub
I want to modify a policy in Platform Hub
I want to output the entire list of policies in Platform Hub

Result

Introduce Update , Get and GetBySlug functions in the platformhubpolicies package

@denys-octopus denys-octopus force-pushed the mas/modify-platform-hub-policies branch from fb7ba9d to d495e0d Compare March 10, 2026 01:08
@denys-octopus denys-octopus changed the title Add Platform hub policy modify operation Modify operation for platform hub policy Mar 10, 2026
@denys-octopus denys-octopus changed the title Modify operation for platform hub policy Modify and Get operations for platform hub policy Mar 10, 2026
Copy link

@shaun-od shaun-od left a comment

Choose a reason for hiding this comment

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

LGTM if the PR is, with the caveat that it doesn't need a review from the Owners.

require.Empty(t, nilPath)

// Invalid policy
invalidPolicy := &PlatformHubPolicy{Name: "Invalid", GitRef: ""}

Choose a reason for hiding this comment

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

I wonder if this should be a separate test

@denys-octopus denys-octopus merged commit 5fba0fc into mas/add-platform-hub-policies Mar 11, 2026
6 checks passed
@denys-octopus denys-octopus deleted the mas/modify-platform-hub-policies branch March 11, 2026 03:59
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.

2 participants