Skip to content

A bookmarklet to check commit messages in PRs #12107

Closed
@vsemozhetbyt

Description

@vsemozhetbyt

I am not sure if this is a proper place to share this small thing, feel free to close and redirect)

Currently, we have at least two very good tools for collaborators: core-validate-commit and node-review. However, they are not convenient to check PR commit messages in GitHub web interface. So I've jotted down a little silly bookmarklet for this.

To save it, you can simply select the code (from javascript: { up to the last }) and drag it to the bookmarks panel, then edit the bookmark name.

To use it, you should be in the 'Conversation' or 'Commits' tab of a PR (the latter is neater as it uses only own PR commits, not commits from other PR/issues cross-references).

It checks the most formal commit guidelines rules: title/lines length, title format, full URLs. It uses title attribute of commit links. It marks these links according to the check result and adds a small red ! sign near erroneous commits with a title attribute containing error explanations. It also alerts the overall check result and scrolls the page up to the first commit.

To test it just open any PR with many commits (the last example) and click on the bookmarklet.

It can produce many false positive (or false negative) messages for now.

Feel free to fork and adjust anything)

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaIssues and PRs related to the general management of the project.toolsIssues and PRs related to the tools directory.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions