Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "policy-bot", Short: "A bot for defining and enforcing policy on Github pull requests.", Long: "A bot for defining and enforcing policy on Github pull requests.", SilenceUsage: true, }
RootCmd represents the base command when called without any subcommands
View Source
var ServerCmd = &cobra.Command{
Use: "server",
Short: "Runs policy-bot in server mode.",
Long: "Runs policy-bot in a long-running server mode, receiving and responding to webhooks.",
RunE: serverCmd,
}
View Source
var TestCmd = &cobra.Command{
Use: "test",
Short: "Evaluates a policy against local scenario fixtures without calling GitHub.",
Long: "Evaluates a local policy file against one or more scenario fixtures and checks that each\n" +
"scenario produces the expected result. Scenarios describe a pull request (author, labels,\n" +
"reviews, changed files, and so on) entirely offline, so policies can be unit tested in CI.\n" +
"Remote policy references are not supported.",
RunE: testCmd,
}
View Source
var ValidationCmd = &cobra.Command{
Use: "validate",
Short: "Validates the syntax and structure of a policy file.",
Long: "Validates the YAML syntax and logical structure of a standalone policy file, including slots, without fetching remote policies. Remote references receive syntax-only validation; policies using approval_extends require authenticated simulation.",
RunE: validationCmd,
}
Functions ¶
func IsDebugMode ¶
func IsDebugMode() bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.