From: Daniel Turull <[email protected]> Collapse runs of multiple blank lines into a single blank line and strip leading/trailing whitespace from the extracted changelog. This produces cleaner output that is suitable for inclusion in commit messages by tools like AUH.
Assisted-by: kiro:claude-opus-4.6 Signed-off-by: Daniel Turull <[email protected]> --- scripts/lib/devtool/upgrade.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index f2a2c8a6fb..e37ad07ea1 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -597,6 +597,11 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac if not changelog_content: return None + # Clean up content for readability and commit message use + changelog_content = re.sub(r'\n{3,}', '\n\n', changelog_content).strip() + if not changelog_content: + return None + changelog_dir = os.path.join(workspace_path, 'changelogs') bb.utils.mkdirhier(changelog_dir) changelog_path = os.path.join(changelog_dir, '%s.txt' % pn) -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#236856): https://lists.openembedded.org/g/openembedded-core/message/236856 Mute This Topic: https://lists.openembedded.org/mt/119271060/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
