From ebc701641fa57f78d03f3f5ecac617b7bf7470b4 Mon Sep 17 00:00:00 2001 From: Andreea Florescu Date: Mon, 22 Feb 2021 12:03:42 +0200 Subject: [PATCH] exclude dependabot from the 50/72 commit rule When dependabot updates the rust-vmm-ci submodule, the git commit sumamry is over 50 chars. To be able to merge PR, exclude the dependabot user from this checks. Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/61 Signed-off-by: Andreea Florescu --- integration_tests/test_commit_format.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/integration_tests/test_commit_format.py b/integration_tests/test_commit_format.py index 268a10f..7f100af 100644 --- a/integration_tests/test_commit_format.py +++ b/integration_tests/test_commit_format.py @@ -31,6 +31,11 @@ def test_commit_format(): shas = get_cmd_output(shas_cmd) for sha in shas.split(): + # Do not enforce the commit rules when the committer is dependabot. + author_cmd = "git show -s --format='%ae'" + author = get_cmd_output(author_cmd) + if "dependabot" in author: + continue message_cmd = "git show --pretty=format:%B -s " + sha message = get_cmd_output(message_cmd) message_lines = message.split("\n")