diff mbox series

[auh] steps: ignore source in commit msg

Message ID 20260907131252.2810926-1-daniel.turull@ericsson.com
State New
Headers show
Series [auh] steps: ignore source in commit msg | expand

Commit Message

Daniel Turull Sept. 7, 2026, 1:12 p.m. UTC
From: Daniel Turull <daniel.turull@ericsson.com>

The source is useful for identifying where the changelog comes from,
but it does not need to be included in the commit message.

Keep it only if it is a URL.

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
 modules/steps.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/modules/steps.py b/modules/steps.py
index a88e666..4adb23f 100644
--- a/modules/steps.py
+++ b/modules/steps.py
@@ -103,6 +103,8 @@  def _append_changelog_to_commit_msg(group, opts):
         text = p['changelog_text'].strip()
         if text.startswith('Changelog for '):
             text = text[text.index('\n') + 1:].strip()
+        if text.startswith('Source: ') and not text.startswith('Source: http'):
+            text = text[text.index('\n') + 1:].strip()
         if len(text) > max_len:
             text = (text[:max_len] + "\n\n[Changelog truncated as it exceeds {} characters; \n"
                     "the full changelog can be found in an attachment to the AUH email]".format(max_len))