All of lore.kernel.org
 help / color / mirror / Atom feed
* [auh][PATCH] steps: ignore source in commit msg
@ 2026-09-07 13:12 daniel.turull
  2026-09-09  8:41 ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: daniel.turull @ 2026-09-07 13:12 UTC (permalink / raw)
  To: yocto-patches; +Cc: alex.kanavin, Daniel Turull

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 --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))


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [auh][PATCH] steps: ignore source in commit msg
  2026-09-07 13:12 [auh][PATCH] steps: ignore source in commit msg daniel.turull
@ 2026-09-09  8:41 ` Alexander Kanavin
  2026-09-10  7:14   ` Daniel Turull
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2026-09-09  8:41 UTC (permalink / raw)
  To: daniel.turull; +Cc: yocto-patches

On Mon, 7 Sept 2026 at 15:14, <daniel.turull@ericsson.com> wrote:
> @@ -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))

This code block relies on brittle particularities of how devtool
writes out the changelog file. I wonder if we can rather make it more
structured, e.g. devtool writes out a json with all the metadata
including the pointer (filename) where the actual changelog text is,
and then auh can pick and format pieces the way it wants?

Alex


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [auh][PATCH] steps: ignore source in commit msg
  2026-09-09  8:41 ` Alexander Kanavin
@ 2026-09-10  7:14   ` Daniel Turull
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Turull @ 2026-09-10  7:14 UTC (permalink / raw)
  To: alex.kanavin@gmail.com; +Cc: yocto-patches@lists.yoctoproject.org

On Wed, 2026-09-09 at 10:41 +0200, Alexander Kanavin wrote:
> On Mon, 7 Sept 2026 at 15:14, <daniel.turull@ericsson.com> wrote:
> > @@ -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))
> 
> This code block relies on brittle particularities of how devtool
> writes out the changelog file. I wonder if we can rather make it more
> structured, e.g. devtool writes out a json with all the metadata
> including the pointer (filename) where the actual changelog text is,
> and then auh can pick and format pieces the way it wants?
> 
> Alex

Hi,

Should we have the metadata in a separate file and keep a pure text with only
the changelog? otherwise it may be less human friendly for people using the
changelog text without the AUH.

metadata:
 - packgage
 - old version
 - new version
 - filename of the changelog
 - changelog text or filename with the changelog text

Cheers
Daniel




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-10  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 13:12 [auh][PATCH] steps: ignore source in commit msg daniel.turull
2026-09-09  8:41 ` Alexander Kanavin
2026-09-10  7:14   ` Daniel Turull

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.