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

Add Conventional Commit linter to CI #108

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Conversation

KingMob
Copy link
Contributor

@KingMob KingMob commented Apr 23, 2024

No description provided.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.60%. Comparing base (5b275f3) to head (751a683).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #108   +/-   ##
=======================================
  Coverage   75.60%   75.60%           
=======================================
  Files          30       30           
  Lines        1496     1496           
  Branches       64       64           
=======================================
  Hits         1131     1131           
  Misses        301      301           
  Partials       64       64           

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

@KingMob KingMob force-pushed the add-conventional-commit-linter branch 7 times, most recently from cf7804d to e3c3178 Compare April 23, 2024 15:18
@KingMob KingMob requested review from ships and zane April 23, 2024 15:25
@KingMob
Copy link
Contributor Author

KingMob commented Apr 23, 2024

@ships Can you check my GH Action, and let me know if I got the nix setup part right? I'm unclear on when I can use nix develop --command my-command and when I use nix develop --command bash -c "my-command"

I got a lot of 429 Too Many Requests errors until the cache filled up. Is there a way around that?

Finally, I ran nix flake update, but if I wanted to only add node v20, how would I add that to the flake.lock while leaving the other packages unchanged? I'd like to operate under the if-it-aint-broke-dont-fix-it principle when possible.

@zane I set the rules to match your existing style. Generally speaking, do you want this GH Action to warn people, or actually block merging? And are their other repos this should be applied to?

@zane
Copy link
Contributor

zane commented Apr 23, 2024

@KingMob Thank you for this! It should block merging, and we should apply this to all the GenSQL / InferenceQL repos. Basically the ones that are already using this commit style.

@KingMob KingMob force-pushed the add-conventional-commit-linter branch 5 times, most recently from 4f8471d to 01092a3 Compare April 24, 2024 09:38
@KingMob
Copy link
Contributor Author

KingMob commented Apr 24, 2024

Basically the ones that are already using this commit style.

@zane OK, looks to me like Gen.clj, inference, publish, structure-learning, and GenSQL.Gen.clj.adapter. Umm,cloud-builders, yay or nay?

Edit: NM, I found Ulli's complete list in Notion.

@KingMob
Copy link
Contributor Author

KingMob commented Apr 24, 2024

@ships Does the nix stuff look right? Do I need the bash -c or no?

Copy link
Contributor

@ships ships left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, commented on optional verbosity flag for human readers.

.github/workflows/commit-linter.yaml Outdated Show resolved Hide resolved
@@ -54,7 +54,7 @@
in {
# development shell
devShells.default = pkgs.mkShell {
buildInputs = [ pkgs.openjdk21 pkgs.clojure pkgs.babashka depsCache ] ++ (basicToolsFn pkgs);
buildInputs = [ pkgs.openjdk21 pkgs.clojure pkgs.babashka pkgs.nodejs_20 depsCache ] ++ (basicToolsFn pkgs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notably, there are also nodePackages available in nixpkgs that we currently don't use (preferring to make you npm install). But in theory we could add those packages here too. This change makes sense to me as is though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I wasn't sure. I see it in nixpkgs now.

I feel like incompleteness is always such a problem. Like, if there's any package not available in nix, you have to fall back to package.json anyway, and then... what? Merges and conflicts? Human sacrifice, dogs and cats living together, mass hysteria!

@KingMob
Copy link
Contributor Author

KingMob commented Apr 26, 2024

@zane After merging, I'd like to give it a bit of time, make sure it fits smoothly into our workflow, and then roll out to other repos after a week or two.

@KingMob KingMob force-pushed the add-conventional-commit-linter branch from 01092a3 to 7f3fee1 Compare April 26, 2024 10:06
@KingMob KingMob force-pushed the add-conventional-commit-linter branch from 7f3fee1 to 751a683 Compare April 26, 2024 10:15
@KingMob KingMob merged commit 08be109 into main Apr 26, 2024
7 checks passed
@KingMob KingMob deleted the add-conventional-commit-linter branch April 26, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants