Skip to content

parsec merge/pr-status should work with adopted branches that have open PRs #81

@erishforG

Description

@erishforG

Problem

parsec adopt로 기존 브랜치를 등록한 후, 해당 브랜치에 이미 PR이 존재하더라도 parsec mergeparsec pr-status가 동작하지 않음.

$ parsec adopt 63 --branch feature/63-66-ship-error-handling
Adopted branch 'feature/63-66-ship-error-handling' as 63

$ parsec merge 63
Error: no PR found for 63. Ship it first with \`parsec ship 63\`.

$ parsec pr-status
Error: no shipped PRs found. Ship a ticket first with \`parsec ship\`.

Expected Behavior

  • parsec merge <ticket> — adopt된 워크트리의 브랜치로 GitHub API에서 PR을 찾아서 머지
  • parsec pr-status <ticket> — adopt된 워크트리도 PR 상태 조회 가능

Root Cause

parsec mergeparsec pr-status가 내부 state의 pr_url 필드만 확인하는데, parsec adopt는 이 필드를 설정하지 않음. 브랜치 이름으로 GitHub API에서 PR을 직접 조회하는 fallback이 필요.

Suggested Fix

  1. merge(): state에 pr_url이 없으면 gh api로 브랜치 기반 PR 조회 후 머지
  2. pr-status(): shipped 여부와 무관하게 활성 워크트리의 PR도 조회
  3. adopt(): 이미 열린 PR이 있으면 자동으로 pr_url 설정

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