Repository navigation
fix(actions): lint pull requests against config-conventional - #55
Merged
Merged
Conversation
pr-checks linted against a hand-written rule set. It now uses @commitlint/config-conventional, installed from the same lockfile, with the caller's rules on top. commitlint.default.yaml is gone. config-conventional caps the header and body lines at 100 characters, which Dependabot's titles and commit bodies exceed, so what Dependabot authors is skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
pr-checkslinted titles and commits against a hand-written rule set. It now uses@commitlint/config-conventional, with the caller'sruleson top.commitlint.default.yamlis removed.This tightens every repository's pull requests
From the release that carries this, every caller of
ci-pris held to config-conventional, not only a known type:Dependabot is exempt
Its titles and commit bodies exceed 100 characters and cannot be shortened (one merged title in
project-templateis 111; one commit body line is 354).ci-prpasses the pull request author to the action, which skips the title when it isdependabot[bot]and skips commits whose author name isdependabot[bot].The commit exemption goes by author name, which anyone can set on a commit. It only skips the per-commit lint; the title of a pull request not opened by Dependabot is still checked, and that is what a squash merge keeps.
Tested
bash .devtools/test-hooks.sh: all pass, with the cases updated for the stricter rules and the config-injection case kept.self-pron this PR runs it. The Dependabot path is not exercised until Dependabot opens a PR.