From 34820eda58caa7b31384bd1c3fca17787c54afa4 Mon Sep 17 00:00:00 2001 From: Anton Bobrov Date: Thu, 21 May 2026 17:50:38 +0200 Subject: [PATCH] Pass changelog unmodified, let LogAgent swap the JIRA references --- ymir/agents/backport_agent.py | 7 +++---- ymir/agents/log_agent.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ymir/agents/backport_agent.py b/ymir/agents/backport_agent.py index f6d4f84b..435636c3 100644 --- a/ymir/agents/backport_agent.py +++ b/ymir/agents/backport_agent.py @@ -781,8 +781,9 @@ async def extract_source_changelog( """Extract changelog messages from source dist-git commits. Iterates all upstream patch URLs, extracts the newest changelog entry - from each commit's spec file, strips Resolves/Related lines, and - combines the descriptive lines (deduplicating across commits). + from each commit's spec file, and combines the lines (deduplicating + across commits). The content is passed through as-is; the LogAgent + handles replacing Jira references. """ upstream_clone = Path(f"{local_clone}-upstream") if not upstream_clone.exists(): @@ -815,8 +816,6 @@ async def extract_source_changelog( continue for line in entry.content: - if re.match(r"^\s*[-\*]?\s*(resolves|related):", line, re.IGNORECASE): - continue if line not in seen: seen.add(line) collected_lines.append(line) diff --git a/ymir/agents/log_agent.py b/ymir/agents/log_agent.py index fbaeaf24..053d9a88 100644 --- a/ymir/agents/log_agent.py +++ b/ymir/agents/log_agent.py @@ -43,8 +43,8 @@ def get_instructions() -> str: If a source changelog message is provided in the prompt, use those lines as the exact changelog message content. Keep the descriptive lines exactly as-is — do not - rephrase, summarize, or add to them. Add the Resolves/Related line - for , matching the style of existing changelog entries. + rephrase, summarize, or add to them. In any Resolves/Related lines, replace all + original Jira issue references with , ensuring no duplicates remain. If no source changelog message is provided, write a new entry. In general, the entry should contain a short summary of the changes, ideally fitting on a single line,