From c8a6d71a729c8923ce7dc748f97c0617efdd508a Mon Sep 17 00:00:00 2001 From: fserucas Date: Mon, 2 Sep 2024 13:20:28 +0100 Subject: [PATCH] Restrict trigger rules for main branches for gitlab and gerrit Change-Id: Id22bc742cf6b1706bbfa642a589e583229f511df --- controllers/libs/zuulcf/zuulcf.go | 6 ++++-- doc/reference/CHANGELOG.md | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/libs/zuulcf/zuulcf.go b/controllers/libs/zuulcf/zuulcf.go index 0fdceb9e..fd9e8038 100644 --- a/controllers/libs/zuulcf/zuulcf.go +++ b/controllers/libs/zuulcf/zuulcf.go @@ -647,7 +647,8 @@ func GetTriggerPostByDriver(driver string, connection string) (PipelineGenericTr { Event: "ref-updated", Ref: []string{ - "^refs/heads/.*$", + "^refs/heads/master$", + "^refs/heads/main$", }, }, } @@ -656,7 +657,8 @@ func GetTriggerPostByDriver(driver string, connection string) (PipelineGenericTr { Event: "gl_push", Ref: []string{ - "^refs/heads/.*$", + "^refs/heads/master$", + "^refs/heads/main$", }, }, } diff --git a/doc/reference/CHANGELOG.md b/doc/reference/CHANGELOG.md index be0090ef..65175057 100644 --- a/doc/reference/CHANGELOG.md +++ b/doc/reference/CHANGELOG.md @@ -11,6 +11,9 @@ All notable changes to this project will be documented in this file. ### Removed ### Changed ### Fixed + +- Restrict trigger rules for main branches for gitlab and gerrit + ### Security ## [v0.0.38] - 2024-08-26