Skip to content

watch-pr/forge: wrong PR on gh-pr-checkout branches and fork-to-upstream PRs #210

Open

Description

@mdsmithaustin

From PR #205 round-1 review. (1) watch-pr without --pr now runs gh pr view <branch> --repo <origin> and drops gh's refs/pull/N/head tracking resolution: on a branch made by gh pr checkout for a cross-repo PR it returns the wrong PR or none (live proof in the review lane, github.ts:672-680). Prefer the tracking ref's PR number when present. (2) In a fork whose PRs target upstream, the Forge rule sends gh pr create -R <fork> to the fork, and the watcher lookup misses the upstream PR. No playbook runs either path today.

Activity

  1. mdsmithaustin commented on Oct 12, 2026

    @mdsmithaustin
    OwnerAuthor
    1. (from PR fix(poteto-mode): correct failure counting and PR repository selection #205 round 2) -R <owner>/<repo> drops the host: with gh logged in to github.com and a GitHub Enterprise host, -R acme/api went to api.github.com, while the bare call took the Enterprise host from the git remote. Use -R <host>/<owner>/<repo> on Enterprise.
  2. mdsmithaustin commented on Oct 15, 2026

    @mdsmithaustin
    OwnerAuthor

    The checked-out pull-ref lookup correction merged in #243, with the repository and host kept explicit. The existing Enterprise-host correction is retained.

    Automatic fork-to-upstream target selection remains open for a separate scope decision. This triage preserves the current origin-based Forge contract.

  3. mdsmithaustin commented on Oct 16, 2026

    @mdsmithaustin
    OwnerAuthor

    Accepted follow-up disposition: the pull-ref lookup and explicit host/repository corrections landed in #243. Automatic fork-to-upstream target selection remains a deferred publication-policy proposal. Keep the existing origin contract; no automatic destination change is being added. This issue stays open to preserve the proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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