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

juzhiyuan pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/next by this push:
     new d0541404 feat: add skywalking-eye license checker (#2490)
d0541404 is described below

commit d0541404de5c11403f07bf99464bb7e12ac7779d
Author: Zeping Bai <[email protected]>
AuthorDate: Thu Jun 30 13:38:44 2022 +0800

    feat: add skywalking-eye license checker (#2490)
---
 .github/workflows/license-checker.yml | 34 +++++++++++++-----
 .licenserc.yaml                       | 67 +++++++++++++++++++++++++++++++++++
 api/internal/conf/conf_test.go        | 16 +++++++++
 web/.editorconfig                     | 17 +++++++++
 web/.eslintignore                     | 17 +++++++++
 web/.husky/pre-commit                 | 17 +++++++++
 web/.prettierignore                   | 17 +++++++++
 7 files changed, 176 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/license-checker.yml 
b/.github/workflows/license-checker.yml
index 87e53281..9090ab7a 100644
--- a/.github/workflows/license-checker.yml
+++ b/.github/workflows/license-checker.yml
@@ -1,20 +1,36 @@
+#
+# 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.
+#
 name: License checker
 
 on:
   push:
-    branches:
-      - master
+    branches: [master, next]
   pull_request:
-    branches:
-      - master
+    branches: [master, next]
 
 jobs:
   check-license:
     runs-on: ubuntu-latest
-
+    timeout-minutes: 3
     steps:
       - uses: actions/checkout@v3
-
-      - name: run license check
-        run: |
-          make license-check
+      - name: Check License Header
+        uses: apache/[email protected]
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 00000000..e6ec0ed5
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+header:
+  license:
+    spdx-id: Apache-2.0
+    copyright-owner: Apache Software Foundation
+
+  license-location-threshold: 250
+
+  paths-ignore:
+    # Frontend files
+    - 'web/yarn.lock'
+
+    # Frontend copied files
+    - 'web/src/components/HeaderDropdown/index.less'
+    - 'web/src/components/HeaderDropdown/index.tsx'
+    - 'web/src/components/NoticeIcon/NoticeList.less'
+    - 'web/src/components/NoticeIcon/NoticeList.tsx'
+    - 'web/src/components/NoticeIcon/index.less'
+    - 'web/src/components/NoticeIcon/index.tsx'
+    - 'web/src/components/PageLoading/index.tsx'
+    - 'web/src/components/PluginFlow/components/Toolbar/index.tsx'
+    - 'web/src/components/RightContent/AvatarDropdown.tsx'
+    - 'web/src/components/RightContent/index.less'
+    - 'web/src/components/RightContent/index.tsx'
+    - 'web/src/libs/iconfont.js'
+    - 'web/src/pages/404.tsx'
+    - 'web/src/pages/document.ejs'
+
+    # Backend files
+    - 'api/logs/.gitkeep'
+    - 'api/service/apisix-dashboard.service'
+    - 'api/VERSION'
+
+    # Other files
+    - 'go.mod'
+    - 'go.sum'
+    - '**/*.log'
+    - 'LICENSE'
+    - 'NOTICE'
+    - '**/*.json'
+    - '**/*.key'
+    - '**/*.crt'
+    - '**/*.pem'
+    - '**/*.svg'
+    - '**/*.pb.go'
+    - '.github/'
+    - '.yamllint'
+    - '.gitignore'
+    - '.gitmodules'
+    - '.dockerignore'
+
+  comment: on-failure
diff --git a/api/internal/conf/conf_test.go b/api/internal/conf/conf_test.go
index 1a1a1c3e..5916b9b6 100644
--- a/api/internal/conf/conf_test.go
+++ b/api/internal/conf/conf_test.go
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 package conf
 
 import (
diff --git a/web/.editorconfig b/web/.editorconfig
index 7e3649ac..72c20a8c 100644
--- a/web/.editorconfig
+++ b/web/.editorconfig
@@ -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.
+#
+
 # http://editorconfig.org
 root = true
 
diff --git a/web/.eslintignore b/web/.eslintignore
index f3ff8d53..fd333afe 100644
--- a/web/.eslintignore
+++ b/web/.eslintignore
@@ -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.
+#
+
 /lambda/
 /scripts
 /config
diff --git a/web/.husky/pre-commit b/web/.husky/pre-commit
index 99c3bc8e..07d742fd 100755
--- a/web/.husky/pre-commit
+++ b/web/.husky/pre-commit
@@ -1,4 +1,21 @@
 #!/bin/sh
+#
+# 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.
+#
+
 . "$(dirname "$0")/_/husky.sh"
 
 cd web
diff --git a/web/.prettierignore b/web/.prettierignore
index 87715a7d..f33dabfe 100644
--- a/web/.prettierignore
+++ b/web/.prettierignore
@@ -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.
+#
+
 **/*.svg
 package.json
 .umi

Reply via email to