vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Allow commenting on lines not changed in a PR

Open stuartleeks opened this issue 3 years ago • 3 comments

I often find myself wanting to comment on lines that haven't changed in a PR. This is typically to call out other places that need updating based on the changes in the PR, but that had been missed.

From what I can tell, the existing behaviour only allows comments to be added on lines that were changed in the PR?

stuartleeks avatar Feb 09 '22 10:02 stuartleeks

This is actually a GitHub limitation. They don't provide a way to add comments in a PR outside of the lines surrounding the change.

alexr00 avatar Feb 10 '22 15:02 alexr00

We would also be very interested in this feature. The limitation forces us into very bad patterns, such as leaving a general comment referencing file and line (as if we did not have a UI for reviews)

albertodiazdorado avatar Oct 15 '24 09:10 albertodiazdorado

We do have a way to make a file level comment, but GitHub still doesn't allow us to leave a comment on a specific line that's outside of a PR:

Image

alexr00 avatar Oct 15 '24 09:10 alexr00

I and most everyone I know would also like to see this feature made available

rmckewen avatar Oct 22 '24 02:10 rmckewen

Hi @alexr00 any updates ?

eyal-converge avatar Mar 28 '25 13:03 eyal-converge

FWIW, here’s a simple hack I follow:

I select multiple lines in the file (even if they are not part of the current PR). When you select lines, the URL in the browser updates to include the selected line numbers. If you copy this URL and open it in another tab, you'll see the selected lines highlighted.
This way, when you share the link with someone (for example, while reviewing a PR), they will see the same lines highlighted.

You can copy this URL and put in comment section of that particular file.

yashwant-raut avatar Apr 28 '25 10:04 yashwant-raut

GitHub made it available recently!

https://github.blog/changelog/2025-09-25-pull-request-files-changed-public-preview-now-supports-commenting-on-unchanged-lines/


By the way, alex was right about that part, i don't know why some people were booing her, it was just a fact:

Image

Malix-Labs avatar Oct 16 '25 18:10 Malix-Labs

Yes, we are looking into it! GitHub hasn't yet made API available for this, but they're working on it. Soon ™️.

alexr00 avatar Oct 17 '25 09:10 alexr00