Allow to use only PR commits #4

Merged
fyrchik merged 5 commits from only-pr-commits into master 2024-09-04 19:51:22 +00:00
Showing only changes of commit 102e7d41c0 - Show all commits

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)
}
}