pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.36k stars 127 forks source link

Validation failed error when creating review thread comment #484

Open HampusMat opened 8 months ago

HampusMat commented 8 months ago

Issue Description

Type: bug report or feature request

bug report

Describe what happened (or what feature you want)

When trying to create a comment in a review thread in a pull request, the following error is displayed:

gh: Validation Failed (HTTP 422)

Describe what you expected to happen

I expected a comment to be created in a review thread.

How to reproduce it (as minimally and precisely as possible)

  1. Enter a pull request that has a review with one or more comments
  2. Move your cursor to the line below a review thread THREAD header.
  3. Do :Octo comment add (or space + ca)
  4. Write a comment
  5. Do :w to save.

Tell us your environment

Neovim v0.9. LuaJIT 2.1.0-beta3 Fedora Linux 37 Github CLI 2.30.0

Anything else we need to know?

HampusMat commented 8 months ago

I'm unable to reproduce this at home. Really weird

pwntester commented 8 months ago

Will leave this open to see if anyone has the same problem. Seems like its related with gh config rather than Octo though

mortimr commented 7 months ago

Same problem on my end What I noticed is that from the PR overview, when I try to add a comment to a thread, it tries to add a COMMENT When going to the thread via the review page, it properly adds a THREAD COMMENT and gh won't complain So basically, cannot answer a thread without re-doing a review and submitting it :/

luigigil commented 5 months ago

Had this problem, and this is what I found: If you have a review in progress, you can only comment on the thread via the review page. If you try to comment in the PR view, it gets gh: Validation Failed (HTTP 422). You need to discard your review to comment via the PR page.