Skip to content

Commit

Permalink
fix(webhook): use correct repo variable for enqueue (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored and TimHuynh committed Jan 17, 2025
1 parent 68547d6 commit c7c1d0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/webhook/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,9 @@ func PostWebhook(c *gin.Context) {

if shouldEnqueue {
// send API call to set the status on the commit
err := scm.FromContext(c).Status(c.Request.Context(), r.GetOwner(), b, r.GetOrg(), r.GetName())
err := scm.FromContext(c).Status(c.Request.Context(), repo.GetOwner(), b, repo.GetOrg(), repo.GetName())
if err != nil {
l.Errorf("unable to set commit status for %s/%d: %v", r.GetFullName(), b.GetNumber(), err)
l.Errorf("unable to set commit status for %s/%d: %v", repo.GetFullName(), b.GetNumber(), err)
}

// publish the build to the queue
Expand All @@ -576,7 +576,7 @@ func PostWebhook(c *gin.Context) {
b.GetHost(),
)
} else {
err := build.GatekeepBuild(c, b, r)
err := build.GatekeepBuild(c, b, repo)
if err != nil {
retErr := fmt.Errorf("unable to gate build: %w", err)
util.HandleError(c, http.StatusInternalServerError, err)
Expand Down

0 comments on commit c7c1d0a

Please sign in to comment.