Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Policy eval generification #32

Merged
merged 14 commits into from
Jan 3, 2024
Merged

Policy eval generification #32

merged 14 commits into from
Jan 3, 2024

Conversation

rnorton5432
Copy link
Contributor

@rnorton5432 rnorton5432 commented Dec 25, 2023

This PR is mostly deletions following off of #30.

I have removed most of the policy-specific result types like GetPackagesResult and replaced them with generic query methods. Each downstream policy repository should define its own queries and query types to match its needs.

The split of async/subscription/local skill handlers have been merged into a single one. This should reduce effort required when a change needs to affect all of them. Each capability is now selected as an option when creating the handler. Depending on which options are enabled, things like where the subscription data comes from or whether or not to transact are determined via hooks into the main flow.

As a demonstration of what this PR would look like when consumed, the "No Stale Base Images" and "Approved Base Images" policies have been converted at atomist-skills/policy-base-images.

A template repository which can be used to generate new policy repositories is at atomist-skills/template-go-policy.

@rnorton5432 rnorton5432 force-pushed the policy-eval-generification branch 3 times, most recently from 66dd269 to 7393938 Compare December 27, 2023 21:36
@chrispatrick
Copy link
Collaborator

Looking pretty good! Just added a handful of comments 🙂

@rnorton5432 rnorton5432 merged commit 9cb1585 into main Jan 3, 2024
2 checks passed
@cdupuis cdupuis deleted the policy-eval-generification branch February 2, 2024 16:47
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