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

Implementing Commitlint with Conventional Commit Configuration #200

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

pplancq
Copy link
Contributor

@pplancq pplancq commented Mar 25, 2024

Hello,

This PR introduces commitlint configured with the conventional commit standard. The aim is to ensure that all commits adhere to a consistent style for better code management and readability, as indicated in issue #195.

Two levels of verification have been added:

  1. Local verification through husky commit-msg, which checks each commit made locally.
  2. A build workflow verification that checks all commits within a PR (only on a PR).

The build workflow has been revised for easier review, separating different stages (lint, test, build) into distinct steps. A package-lock verification stage has also been added. This was motivated by noticing frequent discrepancies between package.json and package-lock.json in several projects I've worked on.

The documentation has been updated to indicate that the project uses the conventional commit standard (pending approval of this PR).

Your review and feedback are appreciated.

Best.

@pplancq pplancq force-pushed the feature/commitlint branch 2 times, most recently from 4efbc4c to a91823a Compare March 25, 2024 13:19
@bencompton
Copy link
Owner

Nice! One concern I have at the moment is the release workflow expects a commit like Release v4.0.2, which I don't think will pass linting after this PR, right?

@pplancq
Copy link
Contributor Author

pplancq commented Mar 25, 2024

Hello, my configuration excludes the commit annalize if it includes the word release

so normally this shouldn't be a problem.

@pplancq
Copy link
Contributor Author

pplancq commented Mar 25, 2024

Oops, my current configuration is case-sensitive, so I'm going to do an update to fix that.

I'll take this opportunity to resolve any conflicts.

@pplancq
Copy link
Contributor Author

pplancq commented Mar 25, 2024

I've corrected the conflicts.
You can see in the github action logs the commit validation with the convential commit.

image

Contributors will automatically see failed actions and can then correct their commit message.
However, this case will only arise if the contributor commits with the --no-verify option.

@bencompton bencompton merged commit 1c8c510 into bencompton:master Mar 26, 2024
2 checks passed
@bencompton
Copy link
Owner

Merged! 🥳

@pplancq pplancq deleted the feature/commitlint branch March 26, 2024 07:44
Copy link

github-actions bot commented Apr 3, 2024

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants