Add background audits of the default branch's newest commit
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user