Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
chore(license): update copyright notices
Browse files Browse the repository at this point in the history
Add CI check for non go files to check that the files contain a license

Signed-off-by: Rodney Osodo <[email protected]>
  • Loading branch information
rodneyosodo committed Nov 14, 2023
1 parent 974b143 commit a38de3e
Show file tree
Hide file tree
Showing 699 changed files with 841 additions and 644 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

.git
.github
build
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/check-license.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

name: Check License Header

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check-license:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check License Header
run: |
if [ "$(grep -rcL --exclude-dir=.git --exclude-dir=build \
--exclude=\*.crt --exclude=\*.key --exclude=\*.pem \
--exclude=\*.zed --exclude=\*.hcl \
--exclude=CODEOWNERS --exclude=LICENSE --exclude=MAINTAINERS \
--exclude=\*.md --exclude=\*.json --exclude=\*.csv \
--exclude=\*.mod --exclude=\*.sum \
--exclude=\*.tmpl --exclude=\*.args \
--regexp "Copyright (c) Abstract Machines" .)" ]; then
echo "License header check failed"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/workflows/swagger-ui.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

name: Deploy GitHub Pages

on:
Expand Down
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

run:
timeout: 3m
build-tags:
Expand Down Expand Up @@ -29,7 +32,7 @@ linters-settings:
checks: ["-ST1000", "-ST1003", "-ST1020", "-ST1021", "-ST1022"]
goheader:
template: |-
Copyright (c) Magistrala
Copyright (c) Abstract Machines
SPDX-License-Identifier: Apache-2.0
linters:
Expand Down
3 changes: 3 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

version: v1.0
name: CI Pipeline
agent:
Expand Down
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package magistrala
Expand Down
3 changes: 3 additions & 0 deletions api/asyncapi/mqtt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

asyncapi: '2.6.0'
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/mqtt.yml'
info:
Expand Down
3 changes: 3 additions & 0 deletions api/asyncapi/websocket.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

asyncapi: 2.6.0
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/websocket.yml'
info:
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/auth.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.3
info:
title: Magistrala Auth Service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala Bootstrap service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/certs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala Certs service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/consumers-notifiers.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala Notifiers service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/http.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala http adapter
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/provision.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala Provision service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/readers.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala reader service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/schemas/HealthInfo.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

type: object
properties:
status:
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/things.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.3
info:
title: Magistrala Things Service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/twins.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.1
info:
title: Magistrala twins service
Expand Down
3 changes: 3 additions & 0 deletions api/openapi/users.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.3
info:
title: Magistrala Users Service
Expand Down
2 changes: 1 addition & 1 deletion auth.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";
Expand Down
2 changes: 1 addition & 1 deletion auth/api/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

// Package api contains implementation of Auth service HTTP API.
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

// Package grpc contains implementation of Auth service gRPC API.
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/endpoint.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/endpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc_test
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/requests.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/responses.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc
Expand Down
2 changes: 1 addition & 1 deletion auth/api/grpc/setup_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package grpc_test
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0
package http
2 changes: 1 addition & 1 deletion auth/api/http/keys/endpoint.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package keys
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/keys/endpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package keys_test
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/keys/requests.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package keys
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/keys/responses.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package keys
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/keys/transport.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package keys
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/policies/endpoint.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package policies
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/policies/endpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package policies_test
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/policies/requests.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package policies
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/policies/responses.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package policies
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/policies/transport.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package policies
Expand Down
2 changes: 1 addition & 1 deletion auth/api/http/transport.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0
package http

Expand Down
2 changes: 1 addition & 1 deletion auth/api/logging.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

//go:build !test
Expand Down
2 changes: 1 addition & 1 deletion auth/api/metrics.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

//go:build !test
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt/token_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package jwt_test
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt/tokenizer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package jwt
Expand Down
2 changes: 1 addition & 1 deletion auth/keys.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package auth
Expand Down
2 changes: 1 addition & 1 deletion auth/keys_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package auth_test
Expand Down
2 changes: 1 addition & 1 deletion auth/mocks/auth.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package mocks
Expand Down
2 changes: 1 addition & 1 deletion auth/mocks/keys.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package mocks
Expand Down
2 changes: 1 addition & 1 deletion auth/mocks/service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package mocks
Expand Down
2 changes: 1 addition & 1 deletion auth/policies.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package auth
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

// Package postgres contains Key repository implementations using
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/init.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package postgres
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/key.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package postgres
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/key_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package postgres_test
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/setup_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Magistrala
// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

// Package postgres_test contains tests for PostgreSQL repository
Expand Down
Loading

0 comments on commit a38de3e

Please sign in to comment.