-
Notifications
You must be signed in to change notification settings - Fork 256
Setup pre-push config #14718
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
base: main
Are you sure you want to change the base?
Setup pre-push config #14718
Conversation
|
@petesfrench so far looks good (still reviewing), I just have an observation
|
|
@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 |
|
@samhotep Good suggestions! I have made the changes to the script you suggested |
HACKING.md
Outdated
| ## Pre-push hook | ||
| We has a pre-push hook that will run anytime you try to push changes. To get it to work you need to copy over the pre-push script to `.git/hooks`. This can be done with the following command: |
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.
We has indeed xD
.github/hooks/pre-push
Outdated
| error_flag=1 | ||
| fi | ||
|
|
||
| if ! npx flake8 "${scss_files[@]}" && black --check --line-length 79 "${scss_files[@]}"; then |
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 should be sth like python_files, right?
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.
Do we support python files btw?
samhotep
left a comment
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.
@pete great work! Works very well for html, js and scss files.
Just a qn before I approve, do we want to support python linting in this PR as well?
|
@samhotep It seems I managed to push some incomplete work, we should definitely be checking |
I'm afraid I can't take credit. |
|
@petesfrench @samhotep Thanks for this piece of work! Are there any updates on this PR? |
Done
.pre-commit-config.yamlQA
.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