-
Notifications
You must be signed in to change notification settings - Fork 13
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 pre commit #151
base: main
Are you sure you want to change the base?
Add pre commit #151
Conversation
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* Just chmod changes, not a huge diff Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Thank you! Just a few small things to clean up:
|
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
|
Sounds good for 1 and 3, the script permissions were weird because they only get used in the earthly context but this is very reasonable. For point 2 I'm fine keeping it as-is, but I'm going to defer to the author of our traceability stratergy, @ivanperez-keera. I'm going to mark my approval but wait for Ivan's weigh-in before hitting the merge button. Sorry for the slow cadence but we appreciate your contribution! |
@Ryanf55 I see several GA hooks added. In #80, you stated that "There is even support for pre-commit to auto-fix contributions and push a follow up commit." Is that currently enabled with in this PR? If so, that is not something we want (it does not necessarily comply with our process; we had that case already in the past with a script that "fixed" our |
As for the commit history: there's no need to squash always. Just the commit history should explain how to introduce the solution in a clean way, rather than how the developer figured out the steps. It could have one or several commits. That being said:
Also, does this entirely address #80, or only introduce the support we need to actually implement #80? If the latter, then we can accept the contribution but we need to create a new issue called "Introduce support to lint/analyze scripts in CI/CD" with the necessary description, and mention in the issue description or comments that it's related to #80. We should then edit the commit messages in this PR to mention ONLY the new issue number and remove #80. That way, we don't scatter partial solutions for a problem around the history of the repo (it kind of defeats the point of using our development process and |
I did not enable autofix because we decided that already: "I do not think we should let CI make code changes" |
Got it. I'll just add the |
From what I'm reading, adding shellcheck to the pre-commit config and setting CI config to run pre-commit would meet the original definition for #80. If you'd still rather break out the introduction of pre-commit as a separate ticket and merge the change set you have here, then add shellcheck in a separate PR we can do that too. |
Purpose
Add initial pre-commit file
Details
Ticket
Relates #80, for linting at commit time
Next up