[applied] gen-changelog: Add default description for missing ChangeLog entries

Message ID 87jz2wvnsp.fsf@redhat.com
State New
Headers
Series [applied] gen-changelog: Add default description for missing ChangeLog entries |

Commit Message

Dodji Seketeli Aug. 21, 2025, 12:53 p.m. UTC
  Hello,

When someone omits the ChangeLog part in a commit log, the generated
ChangeLog lacks the entry for that commit.  This patch adds a default
entry for each file mentioned in the commit.

	* gen-changelog.py (process_commit): Add a default entry made of
	the content of the subject title.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the mainline.
---
 gen-changelog.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gen-changelog.py b/gen-changelog.py
index e930990d..447475d9 100644
--- a/gen-changelog.py
+++ b/gen-changelog.py
@@ -70,7 +70,8 @@  def process_commit(lines, files):
 
     if not fileincommit:
         for f in files:
-            print('\t* %s:' % f.strip())
+            description = re.sub('.*:', '', lines[subject_line_index].strip())
+            print('\t* %s: %s' % (f.strip(), description.strip()))
         print()
 
     if first_cl_body_line_index > 0: