wandersoncferreira / code-review

Code Reviews in Emacs
https://wandersoncferreira.github.io/code-review/
GNU General Public License v3.0
462 stars 49 forks source link

Cannot add reviewers to existing review on GitHub #225

Open thermopyle opened 1 year ago

thermopyle commented 1 year ago

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):

sochotnicky commented 1 year ago

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

ArtemSmaznov commented 10 months ago

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 commented 10 months ago

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: