Hacker News new | ask | show | jobs
by msbarnett 1417 days ago
When you view a commit on GitHub, you can attach a comment to any given line of it. It looks basically like a comment left on a line of code in a PR, except tied to a commit instead of a PR.
1 comments

Oh. Thanks.

If they're inside of PRs are they still commit comments? I'm thinking not, in which case maybe I never noticed those were a possibility.

A comment <-> PR is a many-many relationship. For a lot of workflows it's practically a one-to-one, as people would only comment on a commit starting from a PR, but you can just comment on any given commit you find.

E.g. here's git.git's first commit, with a lot of random (mostly garbage) comments: https://github.com/git/git/commit/e83c5163316

That wasn't part of a PR (GitHub didn't even exist then), and if it was it could be a part of many different PRs.

I really don't have a full overview of this GitHub change, but this general area is something other hosting providers have definitely struggled with.

I.e. how and when to treat a PR/MR as some holistic vertical component, v.s. being mostly incidental metadata about a "push" (or "potential push"), with the commits (and any comments) being the important way to view or think about individual changes, and anything in-between.