-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
describe your issue
When doing merges, e.g. on github, the signoff trailer will be missing. If you make commitcheck part of your PR checks, the signoff check will thus prevent the PR from being merged.
To reproduce:
- Setup commit check via commit check action as PR prerequisite check
- Create PR that has a nicely formatted commit
- Merge target branch into PR via github
- See the check fail
it's not a bug per se, as it is really working as expected. It's more an unexpected combination of events. I suggest allowing the exclusion of particular commits from particular checks somehow.
commit-check version
commit-check 0.10.1
.commit-check.yml
checks:
- check: message
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\./]+\))?(!)?: ([\w ])+([\s\S]*)|(RELEASE|Merge).*|(fixup!.*)'
error: "The commit message should be structured as follows:\n\n
<type>[optional scope]: <description>\n
[optional body]\n
[optional footer(s)]\n\n
More details please refer to https://www.conventionalcommits.org"
suggest: please check your commit message whether matches above regex
- check: commit_signoff
regex: '(?m)^Ticket-ID:( [A-Z]+-[0-9]+)?'
error: "The commit message should contain a ticket ID footer."
suggest: Please add a 'ticket-id:' footer to your message (can be empty)
- check: author_name
regex: ^[A-Za-zÀ-ÖØ-öø-ÿ\u0100-\u017F\u0180-\u024F ,.\'-]+$|.*(\[bot])
error: The committer name seems invalid
suggest: run command `git config user.name "Your Name"`
- check: author_email
regex: ^.+@.+$
error: The committer email seems invalid
suggest: run command `git config user.email yourname@example.com`
- check: commit_signoff
regex: Signed-off-by:.*[A-Za-z0-9]\s+<.+@.+>
error: Signed-off-by not found in latest commit
suggest: run command `git commit -m "conventional commit message" --signoff`
- check: imperative
regex: '' # Not used for imperative mood check
error: 'Commit message should use imperative mood (e.g., "Add feature" not "Added feature")'
suggest: 'Use imperative mood in commit message like "Add", "Fix", "Update", "Remove"'
shenxianpeng and Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working