Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh we're not talking about commit messages? Wtf are commit comments then?


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.


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.


FYI. We updated the changelog post with more details about what actually changed (and what did not change): https://github.blog/changelog/2022-08-04-commit-comments-no-...

You can still add comments to an individual commit and view them from various pages. However, comments added this way will no longer surface in the timeline(s) of pull request(s) that happen to include the commit. This does not change anything about pull request review comments, including review comments added when reviewing a pull request commit-by-commit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: