pre-commit add chmod 644
manual hook for Markdown
#11651
+10
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a manual hook that can be used in a full repo clean up on a local machine.
See some of my discussion about manual hooks here:
refs apache/cloudstack-www#362
So Windows users don't normally have the
chmod
command so this hook can be run by macOS and Linux users when needed. And I have also added this to the CI with a--hook-stage manual
run so we don't lose coverage.In future we can add more manual stage hooks.
Some other ASF projects that use the hooks from Lucas-C are Apache Sedona and Apache Airflow:
https://github.com/apache/sedona/blob/6029bec540e11b52d0a21819e23db6f4001cec94/.pre-commit-config.yaml#L78
https://github.com/apache/airflow/blob/ec758b7abf189d5027e830d91effa85e17659249/.pre-commit-config.yaml#L50
Also I added Lucas-C hooks to mruby:
https://github.com/mruby/mruby/blob/437b47dca7ce8a2bf8a660dbbd920caa33c14794/.pre-commit-config.yaml#L69
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Ran pre-commit and all the hooks locally
How did you try to break this feature and the system with this change?