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

17
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:
) )
) )
# pylint: disable=consider-using-f-string for message in version['messages']:
changelog_lines.extend([ for idx, line in enumerate(
' * {0}\n'.format(message) textwrap.wrap(message, 76, break_long_words=True)
for message in version['messages'] ):
]) # pylint: disable=consider-using-f-string
changelog_lines.append(
'{0}{1}\n'.format(
' * ' if not idx else ' ',
line
)
)
# pylint: disable=consider-using-f-string # pylint: disable=consider-using-f-string
changelog_lines.append( changelog_lines.append(