Make backport changelog messages consistent#477
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to extract and reuse changelog messages from source dist-git commits during the backporting process. It adds utilities for commit hash extraction and upstream spec file parsing, while updating the log agent to prioritize these source messages in its output. Feedback suggests improving the commit hash regex to support Pagure-style URLs and utilizing the Specfile library for more robust changelog parsing instead of manual string manipulation.
1af5bb4 to
7666a90
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to extract and reuse changelog messages from source dist-git commits during the backporting process. It adds utility functions for parsing commit hashes and extracting spec file changelogs, and updates the log agent to utilize these messages when available. Feedback includes a correction to ensure the newest changelog entry is selected and an improvement to the regex for filtering metadata lines to correctly handle bullet points.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
nforro
left a comment
There was a problem hiding this comment.
LGTM. I just find upstream_patches a tad confusing, but I understand for older Z-Streams dist-git is the upstream.
The motivation behind this change is that currently the log agent reinvents spec file changelog messages from scratch when backporting based on various details from backport summary. This naturally results in different changelog messages between the source and the target. This is undesirable because changelog entries are public and having a variety of different messages across different streams for the same issue is confusing, inconsistent and can prevent various static automation from identifying package fixes correctly.
This patch addresses this by extracting the original messages from the source and passing them to the log agent to include as is, while matching the target specific style still for things like "Resolves/Related" and updating Jira issue references as before.