Handle view changes link for body-less reviews with review comments#2364
Handle view changes link for body-less reviews with review comments#2364Urgau merged 4 commits intorust-lang:masterfrom
Conversation
|
Implementation looks fine, but I'm confused by the link message, especially the above part can be confusing if the review threads are long and there are many of them. Why not just use the same string as for the normal reviews with bodies? Then it's obvious that it points to the same thing, and it's just a copy-pasted link. |
|
Hmm, that might be confusing indeed, though I'm not sure if people actually read the timestamps here, and whether they make a difference between when a comment was created and when the review was submitted; I considered these to be mostly an atomic event, from my point of view. Maybe I'd just drop the "above", because the review might not actually be directly above the comment. |
|
Well, there might having been changes pushed in the mean time. But I agree with you that the link text is not ideal, too long and subtlety is not worth confusing people. Maybe we can just change "this" to "the", like so "View changes since the review"? that way it's clear that we are referring to the review, not the comment. |
|
Yeah, I was thinking the same; the comment already contains "the", so just dropping "above" should do the trick, I think. |
|
So "View changes since the review was submitted"? or "View changes since the review"? |
|
I'm fine with both, up to you! (sorry 😆) |
ea4682c to
52bfca0
Compare
|
I went with the second proposal, it's the shortest and closest one to the already existing link. I also fixed the condition for detecting reviews, otherwise it would trigger even on normal comments (that would have been embarrassing ;-)). |
|
Let's do some testing. Normal comment. |
|
Alright, everything seems to be working fine, now. |

This PR address a frustration brought up by some reviewers when a review with a body/description is submitted.
We currently for technical reason we can't add the "View changes this review" link, GitHub blocks it.
This PR adds the links to the closets things available: the review comments (plural).
To avoid an unnecessary API call when we receive the review comments webhooks I added a small cache.
Discussed at #triagebot > View changes link for body-less reviews
cc @jdonszelmann