Skip to content

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

Closed

Description

@AdamVig

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''

Activity

  1. added
    bug
    on Mar 5, 2020
  2. tierninho commented on Mar 5, 2020

    @tierninho
    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)

  3. AdamVig commented on Mar 5, 2020

    @AdamVig
    Author

    @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.
  4. tierninho commented on Mar 5, 2020

    @tierninho
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions