From 90cd347e5584f9e370f39ede6305af8915217e0e Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:34:43 -0600 Subject: [PATCH] fix(webhook): use correct repo variable for enqueue (#1234) --- api/webhook/post.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/webhook/post.go b/api/webhook/post.go index 07cc51be6..f71dd7eb2 100644 --- a/api/webhook/post.go +++ b/api/webhook/post.go @@ -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 @@ -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)