This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

GitHub Commit Message Linter Prompt

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a commit message linter to GitHub, helping you write better commit messages by enforcing common style rules. When you view a commit page, commit list, or PR commit view, the script extracts the commit message and analyzes it against configurable linting rules. The rules include: subject line length (≤ 50 characters), body line wrapping (≤ 72 characters), subject starting with a capital letter, no trailing period in the subject, and imperative mood. A badge appears near the commit message showing a summary of results—how many rules passed, how many failed, and an overall status. Clicking the badge reveals a detailed breakdown of each rule with pass/fail indicators. A "Copy lint report" button lets you share the results with your team or include them in code review comments. The linter runs automatically on any commit page you visit.

WHERE IT RUNS

The script runs on GitHub commit pages (github.com/*/*/commit/*), commit list pages (github.com/*/*/commits/*), and pull request commit views (github.com/*/*/pull/*/commits). It supports both desktop and mobile views.

HOW TO USE

After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:

- The "Enable linter" toggle enables or disables the linter.

- In the "Active Rules" section, toggle individual linting rules on or off: "Subject line ≤ 50 characters," "Body wrapped at ≤ 72 characters," "Subject starts with capital letter," "Subject has no trailing period," and "Subject uses imperative mood."

- Click "Refresh linter" to re-run the linter on the current commit.

- Click "Reset rules to defaults" to restore the default rule set.

The linter results appear automatically when you view a commit. Click the ✕ button to hide the linter for the current page.

TECHNICAL SECTION — REAL MECHANISM

The script detects commit-related pages by checking the URL for /commit/, /commits/, or /pull/*/commits. It extracts the commit message using selectors like .commit-title, .commit-message, .commit-body, .js-commit-message, and .commit-description. The message is split into subject (first line) and body (remaining lines). Each linting rule is implemented as a separate function that takes the subject or body and returns a result object with passed/failed status, a name, and a descriptive message. The subject length rule checks if subject.length ≤ 50. The body wrap rule splits the body into lines and checks if any line exceeds 72 characters. The capitalization rule checks if the first character of the subject is uppercase. The no-period rule checks if the subject ends with a period. The imperative rule checks if the subject starts with a common imperative verb (add, fix, update, remove, change, etc.) or a verb-like ending. Results are compiled and rendered in a badge with a green (all passed) or yellow (some failed) status. Each rule result is displayed with a checkmark or cross. The badge is inserted near the commit message using DOM insertion. The script uses a MutationObserver to detect page navigation and re-run the linter when the user moves between commits.

THE PANEL

The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings save automatically via GM_setValue.

PLEASE NOTE

This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. The linting rules are based on common Git commit message conventions, but they are not enforced by Git itself—the script is a helper tool, not a blocker. GitHub frequently updates its commit page structure, which may affect the selectors used to extract commit messages. If the linter stops working, please check for script updates. The script stores only your preferences (enabled state and active rules) via GM_setValue. No data is sent externally—all data is stored locally in your browser. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, textContent, appendChild) and never use innerHTML.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.