Skip to content

Commit

Permalink
auto bumper: Fix in case there is only one page (#1817)
Browse files Browse the repository at this point in the history
We first need to consume the page, then to break if this is the last
page, else we would directly fail.

Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval authored Jun 28, 2024
1 parent 00218f6 commit 5680257
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/bumper/component_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,16 @@ func (componentOps *gitComponent) getLatestTaggedFromBranch(repo, owner, branch,
if err != nil {
return "", "", errors.Wrap(err, "Failed to get release tag refs from github client API")
}
if resp.NextPage == 0 {
break
}

for _, commit := range branchCommits {
if commit.GetSHA() == commitShaOfTag {
return tagName, commit.GetSHA(), nil
}
}

if resp.NextPage == 0 {
break
}
}
}

Expand Down

0 comments on commit 5680257

Please sign in to comment.