Skip to content

Commit 3316cd3

Browse files
committed
ci: add license header pre-commit action
Related to packit/.github#9 Signed-off-by: Matej Focko <[email protected]>
1 parent 9cbf8ab commit 3316cd3

17 files changed

+52
-0
lines changed

.pre-commit-config.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ repos:
116116
hooks:
117117
- id: check-github-workflows
118118
args: ["--verbose"]
119+
- repo: https://github.com/Lucas-C/pre-commit-hooks
120+
rev: v1.5.5
121+
hooks:
122+
- id: insert-license
123+
files: \.py$
124+
exclude: alembic/
125+
args:
126+
- --license-filepath
127+
- LICENSE_HEADER.txt
128+
- --comment-style
129+
- "#"

LICENSE_HEADER.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright Contributors to the Packit project.
2+
SPDX-License-Identifier: MIT

files/scripts/allowlist.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python3
22

3+
# Copyright Contributors to the Packit project.
4+
# SPDX-License-Identifier: MIT
5+
36
"""
47
CLI script to interact with our allowlist.
58
"""

files/scripts/db-cleanup.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/python3
22

3+
# Copyright Contributors to the Packit project.
4+
# SPDX-License-Identifier: MIT
5+
36
import argparse
47
from sqlalchemy import create_engine, func, select, delete, distinct, union
58
from packit_service.models import (

files/scripts/webhook.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python3
22

3+
# Copyright Contributors to the Packit project.
4+
# SPDX-License-Identifier: MIT
5+
36
"""
47
Generator of webhooks
58
"""

packit_service/worker/celery_task.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
import logging
25
from typing import Optional, Any, Dict
36

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT

packit_service/worker/checker/abstract.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
import logging
25
from abc import abstractmethod
36
from typing import Optional
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT

tests/integration/test_new_hotness_update.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
import json
25
import shutil
36

tests/unit/test_bodhi_update_checks.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
import pytest
25

36
from flexmock import flexmock

tests/unit/test_bodhi_update_error_msgs.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
import pytest
25
from flexmock import flexmock
36

tests/unit/test_models.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
3+
14
from datetime import datetime, timedelta
25

36
import pytest

tests_openshift/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT

tests_openshift/database/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT

tests_openshift/service/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Contributors to the Packit project.
2+
# SPDX-License-Identifier: MIT

0 commit comments

Comments
 (0)