sindresorhus/refined-github

Leave PR comments outside 3-lines window around changed lines #2588

zbstof posted onGitHub

Github does not allow me to leave a comment on the lines that are more than 3 lines away from any changed line.

But sometimes I notice some discrepancy elsewhere that I would like to discuss or the place where I would like to suggest a change is more than 3 lines away - method signature for example. Currently I have 3 options as I see it:

  • Leave a comment on pull request itself and lose the context
  • Add comment on the line that is actually changed and refer to the line number I want to actually discuss - this also loses context and introduces noise (for example I want to leave another comment about the actual line that's changed)
  • Go to View file -> Git Blame -> Find the line in question -> Go to latest commit -> Find the line in question -> Add single comment. This is long-winded way of achieving simple goal, don't you think?

Why we cannot leave comments everywhere? 3-lines limit seems arbitrary. Would be nice addition to refined github.

I know that potential benefit of the limit is that we want to keep our PR straight to the point and no introduce unrelated changes, but I would leave it to the team to enforce that, not to the code review tool.

Example URL: https://github.com/octocat/Spoon-Knife/pull/3/files


This is a pain-point for me too, but I’m not sure it’s actually possible for Refined GitHub to do this.

Regardless, you should send this feature request to support@github.com.

posted by sindresorhus over 5 years ago

Yeah I don’t see how refined GitHub could allow you to do that. Your second solution is not ideal because you’re leaving a comment on a completely unrelated commit, maybe months old, there won’t be trace of it in the PR, and I think the owner of that commit will be notified too.

posted by fregante over 5 years ago

When adding a comment to an PR there is an hidden field called "line". If you change that number of the current line to an line number outside of the diff, the following error pops up and the form is not submitted:

image

This seems indeed impossible...

posted by jerone over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests