Split long commit message to multiple lines to respect the maximun of 80 characters per line imposed by Lantian
This commit is contained in:
parent
5c5481ea57
commit
0824d02cd6
1 changed files with 12 additions and 5 deletions
17
gitdch
17
gitdch
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue