You've already forked woodpecker
							
							
				mirror of
				https://github.com/woodpecker-ci/woodpecker.git
				synced 2025-10-30 23:27:39 +02:00 
			
		
		
		
	fix new build not published to UI if blocked mode enabled (#619)
This commit is contained in:
		| @@ -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 | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user