Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
When posting a comment fails, can't post further comments #1659
I tried to reply to a pull request with a comment from the threadview this morning and got an error flash message (not sure why), after that error, the comment field disappeared from the threadview for that PR.
The comment boxes still showed up on other pull requests from the same repository, so it must have been something that happened to that particular subject.
Also note that screenshot shows that the notification in question (top one) has null comment count, not zero or invisible, just the icon with no count, I suspect that something is changing the subject data when posting a comment fails.
The comment form and comment count came back the next time the subject was synced after I merged it from the GitHub UI.
I'm gonna guess this is due to the comment counts not including the original subject body. So when we do comment.destroy at the end of the comments worker (when failing) it pulls that comment count.
Just a guess.
But yeah, the fact that it's set that comment count to something other than zero will remove the form as I think subject.commentable? will be false.