Skip to content

Commit caedd0a

Browse files
author
Jakub Ruzicka
committed
distgit: Use NVR for commit title for multiple changelog lines
When generating distgit changelog message, use current package NVR instead of first line of changelog as a title when multiple lines are present. When a single line of changelog is present, it is used as commit title instead as before. Change-Id: I752a1f08cb80cf8b8cd8e20b601816bf12f3e0ee Fixes: #92
1 parent 2fde4ad commit caedd0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rdopkg/actions/distgit/actions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,10 @@ def _commit_message(changes=None):
682682
_, changes = specfile.Spec().get_last_changelog_entry(strip=True)
683683
if not changes:
684684
raise exception.IncompleteChangelog()
685-
msg = re.sub(r'\s+\(.*\)\s*$', '', changes[0])
685+
if len(changes) == 1:
686+
msg = re.sub(r'\s+\(.*\)\s*$', '', changes[0])
687+
else:
688+
msg = specfile.Spec().get_nvr(epoch=False)
686689
fixed_rhbzs = set()
687690
for change in changes:
688691
for m in re.finditer(r'rhbz#(\d+)', change):

0 commit comments

Comments
 (0)