GraphQL: Could not resolve to a PullRequest with the number of 1153. (repository.pullRequest)

Viewed 677

Why am I getting this error?

$ gh pr checkout 1153
GraphQL: Could not resolve to a PullRequest with the number of 1153. (repository.pullRequest)

The PR does exist in the Repository so it make no sense to me.

Additional info:

I am working with a repository from:

https://github.com/minio

1 Answers

I think the problem is that you might be in the wrong repository. Sometimes developers work in different repositories and they expect a branch to be present in the wrong spot; please double-check on the repo. For instance if I try the same command in the wrong repository where the PR is not located, then I get the same error:

# Change directory to Console Repo where the PR is NOT located
cd ~/console
$ gh pr checkout 1153
GraphQL: Could not resolve to a PullRequest with the number of 1153. (repository.pullRequest)

Solution:

# Change directory to proper Repository:
cd ~/operator
gh pr checkout 1153

As a result:

$ gh pr checkout 1153
Switched to branch 'add_ingress_for_tenant'
Related