Skip to content

feat: Add @mention to PR owner in AI-resolved cherry-pick comments #1124

Description

@myakove

Problem

When cherry-pick conflicts are resolved by AI, the server:

  1. Posts a comment on the original PR about the AI resolution, but does NOT @mention the cherry-pick PR owner (pr_author)
  2. Does NOT post any comment on the cherry-pick PR itself to notify the assignee

The current comment on the original PR (runner_handler.py lines 1758-1765):

**Cherry-pick conflicts were resolved by AI**

Cherry-picked PR {title} into {target_branch}: {cherry_pick_pr_url}
Conflicts were automatically resolved by AI ({ai_provider}/{ai_model}).

**Manual verification is required** — please review the changes and test before merging.

The auto-verify and auto-merge are already correctly skipped for AI-resolved cherry-picks (pull_request_handler.py), but the PR owner is not explicitly notified via @mention.

Proposed Fix

In webhook_server/libs/handlers/runner_handler.py, in the cherry_pick method, when cherry_pick_had_conflicts is True:

  1. Original PR comment: Add @{pr_author} mention to the existing comment so the owner gets a GitHub notification
  2. Cherry-pick PR comment: Post a NEW comment on cherry_pick_pr (not pull_request) mentioning @{pr_author} that this cherry-pick had conflicts resolved by AI and needs their review and verification

Files Affected

  • webhook_server/libs/handlers/runner_handler.py — cherry_pick method, lines ~1753-1770
  • Tests for the new comment behavior

Done

  • Add @mention of pr_author in the original PR comment when cherry-pick has AI-resolved conflicts
  • Post a comment on the cherry-pick PR mentioning @pr_author that AI resolved conflicts and needs review/verification
  • Add/update tests for both comments
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions