roller: Add "Roll-Count:" footer
If there are multiple rolls but none of them add footers, the
auto_roller recipe module tacks the footers it creates onto the end of
the body with no blank lines. Example: http://pwrev.dev/241953. In this
case, add a "Roll-Count:" footer just to keep the auto_roller footers
separate from the body of the roll.
Change-Id: Id5752127726070ec7dc6aa469b2d3739eab28339
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/242032
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
diff --git a/recipes/roller.py b/recipes/roller.py
index b3e6cfd..d61aa25 100644
--- a/recipes/roller.py
+++ b/recipes/roller.py
@@ -126,7 +126,7 @@
send_comment=True,
commit_divider=props.commit_divider,
header_override=props.header_override,
- footers=list(props.footer),
+ footers=list(props.footer or [f'Roll-Count: {len(rolls)}']),
)
pres = api.step.empty('commit message').presentation