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

Latest version incompatible with older GitHub Enterprise Server usages. #356

Closed
yaneury opened this issue Sep 27, 2023 · 2 comments · Fixed by #370
Closed

Latest version incompatible with older GitHub Enterprise Server usages. #356

yaneury opened this issue Sep 27, 2023 · 2 comments · Fixed by #370

Comments

@yaneury
Copy link
Contributor

yaneury commented Sep 27, 2023

#347 added Merge Queue support for this tool. Unfortunately, it seems that this change is incompatible with Github Enterprise Servers that don't have this feature enable (I believe it was just released this past July). When running the tool, we get the following panic:

panic: query PullRequests.viewer.pullRequests.nodes.mergeQueueEntry: Field 'mergeQueueEntry' doesn't exist on type 'PullRequest'

goroutine 1 [running]:
github.com/ejoffe/spr/github/githubclient.check({0x104f1fca8, 0x1400000e6d8})
       .../spr/github/githubclient/client.go:671 +0xe8
github.com/ejoffe/spr/github/githubclient.(*client).GetInfo(0x1400019c9a8, {0x104f23410?, 0x105239160?}, {0x104f23330, 0x1400019c978})
        .../spr/github/githubclient/client.go:183 +0xc0
github.com/ejoffe/spr/spr.(*stackediff).fetchAndGetGitHubInfo(0x140001a4de0, {0x104f23410, 0x105239160})
       .../spr/spr/spr.go:490 +0x14c
github.com/ejoffe/spr/spr.(*stackediff).UpdatePullRequests(0x140001a4de0, {0x104f23410?, 0x105239160}, {0x0, 0x0, 0x0}, 0x0)
       .../spr/spr/spr.go:137 +0x70
...

Is there a way to make this query optional such that the tool remains compatible with older Github Enterprise instances? I'm happy to submit a PR to do so, but am not too familiar with how to accomplish this in GraphQL.

@ejoffe
Copy link
Owner

ejoffe commented Sep 27, 2023

I'll look into this when I have some spare cycles, should be fairly easy to feature flag the merge queue feature.

@ejoffe
Copy link
Owner

ejoffe commented Dec 7, 2023

Fix released in v0.14.5

scosenza pushed a commit to scosenza/spr that referenced this issue Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants