CommitCheck Documentation

Contents


Setup Guide

This guide explains how to setup CommitCheck.

Signup and add your regex

1. Signing up is easy, just click on one of the 'Sign in with Github' buttons on the homepage.

2. CommitCheck will ask you to authenticate with Github, this is all that's needed to create an account with CommitCheck. Simply sign in with your Github credentials.

After registering or signing in, you'll be taken to the admin panel where you can specify a matcher (see section on matchers for help).

Add the CommitCheck GitHub App to your project

After signing up and adding a matcher, you need to allow your Github project to talk to CommitCheck.

1. Go to the CommitCheck App homepage and click 'configure'.

2. Then choose which organisation you'd like to configure CommitCheck for

2. Next you can choose whether you want CommitCheck to have access to all repos or specific repos. The app will also show you which permissions CommitCheck requires.

3. Once that's all done, you'll see CommitCheck added to your personal settings.

If you have any problems setting this up, please send a message.


Matchers

CommitCheck supports any ruby regular expression. I recommend Rubular for testing a regex. Here are some examples:

JIRA ticket number regex

\[[A-Z]{3}-\d*\] will match on a JIRA number of the format "ABC-123".

Multiline commit messages

(?=.*Jira Ticket number: )(?=.*What does this address\?)(?=.*What was the solution\?) will match the following commit message:

"Jira Ticket number: RSB-111
What does this address? A new feature.
What was the solution? Some awesome code."


Check Status

CommitCheck can run against commit messages, PR titles or PR descriptions. This section explains how build results are displayed.

Regardless of how you've configured CommitCheck, PRs get marked as pass/fail on the following events:

  • Opening a PR
  • Pushing a commit or rebase
  • Updating a PR description or title

If the check is successful, CommitCheck will mark your commit as passed:

If the check is unsuccessful, CommitCheck will mark your commit as failed:

Next, we'll cover how CommitCheck determines and displays the status for different configurations:

Against Commit Messages

CommitCheck will look at each commit in your PR and check each of them against your regex. If any of the commits fail to match the regex then CommitCheck will fail the PR.

You can click on the details page to get a breakdown of each commit. The details page lists each commit and whether it passed or failed the regex:

Against The Pull Request Title
The status page for pull request title checks has not been built. Right now, it will just redirect to commitcheck.com
Against The Pull Request Description
The status page for pull request description checks has not been built. Right now, it will just redirect to commitcheck.com

Anything Else..

If you would like to request any other regex examples or suggest any features,
please send a message.