policy

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePolicy

func ParsePolicy(c *Config) (common.Evaluator, error)

Types

type Config

type Config struct {
	Policy        Policy           `yaml:"policy"`
	ApprovalRules []*approval.Rule `yaml:"approval_rules"`
}

type Policy

type Policy struct {
	Approval    approval.Policy     `yaml:"approval"`
	Disapproval *disapproval.Policy `yaml:"disapproval"`
}

type RemoteConfig

type RemoteConfig struct {
	Remote string `yaml:"remote"`
	Path   string `yaml:"path"`
	Ref    string `yaml:"ref"`
}

RemoteConfig allows the use of a remote policy file, rather than a local one. The Remote value should follow the format `org/repo`. An example: `palantir/policy-bot`. The Path is optional, with the default value being the configured default policy file location. The Ref is optional, and the default branch of the Remote repository will be used.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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