Closed logc closed 2 years ago
I have the same (or similar) result, also with Github Enterprise. In the returned errors, I have
(errors
((path "query" "repository" "pullRequest" "commits" "nodes" "commit" "statusCheckRollup" "contexts" "nodes" "... on CheckRun" "checkSuite" "workflowRun")
(extensions (code . "undefinedField") (typeName . "CheckSuite") (fieldName . "workflowRun"))
(locations ((line . 105) (column . 23)))
(message . "Field 'workflowRun' doesn't exist on type 'CheckSuite'")))
Now, if in code-review--build-buffer
I avoid using the code-review-github-graphql-complete
query by replacing
(deferred:parallel
(lambda () (code-review-diff-deferred obj))
(lambda () (code-review-infos-deferred obj))
(lambda () (code-review-infos-deferred obj t)))
with
(deferred:parallel
(lambda () (code-review-diff-deferred obj))
(lambda () (code-review-infos-deferred obj t)) ; Force fallback query
(lambda () (code-review-infos-deferred obj t)))
so that it uses code-review-github-graphql-fallback
, then I don't get the checkSuite
/workflowRun
errors (or any errors) in code-review-errors.log
, but I still get the same HTML in place of the diffs.
Presumably, there's something about the ghub-graphql
call that causes the authentication problem, I guess.
Note: all the rest of the *Code Review*
buffer looks like it is filled out correctly.
Found the answer: I need to set code-review-github-host
to github.mycompany.com/api/v3
to get this to work. (Presumably I also need to include that path, including the api/v3
, in .authinfo.gpg
, which I already have.
So in the customization dialog, that's Code Review Github Host
.
Code Review Github Graphql Host
still has to remain github.mycompany.com/api
, since the /graphql
path is appended onto it.
@logc See if this works for you, please. (I have PRs to review now. :^) )
Just for laughs: I just viewed this issue in magit
/forge
/code-review
, and was concerned that I ran into the login problem, even on github
: how could it prompt me for an enterprise login?
Then I realized I was looking at the problem-description provided by @logc with its HTML output. Whew!
@luskwater : sorry, I missed your previous message about having found a solution. I just tried, and can confirm that it works! Thank you so much! :smile:
Maybe you want to update this package's docs for configuring Github Enterprise? I did that when I found out how to make it work for me ...
Maybe you want to update this package's docs for configuring Github Enterprise? I did that when I found out how to make it work for me ...
Would be great to have a PR to add more documentation on this issue. Thanks for digging into it.
I'm closing this issue. Thank you @luskwater for all your efforts here.
Describe the bug "Review pull request" from Magit status buffer on any PR. The PR buffer opens, and general information is correct, but the "Files changed" part always shows an HTML page; if rendered in a browser, it asks for a login using LDAP. But authentication should have worked correctly using the token, otherwise the PR would not have been shown by Forge or downloaded by Code-review.
To Reproduce Steps to reproduce the behavior:
Expected behavior The same diff that can be found on the PR using a browser.
Screenshots This is the start of the relevant section in the PR buffer:
Desktop:
Additional context Reviewing the file
code-review-error.log
, the response from Github Enterprise seems to have some correct diff, but it is for another PR and is not displayed by the package. I would share it on this issue but I think I should anonymise some of its contents first.