-
Notifications
You must be signed in to change notification settings - Fork 6
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
ci: enable commitlinter with conventional rules #138
Conversation
if: ${{ github.event.pull_request.merged != true }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
Click Remediation section below to solve this issue
with: | ||
fetch-depth: 0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
Click Remediation section below to solve this issue
Codecov Report
@@ Coverage Diff @@
## main #138 +/- ##
=======================================
Coverage 62.06% 62.06%
=======================================
Files 1 1
Lines 58 58
=======================================
Hits 36 36
Misses 15 15
Partials 7 7 |
08062a9
to
cf4024a
Compare
9a66bc9
to
aa12754
Compare
aa12754
to
be66307
Compare
node-version: 20.x | ||
- name: Install dependencies | ||
run: npm i -g @commitlint/cli @commitlint/config-conventional | ||
- name: Validate all commits from PR |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
Click Remediation section below to solve this issue
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.
@artek-koltun can we put .commitlintrc.json
inside .github folder ?
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.
This is a great idea. I personally like even stricter rules than the defaults in commitlinter (like shorter headers), but I'm ok with this.
|
I understand. for example So I'm asking if |
Checked it and the answer is no, it is not supported. It supports different config file formats, but they should be in the root location. |
be66307
to
b410982
Compare
Signed-off-by: Artsiom Koltun <[email protected]>
thanks for checking |
@artek-koltun missed a problem in this PR, I fixed it here 95ce6d7 |
@artek-koltun new problem:
For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default |
See new PR #139 |
if we just use
It will check all the commits from the very first one in the history and will always report fail status. But maybe with ahmadnassri/action-commit-lint it is going to be ok. Another question if we need that check after merging PRs? Probably running it only on PRs and forbidding pushes into main is enough? |
Where did you see that warning? Looks like we use |
please find conventional commit rules https://www.conventionalcommits.org/en/v1.0.0/