You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by je...@apache.org on 2022/11/28 14:19:46 UTC
[incubator-hugegraph-toolchain] branch master updated: feat(apache): support check license header with RAT client model (#352)
This is an automated email from the ASF dual-hosted git repository.
jermy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git
The following commit(s) were added to refs/heads/master by this push:
new 0a728687 feat(apache): support check license header with RAT client model (#352)
0a728687 is described below
commit 0a728687b85b5b3f6dd2f39225cd08e34deb273e
Author: YangJiaqi <ya...@gmail.com>
AuthorDate: Mon Nov 28 22:19:39 2022 +0800
feat(apache): support check license header with RAT client model (#352)
Co-authored-by: imbajin <ji...@apache.org>
Co-authored-by: Cong Zhao <zh...@apache.org>
---
.github/workflows/license-checker.yml | 42 ++++++++++
.licenserc.yaml | 93 ++++++++++++++++++++++
hugegraph-hubble/Dockerfile | 15 ++++
hugegraph-hubble/hubble-be/pom.xml | 14 ++++
.../hugegraph/entity/schema/SchemaConflict.java | 13 ++-
.../src/test/python/steps/check_server_status.py | 14 ++++
hugegraph-hubble/hubble-dist/pom.xml | 14 ++++
hugegraph-hubble/yarn.lock | 0
8 files changed, 204 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml
new file mode 100644
index 00000000..0a06c42a
--- /dev/null
+++ b/.github/workflows/license-checker.yml
@@ -0,0 +1,42 @@
+#
+# 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
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ check-license:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ # A full-featured license tool to check and fix license headers and resolve dependencies' licenses: https://github.com/apache/skywalking-eyes
+ - name: Check License Header
+ uses: apache/skywalking-eyes@main
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ log: info
+ config: .licenserc.yaml
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 00000000..54c12086
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,93 @@
+#
+# 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: # `header` section is configurations for source codes license header.
+ license:
+ spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license.
+ copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template.
+ content: | # `license` will be used as the content when `fix` command needs to insert a license header.
+ 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.
+ # `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`.
+ pattern: |
+ Licensed to the Apache Software Foundation under one or more contributor
+ license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright
+ ownership. The Apache Software Foundation 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.
+ paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
+ - '**'
+
+ paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye.
+ - '.gitignore'
+ - 'LICENSE'
+ - '**/*.md'
+ - '**/*.versionsBackup'
+ - '**/*.log'
+ - '**/*.txt'
+ - '**/*.csv'
+ - '**/*.json'
+ - '**/*.conf'
+ - '**/*.sql'
+ - '**/*.groovy'
+ - '**/*.svg'
+ - '**/*.less'
+ - '**/*.ts'
+ - '**/*.tsx'
+ - '**/*.properties'
+ - '**/*.gitattributes'
+ - '**/.flattened-pom.xml'
+ - '**/.prettierrc'
+ - '**/.stylelintrc'
+ - '**/check_server_status.feature'
+ - '**/yarn.lock'
+ - '**/.env'
+ - '**/config-overrides.js'
+ - '**/index.html'
+ - '**/file_with_empty_line'
+ - '**/file_without_empty_line'
+ - 'hugegraph-dist/**'
+ - '**/hubble-dist/**'
+ - 'assembly/**'
+ - '.github/**/*'
+ - '**/logs/*.log'
+ - '**/target/*'
+ # - 'hugegraph-hubble/hubble-fe/**'
+ comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
+
+ # license-location-threshold specifies the index threshold where the license header can be located,
+ # after all, a "header" cannot be TOO far from the file start.
+ license-location-threshold: 80
diff --git a/hugegraph-hubble/Dockerfile b/hugegraph-hubble/Dockerfile
index af3430d8..51b0aa24 100644
--- a/hugegraph-hubble/Dockerfile
+++ b/hugegraph-hubble/Dockerfile
@@ -1,3 +1,18 @@
+#
+# 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.
+#
+
FROM ubuntu:xenial
RUN set -x \
diff --git a/hugegraph-hubble/hubble-be/pom.xml b/hugegraph-hubble/hubble-be/pom.xml
index 17ba8489..590e8a83 100644
--- a/hugegraph-hubble/hubble-be/pom.xml
+++ b/hugegraph-hubble/hubble-be/pom.xml
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/entity/schema/SchemaConflict.java b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/entity/schema/SchemaConflict.java
index 6970ed97..ff956bf0 100644
--- a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/entity/schema/SchemaConflict.java
+++ b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/entity/schema/SchemaConflict.java
@@ -1,5 +1,16 @@
/*
- * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
+ * 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 org.apache.hugegraph.entity.schema;
diff --git a/hugegraph-hubble/hubble-be/src/test/python/steps/check_server_status.py b/hugegraph-hubble/hubble-be/src/test/python/steps/check_server_status.py
index 51ae81d0..99045fd9 100644
--- a/hugegraph-hubble/hubble-be/src/test/python/steps/check_server_status.py
+++ b/hugegraph-hubble/hubble-be/src/test/python/steps/check_server_status.py
@@ -1,4 +1,18 @@
# -*- coding: UTF-8 -*-
+#
+# 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.
+#
import json
import sys
diff --git a/hugegraph-hubble/hubble-dist/pom.xml b/hugegraph-hubble/hubble-dist/pom.xml
index 3ffc38c9..cc65a866 100644
--- a/hugegraph-hubble/hubble-dist/pom.xml
+++ b/hugegraph-hubble/hubble-dist/pom.xml
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/hugegraph-hubble/yarn.lock b/hugegraph-hubble/yarn.lock
new file mode 100644
index 00000000..e69de29b