This is an automated email from the ASF dual-hosted git repository.
johnbam pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2ab0ece23c Add pre-commit hook to auto insert license headers for
Markdown (#394)
2ab0ece23c is described below
commit 2ab0ece23c73b2bc014d24e2b420b060d8af780a
Author: John Bampton <[email protected]>
AuthorDate: Tue Aug 5 06:12:02 2025 +1000
Add pre-commit hook to auto insert license headers for Markdown (#394)
Ran the hook the first time it auto inserted the license headers and failed.
Second time ran the hook it passed and no files were change.
The Lucas-C hooks are used on both Airflow and Sedona.
---
.github/workflows/license-templates/LICENSE.txt | 16 ++++++++++++++++
.pre-commit-config.yaml | 12 ++++++++++++
README.md | 19 +++++++++++++++++++
main/sc/README.md | 19 +++++++++++++++++++
main/sd/README.md | 19 +++++++++++++++++++
main/starmath/README.md | 19 +++++++++++++++++++
main/sw/README.md | 19 +++++++++++++++++++
main/swext/README.md | 19 +++++++++++++++++++
test/README.md | 19 +++++++++++++++++++
9 files changed, 161 insertions(+)
diff --git a/.github/workflows/license-templates/LICENSE.txt
b/.github/workflows/license-templates/LICENSE.txt
new file mode 100644
index 0000000000..60b675e310
--- /dev/null
+++ b/.github/workflows/license-templates/LICENSE.txt
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5fc0c61393..839f88dc7f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -31,6 +31,18 @@ repos:
- id: gitleaks
name: run gitleaks
description: check for secrets with gitleaks
+ - repo: https://github.com/Lucas-C/pre-commit-hooks
+ rev: v1.5.5
+ hooks:
+ - id: insert-license
+ name: add license for all Markdown files
+ files: \.md$
+ args:
+ - --comment-style
+ - '<!--||-->'
+ - --license-filepath
+ - .github/workflows/license-templates/LICENSE.txt
+ - --fuzzy-match-generates-todo
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
diff --git a/README.md b/README.md
index f36a8cae82..ae4109b605 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Apache OpenOffice<sup>®</sup>
The Apache OpenOffice project (AOO) provides a full featured office
productivity suite based on open standards.
diff --git a/main/sc/README.md b/main/sc/README.md
index d64dc2646f..1831e060ee 100644
--- a/main/sc/README.md
+++ b/main/sc/README.md
@@ -1 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Calc
diff --git a/main/sd/README.md b/main/sd/README.md
index 3d000f38ba..1302134c40 100644
--- a/main/sd/README.md
+++ b/main/sd/README.md
@@ -1 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Draw / Impress
diff --git a/main/starmath/README.md b/main/starmath/README.md
index 89d2323034..b76c4c7ad0 100644
--- a/main/starmath/README.md
+++ b/main/starmath/README.md
@@ -1 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Math
diff --git a/main/sw/README.md b/main/sw/README.md
index 8e619c484b..3b8eab3fa5 100644
--- a/main/sw/README.md
+++ b/main/sw/README.md
@@ -1 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Writer
diff --git a/main/swext/README.md b/main/swext/README.md
index b095ed4855..bf9d13cad2 100644
--- a/main/swext/README.md
+++ b/main/swext/README.md
@@ -1 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Writer Extensions
diff --git a/test/README.md b/test/README.md
index 03baaaa4b9..aab72b4e8e 100644
--- a/test/README.md
+++ b/test/README.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Apache OpenOffice<sup>®</sup> Test
Apache OpenOffice contains automated test suites that can be ran against the
office. The test framework is written in **Java** and based on **JUnit 4**.