Rename PR head variable

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-07-13 11:51:00 +03:00
parent 3ba16336e5
commit 102e7d41c0

View file

@ -25,13 +25,13 @@ func main() {
}
// Retrieve the commit history.
ref, err := r.Head()
head, err := r.Head()
if err != nil {
log.Fatalf("Failed to retrieve HEAD reference: %v", err)
}
// Create iterator over commits.
commits, err := r.Log(&git.LogOptions{From: ref.Hash()})
commits, err := r.Log(&git.LogOptions{From: head.Hash()})
if err != nil {
log.Fatalf("Failed to retrieve commit history: %v", err)
}
@ -81,4 +81,3 @@ func main() {
os.Exit(1)
}
}