-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: introduce husky commit-msg hook and pr title linter #1385
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1385 +/- ##
=======================================
Coverage 99.8% 99.8%
=======================================
Files 199 199
Lines 21557 21557
Branches 6937 7203 +266
=======================================
Hits 21493 21493
+ Misses 64 58 -6
- Partials 0 6 +6 ☔ View full report in Codecov by Sentry. |
will it check for current PR? I mean even your current PR doesn't have the scope so it should fail in the future, is it? 😝 |
@ghiscoding hehe I'm just playing with it right now to get everything setup properly |
ok let me know when it's ready to be merged, looks good from my point of view... also note that I pushed my new release already during lunch time and will do the other repos later tonight after work :) |
yep seems to work even on the current one. I'm not sure if you're following standard conventional-changelog so I kept the defaults as are. If you'd like to tweak things lemme know. Aside from that I'm done with this one and its ready for merge |
Yeah that is indeed my preference, I use Lerna-Lite with the slickgrid-universal/lerna.json Lines 14 to 21 in 492dd06
BTW, I guess your PR title in this case should be a |
I was exactly thinking the same ... it's merely build tooling but ultimately wasn't sure. Good to have the re-confirmation. yeah Husky is a great little tool full of helpful bits and pieces. Used it for tons of things like license checks, coverage mins etc. |
Awesome, it's always nice to have contributions by power users like you :) Thanks again! |
@zewa666 I had to adjust the commitlint rules because it failed on me because the body content went over 100 chars but I don't really care about the body, I do care about the title not being more than 72 chars though. So anyway, I adjusted as below, but I also would like to know if this can be moved to maybe an slickgrid-universal/commitlint.config.js Lines 1 to 7 in 4ed241b
Also another side note, I upgraded to the new |
ahh so after searching on commitlint GitHub, I found that this works
however, How to work with commitlint.config.ts (TypeScript config file) |
@zewa666 ahh gosh I got a much bigger problem, it looks like Husky screwed up my release. I'm completely missing the typical git push. I think Husky blocked it for some reason but didn't exit. The release was created just before you added the PR linter. I typically have a commit of this shape (here's the link for the v4.4.0 release workflow which is shown below)
Comparing today's release workflow with the previous release 2 weeks ago and I can see that there seem to be a race condition with Husky and Lerna EDIT I believe I found a solution, I can disable Husky in CI as per their docs CI server and Docker, it is very important that I disable Husky while pushing a new release. I'll have to update all packages versions by hand since that is completely missing... ah actually just running Lerna version in dry-run mode was enough to get commit changes (good thing I added this new dry-run mode in Lerna-Lite, else I would really have to do it by hand) Well there's a lot of good lessons learned here lol. PR #1390 should hopefully resolve the issue EDIT 2 Wait that seem to have caused other problems or side effect from butched release, some of my commits/PRs got removed completely. For example PR #1386 is gone from the git history for some reason, what the heck?? It looks like I'm missing all the PRs between 1385 and 1389 (including this PR in here too which is weird since I'm commenting in it)... wow that really screwed up a lot of things. I'm not sure how to reapply orphan PRs, at least we still have links to these PRs, they are just missing from git (possibly because of the Lerna release that got butched), I'll have to reapply these PRs manually tomorrow and possibly release another version, it should be ok now that I found how to disable Husky... wow that is a big story this Husky 😅 EDIT 3 I was able to restore the branch which include all of these PRs and created a new PR #1393, that should resolve the problem. I think it might have been caused by me actually now that I think of it, I tried to do a git force push and it didn't work and I might have caused all these issues without realizing it...nonetheless, disabling Husky when releasing is a must and here's the list of latest PRs, I highlighted the missing PRs no longer showing in Git |
* chore(release): publish new version 4.4.0 * docs: add missing commit to changelog * chore: introduce husky commit-msg hook and pr title linter (#1385) * chore: setup husky commit-msg hook with commitlint * chore(deps): upgrade to major `@typescript-eslint` v7 * chore: use pnpm to install commitlint dep * chore: add pnpm install to PR linter workflow * chore: add pnpm install to PR linter workflow * chore: pnpm install commitlint globally * chore: pnpm install commitlint in workspace * chore: revert to using npm install but with --legacy-peer-deps * chore: revert to using npm install but with --force --------- Co-authored-by: ghiscoding <ghiscoding@users.noreply.github.com> Co-authored-by: Vildan Softic <zewa666@gmail.com> Co-authored-by: ghiscoding <Ghislain.Beaulac@se.com>
* chore(release): publish new version 4.4.0 * docs: add missing commit to changelog * chore: introduce husky commit-msg hook and pr title linter (#1385) * chore: setup husky commit-msg hook with commitlint * chore(deps): upgrade to major `@typescript-eslint` v7 (#1386) * chore(deps): upgrade to major `@typescript-eslint` v7 * chore: migrate from node-archiver to fflate to zip standalone SF bundle (#1387) * chore: replace bundle zip creation from `node-archiver` to `fflate` * chore(deps): update to latest pnpm action v3 - latest pnpm action is using Node 20 and drops Node 16 which is EOL
No description provided.