Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh pr status -R cli/cli fails to get PRs status if not inside any repository directory #339

@Clivern

Description

@Clivern

Describe the bug

  1. gh version.
~ gh --version
gh version 0.5.5-pre.1 (2020-02-06)
https://github.com/cli/cli/releases/tag/v0.5.5-pre.1

Steps to reproduce the behavior

  1. Type this gh pr status -R cli/cli on any git repository directory and outside a git repository directory.

  2. When inside a git repository directory, it works.

~ git:(feature/test-gh) $ gh pr status -R cli/cli

Relevant pull requests in cli/cli

Current branch
  There is no pull request associated with [Clivern:feature/test-gh]

Created by you
  You have no open pull requests

Requesting a code review from you
  You have no pull requests to review
  1. Error raised when outside a git directory since it try to build a list of PR associated with current repository branch name.
~ gh pr status -R cli/cli
fatal: not a git repository (or any of the parent directories): .git
git: exit status 128

Expected vs actual behavior

It would be nice to ignore the relevant branch PRs if i am outside a repository directory. So I am able to see PRs created by me and PRs requesting my review with the check status for a provided github repository.

May be the command gh pr status -R cli/cli wasn't intended to provide this functionality but i can't get the same functionality with gh pr list -R cli/cli unless there will be extra flags to list PRs created by me and include status checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions