commit | a71a40baac64d7d0f2f9c315cd95914a77da9cf4 | [log] [tgz] |
---|---|---|
author | Rob Mohr <mohrr@google.com> | Tue Sep 27 18:24:57 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 27 18:24:57 2022 +0000 |
tree | 46a07ddf78a4ed4f4954a2989d3c6b300c4848d8 | |
parent | 41dad1aa8fb7270281118bdd07eada98c880ddaa [diff] |
pw_presubmit: Allow relands in commit message fmt Allow Gerrit-generated relands in the commit_message_format check. Example of a commit message that would now pass: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/112172/2 Change-Id: I95aaa817d692516a206fe0797cd1468fa4f9f385 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/112212 Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py index 10c9208..bab0290 100755 --- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py +++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -756,6 +756,13 @@ _LOG.warning('Ignoring apparent Gerrit-generated revert') return + # Ignore Gerrit-generated relands + if ('Reland' in lines[0] + and 'This is a reland of ' in git_repo.commit_message() and + "Original change's description: " in git_repo.commit_message()): + _LOG.warning('Ignoring apparent Gerrit-generated reland') + return + errors = 0 if len(lines[0]) > 72: