-
Notifications
You must be signed in to change notification settings - Fork 1.3k
pre-commit auto add license headers for all Markdown files #11870
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
pre-commit auto add license headers for all Markdown files #11870
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11870 +/- ##
=========================================
Coverage 17.56% 17.56%
Complexity 15533 15533
=========================================
Files 5909 5909
Lines 529013 529013
Branches 64605 64605
=========================================
+ Hits 92912 92914 +2
Misses 425652 425652
+ Partials 10449 10447 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 15535 |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15545 |
Description
This PR adds a hook to auto add license header to Markdown files with pre-commit or on git commit.
Used on other Apache projects like Airflow and Sedona.
Example:
https://github.com/apache/airflow/blob/a2ee0d80d693890216694a571b11384c056fceb7/.pre-commit-config.yaml#L50
So this can be expanded to add license headers to other files types in future.
So this is more advanced than just checking for missing licenses with the pom.xml rat license plugin. If no license is found it auto inserts the header. On the GitHub CI it just works with pass or fail.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
With pre-commit locally both before and after the license headers were auto added
How did you try to break this feature and the system with this change?