Commit and PR formalities checker
  • Shell 90.6%
  • JavaScript 9.4%
Find a file
dependabot[bot] 47421b292e ci: bump actions/github-script from 8 to 9
Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-03 10:26:33 +03:00
.githooks repo: add git hooks 2025-12-19 22:56:46 +02:00
.github ci: update floating tags 2026-03-24 01:11:16 +02:00
assets README: add example output 2025-12-17 22:24:04 +02:00
src action: escape LaTeX special characters in output 2026-01-14 20:07:16 +02:00
action.yml ci: bump actions/github-script from 8 to 9 2026-05-03 10:26:33 +03:00
LICENSE action: convert workflow into action 2025-12-17 15:46:25 +02:00
README.md README: update rule descriptions 2026-01-03 03:19:41 +02:00

HyperStickler

test status

Commit & PR formalities checker based on the OpenWrt submission guidelines.

Rules

  • Pull request must come from a feature branch. Configured via the check_branch input.
  • Pull request must not include merge commits.
  • Author name must be either a real name 'firstname lastname' or a nickname/alias/handle.
  • Author email must not be a GitHub noreply email.
  • Commit(ter) name must be either a real name 'firstname lastname' or a nickname/alias/handle.
  • Commit(ter) email must not be a GitHub noreply email.
  • Commit subject must not start with whitespace.
  • Commit subject must start with <package name or prefix>: .
  • Commit subject must start with a lower-case word after the prefix.
  • Commit subject must not end with a period.
  • Commit subject must be <= MAX_SUBJECT_LEN_HARD (and should be <= MAX_SUBJECT_LEN_SOFT) characters long. Limits are 60 and 50 by default, respectively and are configurable via the max_subject_len_hard and max_subject_len_soft inputs.
  • Signed-off-by must match author. Configured via the check_signoff input.
  • Signed-off-by must not be a GitHub noreply email. Configured via the check_signoff input.
  • Commit message must exist.
  • Commit message lines should be <= MAX_BODY_LINE_LEN characters long. Limit is 75 by default and is configurable via the max_body_line_len input.
  • Commit to stable branch should be marked as cherry-picked.

Inputs

All inputs are optional.

check_branch

  • Check if pull request comes from a feature branch.
  • Default: true.

check_signoff

  • Check if Signed-off-by exists and matches author.
  • Default: false.

exclude_dependabot

  • Exclude commits authored by dependabot from some checks.
  • Default: true.

exclude_weblate

  • Exclude commits authored by Weblate from some checks.
  • Default: false.

feedback_url

  • URL to provide feedback to. If empty, no feedback text will be added to either console log or comment.
  • Default: HyperStickler repository.

guideline_url

job_step

  • Job step number that full log link in comment should point to. Otherwise it will point to the job itself. Requires post_comment to be true.

max_body_line_len

  • Max body line length. Longer lines result in a warning.
  • Default: 75.

max_subject_len_hard

  • Hard max subject line length limit. Longer subjects fails check.
  • Default: 60.

max_subject_len_soft

  • Soft max subject line length limit. Longer subjects result in a warning.
  • Default: 50.

post_comment

  • Post summaries to the pull request.
  • Default: false.

warn_on_no_modify

  • Warn when PR edits by maintainers are not allowed. Requires post_comment to be true.
  • Default: false.

Permissions

Posting comments requires pull-requests: write.

Example usage

name: Formalities
on:
  pull_request_target:

permissions:
  pull-requests: write

jobs:
  formal:
    runs-on: ubuntu-slim
    name: Formalities
    steps:
      - name: Check formalities
        uses: georgesapkin/hyperstickler@main
        with:
          check_signoff: true
          exclude_weblate: true
          post_comment: true

Example output

Example output

Example status comment

Warning

Some formality checks failed.

Consider (re)reading submissions guidelines.

Failed checks

Issues marked with an are failing checks.

Commit 57b3864

  • Commit subject must start with <package name or prefix>:

  • Signed-off-by must match author

    Actual: missing or doesn't match author

    Expected: Signed-off-by: Hosted Weblate <hosted@weblate.org>

Commit 5058449

  • 🔶 Commit message lines should be <= 75 characters long

    Actual: line 1 is 137 characters long

    \textsf{This line in the commit body is extremely long and should definitely exceed\color{red}{ the seventy-five character limit imposed by the check script.}}

Commit 2e99bff

  • 🔶 Commit subject must be <= 60 (and should be <= 50) characters long

    Actual: subject is 58 characters long

    \textsf{package: this subject is long and should trigger a\color{yellow}{ warning}\color{red}{}}

Commit fed351d

  • 🔶 Author name must be either a real name 'firstname lastname' or a nickname/alias/handle

    Actual: Nickname seems to be a nickname or an alias

    Expected: a real name 'firstname lastname'

Commit 5130080

  • Commit message must exist

Commit d13201a

  • Signed-off-by must match author

    Actual: missing or doesn't match author

    Expected: Signed-off-by: Good Author <good.author@example.com>

Commit 5f4c710

  • Signed-off-by must match author

    Actual: missing or doesn't match author

    Expected: Signed-off-by: Good Author <good.author@example.com>

Commit b26caff

  • Commit subject must be <= 60 (and should be <= 50) characters long

    Actual: subject is 86 characters long

    \textsf{package: this subject is way too long and should f\color{yellow}{ail the ha}\color{red}{rd limit check of 60 chars}}

Commit d6ffd3d

  • Commit subject must not end with a period

Commit bb7a6f8

  • Commit subject must start with a lower-case word after the prefix

Commit 0f2c7e8

  • Commit subject must start with <package name or prefix>:

Commit f7d3b13

  • Commit subject must not start with whitespace
  • Commit subject must start with <package name or prefix>:

Commit ff3950e

  • Author email must not be a GitHub noreply email

    Expected: a real email address

  • Signed-off-by must not be a GitHub noreply email

    Expected: a real email address

For more details, see the full job log.

Something broken? Consider providing feedback.

Tests

Tests use /tmp to create a temporary git repository in. Otherwise an alternative test path can be passed to the test script that will be created before running tests and removed afterwards.

src/test.sh /optional/path/to/test/repo

License

GNU General Public License v2.0 only