Skip to content

ship: detect existing PR and skip creation on retry #98

@erishforG

Description

@erishforG

Problem

When retrying parsec ship after a partial failure (push OK, PR failed), if the PR was actually created successfully (or created in a previous attempt), the retry fails with 422 "A pull request already exists".

Expected

parsec ship should detect an existing open PR for the branch and skip creation, treating it as a successful ship.

Solution

Before creating a PR, call find_pr_by_branch() to check if one already exists. If found, use the existing PR URL instead of creating a new one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions