cmd

package
v1.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL