-
Notifications
You must be signed in to change notification settings - Fork 930
ci: add commitlint GitHub Actions #4440
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
base: master
Are you sure you want to change the base?
ci: add commitlint GitHub Actions #4440
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
.github/workflows/commitlint.yml
Outdated
- name: Create commitlint.config.js | ||
run: | | ||
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it already present at
Lines 28 to 33 in 8a295f0
"commitlint": { | |
"extends": [ | |
"@commitlint/config-conventional", | |
"@commitlint/config-workspace-scopes" | |
] | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is.
I removed the Create commitlint.config.js
step.
.github/workflows/commitlint.yml
Outdated
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install --ignore-engines --frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run: yarn install --ignore-engines --frozen-lockfile | |
run: yarn install --frozen-lockfile |
Alreay set at
Line 2 in 8a295f0
--install.ignore-engines true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, deleted.
Personally I never use a separate workflow for Line 1 in 8a295f0
|
You are right. but, some PRs don't follow the rules. |
And that's totally fine for users to contribute easily, the final committed message will follow our rules when we merge those PRs. |
Wow, sounds nice! |
I guess it depends on how strict the org is and why you need a specific commit message format. And what consequences you have to deal with if a "wrong" messages is being merged. In our case we haven't been strict and (mostly) update wrong messages when a PR is being merged. The value I would see in this PR is that we would dogfood our own docs, which might be good to see if things are working as expected? |
Currently I do not work on any project using commitlint at all 😅 |
Such dogfooding would make contributing to this project more difficult as I mentioned.
Oh, really? I'm using it in all my projects. 🤣 |
I quite agree.
The most of contributors are so polite and wise |
I see your points. |
Then how those false postive PRs came from? |
Umm... I'm not sure... I felt that the importance of this issue might depend on whether you value the user or the contributor. @JounQin I am very appreciative of your input. I was very happy to hear how the maintainers use commitlint in their works. |
The contributors are also the users at the same time. ❤️ |
I feel like it could be a nice way to point people at a working (CI) example as well. |
Description
This PR adds a new GitHub Actions workflow that enforces Conventional Commit message conventions by installing dependencies, building the code, and validating commits on pushes, pull requests, and manual triggers.
File-Level Changes
.github/workflows/commitlint.yml
.github/workflows/commitlint.yml
.github/workflows/commitlint.yml
Motivation and Context
Introduce a Conventional Commitlint workflow to enforce commit message conventions.
Why doesn't official repo check the commit message?Usage examples
Sequence Diagram for the Commit Validation Process
How Has This Been Tested?
My forked repo and this commit's test were succeeded.
Types of changes
Checklist: