This commit is contained in:
Adam Majer 2024-09-05 15:39:42 +02:00
parent 8a1bbbe3b8
commit 408a95c5bc

View File

@ -122,6 +122,12 @@ func processPushAction(h *common.RequestHandler) error {
return nil 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 var err error
for _, config := range configs { for _, config := range configs {
err = concatenateErrors(err, processConfiguredPushAction(h, action, config)) 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 { func processConfiguredPushAction(h *common.RequestHandler, action *common.PushWebhookEvent, config *common.AutogitConfig) error {
prjgit := config.GitProjectName 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) git, err := common.CreateGitHandler(GitAuthor, GitEmail, AppName)
if err != nil { if err != nil {
return err return err