Help us shape the future of Go! Take the 2026 Go Developer Survey

policy

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package policy decides whether a reviewed PR may be approved automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decision

type Decision struct {
	Eligible bool
	// Waiting: not eligible now, but only for reasons that can change on this
	// commit (CI, draft, a human's requested changes), so re-check later.
	Waiting bool
	Reasons []string
}

func Evaluate

func Evaluate(c config.AutoApprove, in Input) Decision

Evaluate applies the [auto_approve] rules. CI counts as green when GitHub reports SUCCESS, or when there are no checks and no_checks_is_green is set.

func (Decision) Summary

func (d Decision) Summary() string

type Input

type Input struct {
	PR       github.PR
	Verdict  string
	Comments []agent.InlineComment
}

Jump to

Keyboard shortcuts

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