From 408a95c5bc284679f2a258570538b291c7e2a9335ff3ae4889fe103912cee4d3 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 5 Sep 2024 15:39:42 +0200 Subject: [PATCH] . --- prjgit-updater/main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/prjgit-updater/main.go b/prjgit-updater/main.go index 19267d5..ba29580 100644 --- a/prjgit-updater/main.go +++ b/prjgit-updater/main.go @@ -122,6 +122,12 @@ func processPushAction(h *common.RequestHandler) error { return nil } + for _, config := range configs { + if config.GitProjectName == action.Repository.Name { + h.StdLogger.Println("+ ignoring push to PrjGit repository", config.GitProjectName) + } + } + var err error for _, config := range configs { err = concatenateErrors(err, processConfiguredPushAction(h, action, config)) @@ -132,11 +138,6 @@ func processPushAction(h *common.RequestHandler) error { func processConfiguredPushAction(h *common.RequestHandler, action *common.PushWebhookEvent, config *common.AutogitConfig) error { prjgit := config.GitProjectName - if action.Repository.Name == prjgit { - h.StdLogger.Printf("push to %s -- ignoring\n", prjgit) - return nil - } - git, err := common.CreateGitHandler(GitAuthor, GitEmail, AppName) if err != nil { return err