ubuntu.com icon indicating copy to clipboard operation
ubuntu.com copied to clipboard

Setup pre-push config

Open petesfrench opened this issue 1 year ago • 7 comments

Done

  • Add .pre-commit-config.yaml
  • Create bash script to run djlint from package.json

QA

  • Install pre-commit
  • Check out this branch locally
  • Try to commit with an error in each of the cases found in .pre-commit-config.yaml (JS, CSS, HTML, PYTHON)

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-19061

Screenshots

[If relevant, please include a screenshot.]

Help

QA steps - Commit guidelines

petesfrench avatar Feb 06 '25 07:02 petesfrench

@petesfrench so far looks good (still reviewing), I just have an observation

  • If you tend to make many small commits, pre-commit can be brutal especially for unformatted pages
  • What do you think about pre-push hooks? We could run the pre-commit checks as a pre-push script

samhotep avatar Mar 05 '25 09:03 samhotep

@petesfrench the script doesn't detect errors in the new commits, just in the staged changes. Also, we should add a note to the readme about copying the file to .git/hooks/pre-push

samhotep avatar Mar 12 '25 18:03 samhotep

@samhotep Good suggestions! I have made the changes to the script you suggested

petesfrench avatar Mar 18 '25 10:03 petesfrench

@samhotep It seems I managed to push some incomplete work, we should definitely be checking .py files. Could you take another look please

petesfrench avatar Mar 20 '25 14:03 petesfrench

@pete great work

I'm afraid I can't take credit.

pete avatar Apr 11 '25 06:04 pete

@petesfrench @samhotep Thanks for this piece of work! Are there any updates on this PR?

britneywwc avatar Nov 28 '25 08:11 britneywwc