[sysadmin/repo-management] maintenance: Designate the 'buildstream' branches as protected for kde-linux/kde-linux and kde-linux/kde-linux-packages
Ben Cooksley <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 9744d44e494588e572d654745569a2b9a6a47dc7 by Ben Cooksley.
Committed on 09/08/2026 at 08:39.
Pushed by bcooksley into branch 'master'.
Designate the 'buildstream' branches as protected for kde-linux/kde-linux and kde-linux/kde-linux-packages
Ref T18778
M +6 -3 maintenance/update-project-settings.py
https://invent.kde.org/sysadmin/repo-management/-/commit/9744d44e494588e572d654745569a2b9a6a47dc7
diff --git a/maintenance/update-project-settings.py b/maintenance/update-project-settings.py
index 8774f49..d3d9bb9 100755
--- a/maintenance/update-project-settings.py
+++ b/maintenance/update-project-settings.py
@@ -27,9 +27,6 @@ if not os.path.exists( args.webhook_rules ):
# Connect to Gitlab
gitlabServer = gitlab.Gitlab( args.instance, private_token=args.token )
-# The following are the patterns we want to protect
-branchPatternsToProtect = ['master', 'kf5', 'kf6', '*.*']
-
# This is the template we would like to use for squash commits
squashCommitTemplate = "%{title}\n\n%{description}"
@@ -190,6 +187,12 @@ for currentPath, subdirectories, filesInFolder in os.walk( args.metadata_path, t
# Start a list of known protection rules
knownRules = []
+ # Determine the list of branches to be protected
+ branchPatternsToProtect = ['master', 'kf5', 'kf6', '*.*']
+ # For KDE Linux we also need to protect 'buildstream'
+ if metadata['repopath'] in ['kde-linux/kde-linux', 'kde-linux/kde-linux-packages']:
+ branchPatternsToProtect.append('buildstream')
+
# Go over the protection rules we have and make sure they conform with the above
for protected in project.protectedbranches.list():
# Is it one of the ones we're allowed to have?