From 682d3aa52a9117bcfc90c360cda1412cfd3d0deb Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 21 Dec 2023 13:51:32 +0100 Subject: [PATCH 1/2] CI: Check license headers of Go files. --- .github/workflows/licensecheck.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/licensecheck.yml diff --git a/.github/workflows/licensecheck.yml b/.github/workflows/licensecheck.yml new file mode 100644 index 0000000..6d8327e --- /dev/null +++ b/.github/workflows/licensecheck.yml @@ -0,0 +1,46 @@ +name: licensecheck + +on: + push: + branches: [ master ] + paths: + - '.github/workflows/licensecheck.yml' + - '**.go' + pull_request: + branches: [ master ] + paths: + - '.github/workflows/licensecheck.yml' + - '**.go' + +permissions: + contents: read + +jobs: + golang: + name: golang + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install licensecheck + run: | + sudo apt-get -y update + sudo apt-get -y install licensecheck + + - id: licensecheck + name: Check licenses + run: | + { + echo 'CHECK_RESULT<> "$GITHUB_ENV" + + - name: Check for missing licenses + run: | + MISSING=$(echo "$CHECK_RESULT" | grep UNKNOWN || true) + if [ -n "$MISSING" ]; then \ + echo "$MISSING"; \ + exit 1; \ + fi From 9b09ff083b972e10cd7e756bfd15f2d2e7a6ae46 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 21 Dec 2023 16:05:56 +0100 Subject: [PATCH 2/2] Add missing copyright headers. --- allowed_ips.go | 21 +++++++++++++++++++++ allowed_ips_test.go | 21 +++++++++++++++++++++ mock_data_test.go | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/allowed_ips.go b/allowed_ips.go index 22b57ca..bf5d898 100644 --- a/allowed_ips.go +++ b/allowed_ips.go @@ -1,3 +1,24 @@ +/** + * Standalone signaling server for the Nextcloud Spreed app. + * Copyright (C) 2023 struktur AG + * + * @author Joachim Bauch + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package signaling import ( diff --git a/allowed_ips_test.go b/allowed_ips_test.go index 001da6e..a68f3ae 100644 --- a/allowed_ips_test.go +++ b/allowed_ips_test.go @@ -1,3 +1,24 @@ +/** + * Standalone signaling server for the Nextcloud Spreed app. + * Copyright (C) 2023 struktur AG + * + * @author Joachim Bauch + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package signaling import ( diff --git a/mock_data_test.go b/mock_data_test.go index ed0063b..f90927a 100644 --- a/mock_data_test.go +++ b/mock_data_test.go @@ -1,3 +1,24 @@ +/** + * Standalone signaling server for the Nextcloud Spreed app. + * Copyright (C) 2021 struktur AG + * + * @author Joachim Bauch + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package signaling const (