Split long commit message to multiple lines to respect the maximun of 80 characters per line imposed by Lantian
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Benjamin Renard 2022-12-12 11:32:27 +01:00
parent 5c5481ea57
commit 0824d02cd6

15
gitdch
View file

@ -7,6 +7,7 @@ import logging
import os import os
import re import re
import sys import sys
import textwrap
import git import git
@ -267,11 +268,17 @@ for version in versions:
) )
) )
for message in version['messages']:
for idx, line in enumerate(
textwrap.wrap(message, 76, break_long_words=True)
):
# pylint: disable=consider-using-f-string # pylint: disable=consider-using-f-string
changelog_lines.extend([ changelog_lines.append(
' * {0}\n'.format(message) '{0}{1}\n'.format(
for message in version['messages'] ' * ' if not idx else ' ',
]) line
)
)
# pylint: disable=consider-using-f-string # pylint: disable=consider-using-f-string
changelog_lines.append( changelog_lines.append(