From ce462ce4ac2259c5cacb233ec6843c78438d762e Mon Sep 17 00:00:00 2001 From: Anbraten Date: Sun, 19 Dec 2021 00:23:48 +0100 Subject: [PATCH] fix new build not published to UI if blocked mode enabled (#619) --- server/api/hook.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/api/hook.go b/server/api/hook.go index eb013b9d3..ef1439fd7 100644 --- a/server/api/hook.go +++ b/server/api/hook.go @@ -180,7 +180,7 @@ func PostHook(c *gin.Context) { configFetcher := shared.NewConfigFetcher(server.Config.Services.Remote, repoUser, repo, build) remoteYamlConfigs, err := configFetcher.Fetch(c) if err != nil { - msg := fmt.Sprintf("cannot find '%s' in '%s', context user: '%s'", repo.Config, build.Ref, repoUser.Login) + msg := fmt.Sprintf("cannot find config '%s' in '%s' with user: '%s'", repo.Config, build.Ref, repoUser.Login) log.Debug().Err(err).Str("repo", repo.FullName).Msg(msg) c.String(http.StatusNotFound, msg) return @@ -237,6 +237,10 @@ func PostHook(c *gin.Context) { } if build.Status == model.StatusBlocked { + if err := publishToTopic(c, build, repo, model.Enqueued); err != nil { + log.Error().Err(err).Msg("publishToTopic") + } + c.JSON(http.StatusOK, build) return }