From fec4bb7958da34fcb3b8c4c90c96564ae52ca2d85d06c1719c0c5065b23653b1 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 5 Sep 2024 15:41:02 +0200 Subject: [PATCH] . --- prjgit-updater/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/prjgit-updater/main.go b/prjgit-updater/main.go index ba29580..b75ef21 100644 --- a/prjgit-updater/main.go +++ b/prjgit-updater/main.go @@ -47,7 +47,12 @@ func processRepositoryAction(h *common.RequestHandler) error { return nil } - log.Println("num configs found:", len(configs)) + for _, config := range configs { + if config.GitProjectName == action.Repository.Name { + h.StdLogger.Println("+ ignoring repo event for PrjGit repository", config.GitProjectName) + } + } + var err error for _, config := range configs { err = concatenateErrors(err, processConfiguredRepositoryAction(h, action, config)) @@ -57,11 +62,6 @@ func processRepositoryAction(h *common.RequestHandler) error { } func processConfiguredRepositoryAction(h *common.RequestHandler, action *common.RepositoryWebhookEvent, config *common.AutogitConfig) error { prjgit := config.GitProjectName - if action.Repository.Name == prjgit { - h.StdLogger.Printf("repository event %s for PrjGit '%s'. Ignoring\n", common.DefaultGitPrj, action.Action) - return nil - } - git, err := common.CreateGitHandler(GitAuthor, GitEmail, AppName) if err != nil { return err