Skip to content

Commit

Permalink
🐛 Pass proper commit depth to github checkrun handler. (#2777)
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <sschrock@google.com>
  • Loading branch information
spencerschrock committed Mar 21, 2023
1 parent 9a51f25 commit 7f2e840
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clients/githubrepo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ func (client *Client) InitRepo(inputRepo clients.Repo, commitSHA string, commitD
return sce.WithMessage(sce.ErrRepoUnreachable, err.Error())
}
if commitDepth <= 0 {
client.commitDepth = 30 // default
} else {
client.commitDepth = commitDepth
commitDepth = 30 // default
}
client.commitDepth = commitDepth
client.repo = repo
client.repourl = &repoURL{
owner: repo.Owner.GetLogin(),
Expand Down Expand Up @@ -103,7 +102,7 @@ func (client *Client) InitRepo(inputRepo clients.Repo, commitSHA string, commitD
client.workflows.init(client.ctx, client.repourl)

// Setup checkrunsHandler.
client.checkruns.init(client.ctx, client.repourl, commitDepth)
client.checkruns.init(client.ctx, client.repourl, client.commitDepth)

// Setup statusesHandler.
client.statuses.init(client.ctx, client.repourl)
Expand Down

0 comments on commit 7f2e840

Please sign in to comment.