fix: don't overwrite PR title in /describe when generate_ai_title is false#2475
Conversation
…false publish_description re-saved the PR/MR title on every describe run even when the title was not AI-generated. Because the title is read at job start and written back unconditionally, a manual title edit made while describe is running gets reverted. This affected every provider, since they all set the title alongside the description. Pass None as the title from the describe flow when generate_ai_title is false, and update each provider to leave the existing title unchanged in that case (updating only the description). Refs: The-PR-Agent#2474 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Summary by QodoPreserve manually edited PR title when /describe runs without AI title Description
Diagram
High-Level Assessment
Files changed (12)
|
Code Review by Qodo
1.
|
…a stale title When pr_title is None the cached self.pr.title could be stale, so a title edited during the describe run could still be reverted. Re-fetch the PR first so the latest title, version and reviewers are used in the replace-style update. Refs: The-PR-Agent#2474 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit 27903ad |
…AI-generated When pr_title is None the local provider wrote only the body, dropping the title line from description.md. Use the provider's existing title (get_pr_title) so the title line is preserved, matching the leave-title-unchanged contract. Refs: The-PR-Agent#2474 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the new Local output drops title finding in |
|
Code review by qodo was updated up to the latest commit d45ddc8 |
Keep only the non-obvious rationale (shared describe path, the abstract publish_description contract, and the Bitbucket Server re-fetch); drop the per-provider comments that just restate the guard. Refs: The-PR-Agent#2474 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit aaf00bb |
naorpeled
left a comment
There was a problem hiding this comment.
LGTM!
Thanks @IsmaelMartinez !
What
/describere-saved the PR/MR title on every run even whengenerate_ai_titleis false (the default). The title is read at the start of the describe run and written back unconditionally, so a title edited by hand while describe is running gets reverted on publish. This affects every provider, since each one sets the title alongside the description inpublish_description.Fix
When
generate_ai_titleis false, the describe flow now passespr_title=None, and each provider treatsNoneas "leave the existing title unchanged", updating only the description. Whengenerate_ai_titleis true, behaviour is unchanged. Bitbucket Server is special-cased: its update replaces the PR, so it preserves the existing title instead of blanking it.Tests
Added GitLab provider unit tests covering both the title-preserved (
None) and title-updated paths.Closes #2474