diff options
author | Gerald Combs <gerald@wireshark.org> | 2020-12-11 15:54:55 -0800 |
---|---|---|
committer | Pascal Quantin <pascal@wireshark.org> | 2020-12-12 10:20:40 +0100 |
commit | 404802dc3457e922e28423cf6cdf46c9c6e3c9d6 (patch) | |
tree | fc44cf94b56f042d3339e63278ba177806f02184 /tools/validate-commit.py | |
parent | 9fb03566c25e74fafb796bf9888d393238423cc0 (diff) |
Tools: skip commit validation for merge trains.
Skip commit validation if it looks like we're in a GitLab merge train.
Diffstat (limited to 'tools/validate-commit.py')
-rwxr-xr-x | tools/validate-commit.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/validate-commit.py b/tools/validate-commit.py index 55254e238f..8f0dde3a23 100755 --- a/tools/validate-commit.py +++ b/tools/validate-commit.py @@ -209,6 +209,12 @@ is checked so that maintainers can rebase your change and make minor edits.\ def main(): args = parser.parse_args() commit = args.commit + + if(os.getenv('CI_MERGE_REQUEST_EVENT_TYPE') == 'merge_train'): + print("If we were on the love train, people all over the world would be joining hands for this merge request.\nInstead, we're on a merge train so we're skipping commit validation checks. ") + return 0 + + cmd = ['git', 'show', '--no-patch', '--format=%h%n%an%n%ae%n%B', commit, '--'] output = subprocess.check_output(cmd, universal_newlines=True) |