check commit authors for each commit

Although we check commit authors in test_commit_format.py to skip tests
for dependabot's commits, the current code only checks the author of the
head commit.
This PR make it check each commit's author so that we can test branches
where both a dependabot's commit and other commits exist.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
Keiichi Watanabe
2021-06-21 17:28:18 +09:00
committed by Andreea Florescu
parent 6591890ee1
commit 9f7b0d9069

View File

@@ -32,7 +32,7 @@ def test_commit_format():
for sha in shas.split():
# Do not enforce the commit rules when the committer is dependabot.
author_cmd = "git show -s --format='%ae'"
author_cmd = "git show -s --format='%ae' " + sha
author = get_cmd_output(author_cmd)
if "dependabot" in author:
continue