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

Cannot add reviewers to existing review on GitHub #225

Open
thermopyle opened this issue Oct 13, 2022 · 3 comments · Fixed by sathlan/code-review#2 · May be fixed by #252
Open

Cannot add reviewers to existing review on GitHub #225

thermopyle opened this issue Oct 13, 2022 · 3 comments · Fixed by sathlan/code-review#2 · May be fixed by #252

Comments

@thermopyle
Copy link

Describe the bug
If I select 'r s r' in an open GitHub review to request reviewers for the review, I cannot input anything at the prompt "Request review:". No matter what I input (email adress, GitHub username, with or without @ prefix), requesting a review fails with the error message "string-trim-right: Wrong type argument: stringp, nil". Pressing <TAB> in the input field also does not work, the reply is [No matches].

To Reproduce
Steps to reproduce the behavior:

  1. Open a review in code-review.
  2. Do 'r s r' to request reviewers.
  3. Try to input a user (username or email) or <TAB> to select from list.
  4. Observe error.

Expected behavior
If I input a username or email adress, or if I select from a list returned by pressing <TAB>, the specified GitHub user should be requested to review.

Desktop (please complete the following information):

  • macOS 12.6 Montery
  • code-review 20220629.1215
  • Magit 20221008.1927
  • Emacs 29.0.50 (brew installed)
@sochotnicky
Copy link

@thermopyle I wonder if you managed to find the cause/fix by any chance? I'm seeing this as well.

@ArtemSmaznov
Copy link

Do you guys mean the prompt is empty and has no suggestions even if you type something in it? If so then the same here.

Just found out I can add reviewers in forge via forge-edit-topic-review-request but it would be better to do that in code-review instead.

@sochotnicky
Copy link

sochotnicky commented Nov 1, 2023

Yeah that's it. I think I found the culprit:
https://github.com/wandersoncferreira/code-review/blob/master/code-review-github.el#L786

I believe the problem is how the cursor is used in the GraphQL query (Or Github implementation of it?). Basically for the initial query cursor is nil (which gets translated to null in the graphql. Even if it got translated into empty string on first call we'd get an error from Github (I just tried). I think a fix would be either:

sochotnicky pushed a commit to sochotnicky/code-review that referenced this issue Nov 2, 2023
On first query the cursor must be set to null. We set null by default
and don't provide any cursor value on first query

Fixes wandersoncferreira#225
@sochotnicky sochotnicky linked a pull request Nov 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants