mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
fix new build not published to UI if blocked mode enabled (#619)
This commit is contained in:
parent
3bd87cda66
commit
ce462ce4ac
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user