Hacker News new | ask | show | jobs
by figmert 363 days ago
Surely this would be the job of a prepare-commit-msg/commit-msg hook?
2 comments

Yeah, could be a separate tool. Another tool could be a GitHub action that checks if the ids are in each commit; I built a prototype of that for work but it needs some polish and permission for a more general release.

Think these tools together make non-squash PRs much easier to deal with for people who don't want to spend the extra time tidying things up.

BTW, really excited to see this. I was thinking about the concept in a thread last year https://news.ycombinator.com/context?id=40765134

"I look forward to the day that I can run a local LLM (for confidentiality reasons) to automatically reorganize commits within my PR. Should be very safe compared to generating code or merging/rebasing other code since it is just changing the grouping of commits and the final code should be unchanged."

Built this: https://github.com/jaredsohn/git-linear-hook

You can also use the --instructions param for this tool to name commits via the LLM.