Skip to content

Commit

Permalink
ci: Add license headers for more files
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Apr 12, 2023
1 parent ec1ee13 commit b6af9f5
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
#
# SPDX-License-Identifier: CC0-1.0


# Capella
capella/versions/*/*/capella.tar.gz
capella/versions/*/*/capella.zip
Expand Down
67 changes: 60 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: CC0-1.0

default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -16,8 +18,9 @@ repos:
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
exclude: "backend/t4cclient/extensions/backups/jenkins/config.xml"
- id: check-yaml
exclude: '^tests/data/'
exclude: "^tests/data/|mkdocs.yml"
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
Expand All @@ -33,18 +36,63 @@ repos:
hooks:
- id: isort
types: [python]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
types_or: [ts, css, html, markdown]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
hooks:
- id: remove-tabs
- id: insert-license
name: insert license for Python, yaml and Make- and Dockerfiles
files: '\.py$|\.yaml$|Dockerfile$|Makefile$'
name: Insert license headers (shell-style comments)
files: '(?:^|/)(?:.*\.(?:py|sh|toml|ya?ml|cfg|ini)|Dockerfile|Makefile|nginx.conf)$'
exclude: '(?:^|/)\..+|^docs/Makefile$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txt
- --comment-style
- "#"
- id: insert-license
name: Insert license headers (shell-style comments)
files: '(?:^|/)(?:codeql-analysis.yml|dependabot.yml|\.(?:pre-commit-config.yaml|browserslistrc|editorconfig|(?:git|helm|docker)ignore))$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- "#"
- id: insert-license
name: Insert license headers (XML-style comments)
files: '\.(?:html|md|xml)$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- LICENSES/.license_header_apache.txt
- --comment-style
- '#'
- "<!--| ~| -->"
- id: insert-license
name: Insert license headers (C-style comments)
files: '\.(?:s?css|js|ts)$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txt
- --comment-style
- "/*| *| */"
- id: insert-license
name: Insert license headers (reST comments)
files: '\.rst$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txtcomemnt
- --comment-style
- "..| |"
- repo: https://github.com/fsfe/reuse-tool
rev: v1.1.0
hooks:
Expand All @@ -53,3 +101,8 @@ repos:
rev: v2.5.0
hooks:
- id: conventional-commits
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py311-plus"]
File renamed without changes.
2 changes: 2 additions & 0 deletions LICENSES/.license_header_cc0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
SPDX-License-Identifier: CC0-1.0
3 changes: 2 additions & 1 deletion capella_loop.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-dockerimages contributors
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0

set -e

# This tries to represent a matrix build
Expand Down
6 changes: 3 additions & 3 deletions ci-templates/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
SPDX-License-Identifier: Apache-2.0
-->
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
~ SPDX-License-Identifier: Apache-2.0
-->

# Supported instances

Expand Down
6 changes: 3 additions & 3 deletions ci-templates/gitlab/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
SPDX-License-Identifier: Apache-2.0
-->
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
~ SPDX-License-Identifier: Apache-2.0
-->

# Gitlab CI templates

Expand Down
17 changes: 17 additions & 0 deletions git-conventional-commits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"convention" : {
"commitTypes": [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"test"
],
"commitScopes": []
}
}
2 changes: 2 additions & 0 deletions git-conventional-commits.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
SPDX-License-Identifier: Apache-2.0
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-dockerimages contributors
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0


[project]
dynamic = ["version"]

Expand Down
6 changes: 3 additions & 3 deletions remote/menu.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
~ SPDX-License-Identifier: Apache-2.0
-->

SPDX-License-Identifier: Apache-2.0
-->

<openbox_menu xmlns="http://openbox.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
7 changes: 3 additions & 4 deletions remote/rc.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
SPDX-License-Identifier: Apache-2.0
-->
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
~ SPDX-License-Identifier: Apache-2.0
-->

<openbox_config xmlns="http://openbox.org/3.4/rc"
xmlns:xi="http://www.w3.org/2001/XInclude">
Expand Down
2 changes: 1 addition & 1 deletion t4c/patch_t4c.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-dockerimages contributors
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0

if [[ -n "/opt/updateSite/patch_info.csv" ]];
Expand Down

0 comments on commit b6af9f5

Please sign in to comment.