forgejo: report digger/apply as green when the plan is empty #3
Loading…
Reference in a new issue
No description provided.
Delete branch "simlau/empty-plan-apply-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Branch protection on levior repos requires digger/plan and digger/apply. digger/apply only comes from a
digger applycomment, which Forgejo runs from the default branch's workflow. So a new repo's first PR (levior/openbao #1: main has no digger workflow yet) can never get it, and PRs with nothing to apply need a pointless apply.After a successful plan that covers every impacted project, and when every plan is strictly empty, Digger now also sets digger/apply = success ("nothing to apply: the plan is empty"). No auto-merge in that case; a person merges.
"Strictly empty" is read from
tofu show -json: every resource change is no-op (or read for data sources) with no importing and no previous_address, and every output change is no-op. Imports, moves, forgets and output changes count as something to apply. Unparseable JSON, a project without a plan result, or no results count as not empty.RunJobs keeps its signature (RunJobsWithResults beside it); the github and spec paths are untouched.
Opened by simlau@gmail.com with
levior pr create.