Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commitlint fails after squash merge #67

Open
aj3sh opened this issue Nov 23, 2024 · 2 comments · May be fixed by #68
Open

Commitlint fails after squash merge #67

aj3sh opened this issue Nov 23, 2024 · 2 comments · May be fixed by #68
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@aj3sh
Copy link
Member

aj3sh commented Nov 23, 2024

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
Screenshot 2024-11-22 at 8 42 35 PM

To Reproduce
Pre-requisite: Github Action is set up on the target branch with pull_request and push events.

  1. Create a PR with a commit message of 72 characters.
  2. The commitlint will pass.
  3. Squash and merge the PR.
  4. Leave the commit message GitHub suggests (PR number appended to the commit message).
  5. 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.
@aj3sh aj3sh added bug Something isn't working help wanted Extra attention is needed labels Nov 23, 2024
@kiyoon
Copy link

kiyoon commented Nov 27, 2024

I think it should have an option to bypass the 72-character limit, and even configure the length. The length limit is not even on the conventional commit spec.

@aj3sh
Copy link
Member Author

aj3sh commented Nov 27, 2024

I think it should have an option to bypass the 72-character limit, and even configure the length. The length limit is not even on the conventional commit spec.

True, the length check should be optional and limit should be configurable.

@golesuman golesuman linked a pull request Dec 4, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants