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

ci(github-actions): add check-commit task #1357

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Feb 11, 2025

Description

In #1354, commit check was missed. This PR is to add it back

Checklist

  • Add test cases to all the changes you introduce
  • Run poetry all locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

invalid commit should raise an error when running poetry commit-check

Steps to Test This Pull Request

  1. randomly create a commit that does not follow conventional commit
  2. poetry commit-check

Additional context

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.55%. Comparing base (120d514) to head (768d7cb).
Report is 561 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1357      +/-   ##
==========================================
+ Coverage   97.33%   97.55%   +0.22%     
==========================================
  Files          42       55      +13     
  Lines        2104     2622     +518     
==========================================
+ Hits         2048     2558     +510     
- Misses         56       64       +8     
Flag Coverage Δ
unittests 97.55% <ø> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lee-W
Copy link
Member Author

Lee-W commented Feb 16, 2025

@noirbizarre could you please take a quick look when you have some bandwidth 🙂 This would prevent us from merging PR with wrong commit format accidentally

@noirbizarre
Copy link
Member

noirbizarre commented Feb 17, 2025

Note that I thought it was already done by commitizen pre-commit hook:https://github.com/commitizen-tools/commitizen/blob/master/.pre-commit-config.yaml#L50-L56
(and if not, it might be interesting to add this hook)

@Lee-W
Copy link
Member Author

Lee-W commented Feb 18, 2025

Note that I thought it was already done by commitizen pre-commit hook:https://github.com/commitizen-tools/commitizen/blob/master/.pre-commit-config.yaml#L50-L56 (and if not, it might be interesting to add this hook)

It actually is, but it's also quite common for a new contributor to miss this step (and us to accidentally merge it) so better to add an additional safe guard I think 🤔

@Lee-W Lee-W merged commit 295f975 into master Feb 18, 2025
18 checks passed
@Lee-W Lee-W deleted the add-commit-check-back branch February 18, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants