Open
Description
Describe the bug
When a PR is created with a commit message of around 72 characters the commitlint action will pass. But when the PR is Squashed and Merged Github appends the PR number in the commit message. The appended commit message fails the commitlint after the PR is merged.
https://github.com/opensource-nepal/node-nepali-datetime/actions/runs/11974343317
To Reproduce
Pre-requisite: Github Action is set up on the target branch with pull_request
and push
events.
- Create a PR with a commit message of 72 characters.
- The commitlint will pass.
- Squash and merge the PR.
- Leave the commit message GitHub suggests (PR number appended to the commit message).
- The commitlint fails after the PR is merged as the commit message length exceeds 72 characters.
Expected behavior
The commitlint should be smart enough to overcome this situation.
Possible Solution:
- Ignore the appended PR number; common formats
... (#PR)
and... #PR
.
Environment
- Python version: N/A
- Package version: v1.3.0
- Operating system: Github Actions
- Any other relevant information about your environment.