Skip to content

Make backport changelog messages consistent#477

Merged
antbob merged 2 commits into
packit:mainfrom
antbob:consistent_changelog
May 12, 2026
Merged

Make backport changelog messages consistent#477
antbob merged 2 commits into
packit:mainfrom
antbob:consistent_changelog

Conversation

@antbob

@antbob antbob commented May 12, 2026

Copy link
Copy Markdown
Collaborator

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ymir/agents/backport_agent.py Outdated
Comment thread ymir/agents/backport_agent.py Outdated
@antbob
antbob force-pushed the consistent_changelog branch from 1af5bb4 to 7666a90 Compare May 12, 2026 16:27
@antbob

antbob commented May 12, 2026

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ymir/agents/backport_agent.py
Comment thread ymir/agents/backport_agent.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@nforro nforro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I just find upstream_patches a tad confusing, but I understand for older Z-Streams dist-git is the upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants