Add background audits of the default branch's newest commit

This commit is contained in:
Ian Gulliver
2026-10-20 21:08:31 -07:00
parent 1d3c4576ff
commit 5823af6ff9
21 changed files with 745 additions and 357 deletions
+4
View File
@@ -326,6 +326,10 @@ func Head(dir string) (string, error) {
return run(dir, "rev-parse", "HEAD")
}
func BranchHead(repo, branch string) (string, error) {
return run(repo, "rev-parse", "--verify", "refs/heads/"+branch+"^{commit}")
}
func IsAncestor(dir, ancestor, descendant string) (bool, error) {
_, stderr, code, err := runCode(dir, nil, "merge-base", "--is-ancestor", ancestor, descendant)
if err != nil {