mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
fix new build not published to UI if blocked mode enabled (#619)
This commit is contained in:
parent
3bd87cda66
commit
ce462ce4ac
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue