Skip to content

Commit 0fdbd04

Browse files
[ISSUE #310] Enable Github Actions for license check and fix license headers (#377)
* add github action for check license * fix syntax and name ci for Check license * fix github action branch typo * enable github actions for license check * add necessary headers * update badges Co-authored-by: Lan Liang <gcslyp@gmail.com>
1 parent cc168e9 commit 0fdbd04

File tree

19 files changed

+246
-101
lines changed

19 files changed

+246
-101
lines changed

.github/workflows/check-license.yml

-23
This file was deleted.

.github/workflows/ci.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#
12
# Licensed to the Apache Software Foundation (ASF) under one
23
# or more contributor license agreements. See the NOTICE file
34
# distributed with this work for additional information
@@ -6,14 +7,15 @@
67
# "License"); you may not use this file except in compliance
78
# with the License. You may obtain a copy of the License at
89
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1011
#
1112
# Unless required by applicable law or agreed to in writing,
1213
# software distributed under the License is distributed on an
1314
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1415
# KIND, either express or implied. See the License for the
1516
# specific language governing permissions and limitations
1617
# under the License.
18+
#
1719

1820
name: "Continuous Integration"
1921

@@ -66,3 +68,17 @@ jobs:
6668

6769
- name: Upload coverage report to codecov.io
6870
run: bash <(curl -s https://codecov.io/bash) || echo 'Failed to upload coverage report!'
71+
72+
license-check:
73+
name: License Check
74+
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- name: Checkout repository
79+
uses: actions/checkout@v2
80+
81+
- name: Check license header
82+
uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.licenserc.yaml

+25-48
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#
2-
# Licensed to Apache Software Foundation (ASF) under one or more contributor
3-
# license agreements. See the NOTICE file distributed with
4-
# this work for additional information regarding copyright
5-
# ownership. Apache Software Foundation (ASF) licenses this file to you under
6-
# the Apache License, Version 2.0 (the "License"); you may
7-
# not use this file except in compliance with the License.
8-
# You may obtain a copy of the License at
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
99
#
10-
# http://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
@@ -16,49 +16,26 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818
#
19-
header: # `header` section is configurations for source codes license header.
19+
20+
header:
2021
license:
21-
spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license.
22-
copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template.
23-
content: | # `license` will be used as the content when `fix` command needs to insert a license header.
24-
Licensed to Apache Software Foundation (ASF) under one or more contributor
25-
license agreements. See the NOTICE file distributed with
26-
this work for additional information regarding copyright
27-
ownership. Apache Software Foundation (ASF) licenses this file to you under
28-
the Apache License, Version 2.0 (the "License"); you may
29-
not use this file except in compliance with the License.
30-
You may obtain a copy of the License at
31-
http://www.apache.org/licenses/LICENSE-2.0
32-
Unless required by applicable law or agreed to in writing,
33-
software distributed under the License is distributed on an
34-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
35-
KIND, either express or implied. See the License for the
36-
specific language governing permissions and limitations
37-
under the License.
38-
# `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`.
39-
pattern: |
40-
Licensed to the Apache Software Foundation under one or more contributor
41-
license agreements. See the NOTICE file distributed with
42-
this work for additional information regarding copyright
43-
ownership. The Apache Software Foundation licenses this file to you under
44-
the Apache License, Version 2.0 \(the "License"\); you may
45-
not use this file except in compliance with the License.
46-
You may obtain a copy of the License at
47-
http://www.apache.org/licenses/LICENSE-2.0
48-
Unless required by applicable law or agreed to in writing,
49-
software distributed under the License is distributed on an
50-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
51-
KIND, either express or implied. See the License for the
52-
specific language governing permissions and limitations
53-
under the License.
54-
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
55-
- '**'
22+
spdx-id: Apache-2.0
23+
copyright-owner: Apache Software Foundation
5624

57-
paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye.
58-
- 'dist'
59-
- 'licenses'
25+
paths-ignore:
26+
- '.github/PULL_REQUEST_TEMPLATE'
27+
- '.gitmodules'
28+
- '**/.gitkeep'
29+
- '**/.gitignore'
6030
- '**/*.md'
31+
- '**/*.json'
32+
- '**/*.ftl'
33+
- '**/*.iml'
34+
- '**/*.ini'
35+
- '**/*.crt'
36+
- '**/*.pem'
6137
- 'LICENSE'
6238
- 'NOTICE'
39+
- 'DISCLAIMER-WIP'
6340

64-
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
41+
comment: on-failure

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Apache EventMesh (incubating)
2-
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
2+
[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml)
33
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
44
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)

README.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Apache EventMesh (Incubating)
2-
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
2+
[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml)
33
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
44
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)

docker/centos7-jdk8/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
FROM docker.io/centos:7
221

322
MAINTAINER mikexue <mike_xwm@126.com>

docker/eventmesh-rocketmq/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
FROM centos7-jdk8:latest
221

322
MAINTAINER mikexue mike_xwm@126.com

docs/.vuepress/config.js

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
module.exports = {
221
title: 'EventMesh',
322
description: 'EventMesh',

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Apache EventMesh (Incubating)
2-
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
2+
[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml)
33
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
44
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)

docs/_config.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
theme: jekyll-theme-cayman
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
theme: jekyll-theme-cayman

docs/cn/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Apache EventMesh (Incubating)
2-
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
2+
[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml)
33
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
44
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)

docs/en/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Apache EventMesh (Incubating)
2-
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
2+
[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml)
33
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
44
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)

eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/LoadBalanceType.java

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package org.apache.eventmesh.common.loadbalance;
221

322
public enum LoadBalanceType {
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
org.apache.eventmesh.connector.rocketmq.MessagingAccessPointImpl
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
org.apache.eventmesh.connector.rocketmq.producer.ProducerImpl

eventmesh-test/src/main/java/org/apache/eventmesh/http/demo/sub/service/SubService.java

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package org.apache.eventmesh.http.demo.sub.service;
221

322
import java.util.Arrays;

0 commit comments

Comments
 (0)