This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 9706369567 [CI] pre-commit: auto add license templates to headers of 
TOML files (#1657)
9706369567 is described below

commit 97063695679c1b7a1264941f9250c11e711adc89
Author: John Bampton <[email protected]>
AuthorDate: Thu Oct 31 13:42:18 2024 +1000

    [CI] pre-commit: auto add license templates to headers of TOML files (#1657)
    
    refs #1647
---
 .github/workflows/license-templates/LICENSE.txt | 16 ++++++++++++++++
 .pre-commit-config.yaml                         | 12 ++++++++++++
 pyproject.toml                                  | 17 +++++++++++++++++
 3 files changed, 45 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 4f6e72bc48..e826e824da 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,6 +10,18 @@ repos:
     hooks:
       - id: identity
       - id: check-hooks-apply
+  - repo: https://github.com/Lucas-C/pre-commit-hooks
+    rev: v1.5.5
+    hooks:
+      - id: insert-license
+        name: Add license for all TOML files
+        files: \.toml$
+        args:
+          - --comment-style
+          - "|#|"
+          - --license-filepath
+          - .github/workflows/license-templates/LICENSE.txt
+          - --fuzzy-match-generates-todo
   - repo: https://github.com/psf/black-pre-commit-mirror
     rev: 24.10.0
     hooks:
diff --git a/pyproject.toml b/pyproject.toml
index 70bf8ffed6..ddedfc1342 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +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.
+
 [tool.bandit]
 skips = ["B101", "B403", "B405", "B608"]
 

Reply via email to