Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePolicy ¶
func ParsePolicy(c *Config, opts *GlobalOptions) (common.Evaluator, error)
Types ¶
type GlobalOptions ¶ added in v1.38.0
type GlobalOptions struct {
// IgnoreEditedComments, if non-nil, overrides the value of this option in
// all rules. If true, editing a comment will invalidate the comment for
// approval in all policies.
IgnoreEditedComments *bool
// ApprovalDefaults defines server-level default values for policies. For
// instance, this can change the default approval strings for all policies.
ApprovalDefaults *approval.Defaults
}
GlobalOptions defines server-level properties that affect policy parsing, like default or override values.
type Policy ¶
type Policy struct {
Approval approval.Policy `yaml:"approval,omitempty"`
Disapproval *disapproval.Policy `yaml:"disapproval,omitempty"`
}
type RemoteConfig ¶
type RemoteConfig struct {
Remote string `yaml:"remote,omitempty"`
Path string `yaml:"path,omitempty"`
Ref string `yaml:"ref,omitempty"`
}
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.
Click to show internal directories.
Click to hide internal directories.