From 0a634a4932506940749ab647d8238dc7a7524854 Mon Sep 17 00:00:00 2001 From: Daniel Michelin Date: Mon, 24 Jun 2019 18:10:55 -0400 Subject: [PATCH] CI: check_mr_settings: disallow squashing commits (!464) --- .gitlab-ci/check_mr_settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci/check_mr_settings.py b/.gitlab-ci/check_mr_settings.py index 412de33d3..a25c42d43 100755 --- a/.gitlab-ci/check_mr_settings.py +++ b/.gitlab-ci/check_mr_settings.py @@ -110,6 +110,13 @@ def main(): # Check the merge request check_environment_variables() settings = get_mr_settings(args.path) + + # Make sure that squashing is disabled + if settings_read(settings, "squash"): + print("*** MR settings check failed!") + print('ERROR: Please turn off the "Squash commits when merge request' + ' is accepted." option in the merge request settings.') + return 1 if check_allow_push(settings): print("*** MR settings check successful!") else: