...

Package policy

import "edge-infra.dev/pkg/f8n/devinfra/repo/owners/policybot/policy"
Overview
Index
Subdirectories

Overview ▾

func ParsePolicy

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

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

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.

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

Subdirectories