Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"gh pr status" reports missing statusCheckRollup and reviewDecision fields #597

Closed
AdamVig opened this issue Mar 5, 2020 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@AdamVig
Copy link

AdamVig commented Mar 5, 2020

Describe the bug

When I run gh pr status , I see the following error message and no other output:

graphql error: 'Field 'statusCheckRollup' doesn't exist on type 'Commit', Field 'reviewDecision' doesn't exist on type 'PullRequest''

gh version 0.6.1 (2020-03-04)

Steps to reproduce the behavior

  1. gh pr status (in case it matters: on a private repository in a GitHub organization)
  2. Error is printed to the console with no other output.

Expected vs actual behavior

I'm not sure what the output of gr pr status should look like, but the error is definitely a sign that something is going wrong.

Logs

$ gh pr status
graphql error: 'Field 'statusCheckRollup' doesn't exist on type 'Commit', Field 'reviewDecision' doesn't exist on type 'PullRequest''
@AdamVig AdamVig added the bug Something isn't working label Mar 5, 2020
@tierninho
Copy link
Contributor

@AdamVig Thanks for filing this.

I suspect you are authenticated with a Personal Access Tokens, which renders some commands useless; most notably the gh pr status, like so:

graphql error: 'Field 'statusCheckRollup' doesn't exist on type 'Commit',
Field 'reviewDecision' doesn't exist on type 'PullRequest''

It's better to authenticate on a local machine using OAuth and then copy the resulting ~/.config/gh/config.yml file to the remote machine under SSH.

Example: #297 (comment)

@AdamVig
Copy link
Author

AdamVig commented Mar 5, 2020

@tierninho Thank you! gh pr status now works for me. ✨

I am on Windows with WSL, so I followed these steps:

  1. Open cmd.exe with "Run as administrator."
  2. choco install gh
  3. refreshenv
  4. gh pr list (to trigger authentication)
  5. Follow authentication prompts.
  6. Open %USERPROFILE%\.config\gh in Explorer to verify that config.yml is there.
  7. Back in WSL, copy config.yml into ~/.config/gh.

@AdamVig AdamVig closed this as completed Mar 5, 2020
@tierninho
Copy link
Contributor

Excellent! Glad you are back in action. Thank you for detailing the steps, as it will be helpful for anyone else who runs into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants