Documentation
¶
Overview ¶
Package gate is the diff gate (ADR-007): before ynf pushes anything, the changed paths must be inside the lane's allowed paths and outside every protected path. It catches what a runner's own tamper checks cannot: changes to the files that judge the change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Protected = []string{
".github/workflows/**",
".github/actions/**",
"**/CODEOWNERS",
".agents/**",
".ynh/**",
".ynm/**",
".ynf/**",
}
Protected are refused in every lane: CI, ownership, and every folder that holds ynf, ynh or ynm configuration, including the lane policy itself.
Functions ¶
func Check ¶
Check returns an error naming every path the gate refuses. An empty allowed list allows all.
func CheckKinds ¶ added in v0.3.0
CheckKinds is Check with append-only paths: a path matching one may be added, never modified, deleted or renamed (a rename is a deletion and an addition). Protected paths and the allowed list are judged first, so an append-only path is not a way round either.