diff options
author | Thierry Reding <treding@nvidia.com> | 2020-01-13 08:35:32 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2020-01-13 08:35:32 +0100 |
commit | df7a56429f80819d84390eadccd053cbcc35f05c (patch) | |
tree | 446746e2cae49052be531ccdc054c201fba16265 | |
parent | 199dfe4e6d96daf7203a5ae00f5764c9e60e684d (diff) | |
download | maint-scripts-df7a56429f80819d84390eadccd053cbcc35f05c.tar.gz |
tms: Properly compute widths for [GIT PULL index/count] prefix
In order for the [GIT PULL index/count] subject prefix to look pretty,
compute the width of the index and count fields based on the number of
pull requests for the given target.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rwxr-xr-x | tms | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -219,8 +219,8 @@ class Branch: to = ', '.join(target.to) cc = ', '.join(target.cc) - # XXX - width = 1 + # make [GIT PULL index/count] look pretty + width = math.ceil(math.log10(count + 1)) message = email.message.EmailMessage() message['From'] = author |