From 75c8eaeaf7d747b61c2bae17948af538a1ff9143 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 31 May 2019 00:33:03 +0200 Subject: [PATCH] CI: fix package count check + ci:skip-build (!404) Do not require ci:ignore-count, when using ci:skip-build in a MR that has change a lot of packages. If the user already supplies ci:skip-build then we can safely assume that we don't to check the package count. Fixes #267 --- .gitlab-ci/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/common.py b/.gitlab-ci/common.py index d3600a60d..4d92f5f05 100755 --- a/.gitlab-ci/common.py +++ b/.gitlab-ci/common.py @@ -76,9 +76,10 @@ def get_changed_files(): def get_changed_packages_sanity_check(count): - if commit_message_has_string("[ci:ignore-count]"): - print("NOTE: package count sanity check skipped ([ci:ignore-count]).") - return + for mark in ["[ci:ignore-count]", "[ci:skip-build]"]: + if commit_message_has_string(mark): + print("NOTE: package count sanity check skipped (" + mark + ").") + return if count <= 10: return