You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today one can only validate .policy.yml by running a policy-bot service, and allowing whoever needs to validate to invoke the /api/validate HTTP endpoint. But the network path isn't necessarily available from every host that wants to validate the config.
Policy-bot should provide a basic cli command to validate a .policy.yml. Eg.: policy-bot validate .policy.yml. This way validation can be done fully offline (eg. no network path necessary to a policy-bot service instance).
Alternatives considered
I've considered running policy-bot locally in a github action as a service container. But I cannot just launch the container because on startup it requires a valid github app configuration, Which is overkill and hurts reuse if I want to just use it for config validation.
I also considered declaring a schema for the .policy.yml and use json schema validation. But that doesn't validate the regexes for validity.
A simple cli command to validate config would be easier on the end-users.
Context
I'm building a github action to validate .policy.yml. I don't want my action to have to call out to a policy-bot service to perform validation, as it makes the action more complex. I don't want my github action runners to have a clear network path to the policy-bot service if it's not absolutely necessary.
The text was updated successfully, but these errors were encountered:
Today one can only validate
.policy.yml
by running a policy-bot service, and allowing whoever needs to validate to invoke the/api/validate
HTTP endpoint. But the network path isn't necessarily available from every host that wants to validate the config.Policy-bot should provide a basic cli command to validate a
.policy.yml
. Eg.:policy-bot validate .policy.yml
. This way validation can be done fully offline (eg. no network path necessary to a policy-bot service instance).Alternatives considered
I've considered running policy-bot locally in a github action as a service container. But I cannot just launch the container because on startup it requires a valid github app configuration, Which is overkill and hurts reuse if I want to just use it for config validation.
I also considered declaring a schema for the
.policy.yml
and use json schema validation. But that doesn't validate the regexes for validity.A simple cli command to validate config would be easier on the end-users.
Context
I'm building a github action to validate
.policy.yml
. I don't want my action to have to call out to a policy-bot service to perform validation, as it makes the action more complex. I don't want my github action runners to have a clear network path to the policy-bot service if it's not absolutely necessary.The text was updated successfully, but these errors were encountered: