Skip to content

Commit

Permalink
Merge pull request #692 from prometheus/return-error-fix
Browse files Browse the repository at this point in the history
getLastCommitSHA: fix error message
  • Loading branch information
bboreham authored Jun 20, 2024
2 parents d40a0e7 + 00a5a5f commit 34a189d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/commentMonitor/ghclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c githubClient) getLastCommitSHA() (string, error) {
listops := &github.ListOptions{Page: 1, PerPage: 250}
l, _, err := c.clt.PullRequests.ListCommits(c.ctx, c.owner, c.repo, c.pr, listops)
if err != nil {
return "", fmt.Errorf("ListCommits(%q,%q,%q): %w", c.owner, c.repo, c.pr, err)
return "", fmt.Errorf("ListCommits(%q,%q,%d): %w", c.owner, c.repo, c.pr, err)
}
if len(l) == 0 {
return "", fmt.Errorf("pr does not have a commit")
Expand Down

0 comments on commit 34a189d

Please sign in to comment.