wagoid/commitlint-github-action "subject may not be empty"
commitlint validates commit messages against a config (commonly conventional). A message missing a subject after the type fails the subject-empty rule.
What this error means
commitlint fails the PR with "subject may not be empty" and "type may not be empty".
github-actions
⧗ input: fix:
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]Common causes
Empty subject after type
A message like "fix:" has a type but no descriptive subject.
Non-conventional format
A message without a recognized type/subject structure violates the conventional config.
How to fix it
Write a conventional message and lint the right range
- Use "type: subject", for example "fix: handle empty cache key".
- Ensure the action validates the PR commit range (fetch-depth: 0 for the full range).
- Re-run after amending or adding a valid commit.
.github/workflows/commitlint.yml
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6How to prevent it
- Document the commit format and add a local commit-msg hook.
- Use fetch-depth: 0 so commitlint sees the full PR range.
Related guides
release-please "no release created" (no conventional commits)Fix release-please silently creating no release because no Conventional Commits (feat/fix) landed since the l…
reviewdog reports no findings but the step exits 1Fix reviewdog failing the job with exit 1 despite reporting no findings, caused by reporter/level/fail-level…
github/super-linter "fatal: ref does not exist" (default branch not fetched)Fix github/super-linter failing to diff because the default branch was not fetched with full history.