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

[Bug]: 404 with GraphQL endpoint in Github Enterprise Server #40

Open
mhaas opened this issue Dec 11, 2024 · 3 comments
Open

[Bug]: 404 with GraphQL endpoint in Github Enterprise Server #40

mhaas opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mhaas
Copy link

mhaas commented Dec 11, 2024

GitHub CLI Version

2.63.2

gh-skyline Version

0.0.4

What Operating System are you seeing the problem on?

macOS

What happened?

I am trying to generate my Skyline against a Github Enterprise Service instance.

When running gh skyline as it, it attempts to connect to github.com:

➜ gh skyline
Error: [NETWORK] failed to initialize GitHub client: failed to create REST client: authentication token not found for host github.com

Using GH_HOST, the cli is using the wrong GraphQL endpoint:

➜ GH_HOST=github.XXX.YYY gh skyline
Error: failed to fetch contributions: [GRAPHQL] failed to fetch contributions: HTTP 404: Not Found (https://github.XXX.YYY/api/v3/graphql)

The correct GraphQL URL would be https://github.XXX.YYY/api/graphql. This is also encoded by the corresponding logic in graphQLEndpoint.

I would appear to be correctly authenticated, with the "active" instance being set to the GHE instance:

➜ gh auth status
github.XXX.YYY
  ✓ Logged in to github.XXX.YYY account ZZZZZZZ (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'

github.AAAA.BBB.CCC # other GHE instance
  ✓ Logged in to github.AAAA.BBB.CCC account ZZZZZZZ (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'

Appreciate your support, the X1C needs a break from churning out multiboard parts :)

@mhaas mhaas added bug Something isn't working triage Issues to be triaged labels Dec 11, 2024
@github-project-automation github-project-automation bot moved this to Needs Review in gh-skyline Dec 11, 2024
@chrisreddington
Copy link
Collaborator

Thanks @mhaas, I've started taking a look at this one. Your link to the graphQLEndpoint in go-gh was super helpful. I think this is happening because I've implemented some parts in REST vs GraphQL and have been inconsistent in the approach.

I'll be making some tweaks to try and separate out some of the concerns a little more, so I'll keep you posted on progress 😄 Thank you for the interest and raising this 🙏

@chrisreddington chrisreddington removed the triage Issues to be triaged label Dec 11, 2024
@chrisreddington chrisreddington moved this from Needs Review to In Progress in gh-skyline Dec 11, 2024
@mhaas
Copy link
Author

mhaas commented Dec 11, 2024

Thanks, happy to test if you got a PR as well :)

@chrisreddington
Copy link
Collaborator

chrisreddington commented Dec 15, 2024

Thanks, happy to test if you got a PR as well :)

Thank you @mhaas! Here's the first pass at the PR, though I'd like to go back and clean up a few bits before merging it in ☺️

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
Status: In Progress
Development

No branches or pull requests

2 participants