Skip to content

gh pr status does not show PRs summary after upgrade when on detached HEAD #7051

@ghost

Description

Describe the bug

After upgrade from 2.13 to 2.23 (edit: I checked it and it works on 2.17.0, on 2.18.0 does not) the command gh pr status stopped working for me.
Before I could see the list of my PRs summary even though I was on a detached HEAD. After upgrade I receive error could not query for pull request for current branch: could not determine current branch: failed to run git: not on any branch.

Steps to reproduce the behavior

$ git checkout origin/master
$ gh pr status 
# could not query for pull request for current branch: could not determine current branch: failed to run git: not on any branch

Expected vs actual behavior

Please make it work like in the previous versions (e.g. 2.13) because I work on detached HEAD and use this command often.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions