Show HN: Conventional Comments in GitHub
github.comHey HN, Cesc here, co-founder at Pullpo.
We spend a lot of time doing code reviews on GitHub. One recurring frustration was deciphering ambiguous comments. Misunderstandings slowed us down.
We're big fans of the https://conventionalcomments.org (discussed previously here: https://news.ycombinator.com/item?id=23009467) standard for adding clarity, but remembering and typing the prefixes (suggestion, issue(blocking), etc.) felt like friction.
So, we built a simple, free, open-source Chrome extension to make using this standard effortless within the GitHub UI.
How it works:
• It adds a small toolbar above GitHub comment boxes.
• You click buttons for labels (issue, suggestion, praise, nitpick, etc.) and optional decorators (blocking, non-blocking, if-minor).
• It automatically formats the comment prefix for you.
• There's a "Prettify" option to display prefixes as visual badges (using Shields.io, linked to a simple explainer on pullpo.io).
• It adapts to GitHub light/dark themes.
We built it because we needed it ourselves to improve our internal review process, and thought others might find it useful too. It's completely free and open-source (MIT license).
• Install Link -> https://chromewebstore.google.com/detail/gelgbjildgbbfgfgpib...
• GitHub Repo -> https://github.com/pullpo-io/conventional-comments
• Quick Demo Video -> https://youtu.be/jLzXlZ78rNE?si=KMzIH9Vb43glekEW
We just launched it on the Chrome Web Store. Would love to hear your feedback, suggestions, or any pain points you have with code review comments! Thanks, Cesc
How does the extension hook into GitHub's DOM to inject the comment toolbar, and does it support dynamically loaded elements like in PR reviews with infinite scroll?
Chrome extensions let you execute JS on certain sites, so we can querySelect all target textareas and insert the toolbar anywhere. And yes! That includes dynamically loaded elements like the PR review window. We can even apply light/dark themes that match GitHub's ;)
If you want specifics you can check out the open-source repo here: https://github.com/pullpo-io/conventional-comments
I suggest looking at `content.js`, constant `TARGET_TEXTAREA_SELECTORS` and function `initializeToolbarForTextarea`.
[dead]