A simple Chrome extension to help format squash commits on GitHub.
Manually copying ticket links and formatting commit messages is tedious. This extension adds a button to your PR page that does it for you.
- Auto-Formatting: Grabs the PR title and prefixes it based on your branch name (e.g.
feat(subtitles): ...if your branch isfeat/subtitles). - Ticket Extraction: Scans the PR body for ticket references (like
CLI-1234orGAMMA-9876) and grabs their full links. - Sidebar UI: Opens a non-intrusive sidebar with the formatted message ready to copy. One click to "Copy All".
- Load the extension (see below).
- Go to any GitHub Pull Request.
- Scroll down to the merge bar.
- Click the ✨ Auto Squash button.
- A sidebar will open on the right with your formatted commit message.
- Click Copy All and paste it into the squash form.
- Clone or download this repo.
- Open Chrome and head to
chrome://extensions/. - Toggle Developer mode on (top right).
- Click Load unpacked.
- Select this folder.
It's just a light content.js script that observes the DOM. When it sees the GitHub merge actions, it injects the button. When you click it, it just grabs the text from the page elements (.js-issue-title, .comment-body, etc), formats it, and puts it in a sidebar overlay. No API tokens or auth required.