Skip to content

gh pr status shows 'no pull request associated' on a branch pulled via gh pr checkout from a fork #12203

@niri81

Description

@niri81

Describe the bug

If a PR has been opened from a fork, the GH CLI does not show the PR when invoking gh pr status.
This seems to be a similar issue as #5914

Affected version

gh version 2.83.1 (2025-11-13)
https://github.com/cli/cli/releases/tag/v2.83.1

Steps to reproduce the behavior

  1. Create a repo and have someone open a PR from a fork.
  2. Invoke gh pr checkout $ID locally in your cloned repo
  3. Invoke gh pr status

Expected vs actual behavior

Actual:

Relevant pull requests in niri81/gh-cli-test

Current branch
  There is no pull request associated with [tametsi:tametsi/main]

Created by you
  You have no open pull requests

Requesting a code review from you
  You have no pull requests to review

I expected to receive information abut the currently checked out PR (i.e. niri81/gh-cli-test#1).

Logs

logs.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type
    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