Skip to content

Commit c17340c

Browse files
committed
📄 Automatic license header check w/ copywrite
1 parent bfaed36 commit c17340c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+179
-0
lines changed

.copywrite.hcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "MIT"
5+
copyright_year = 2024
6+
copyright_holder = "NiceBots"
7+
header_ignore = [
8+
".venv/**",
9+
"logs/**",
10+
".idea/**",
11+
".git/**",
12+
".vscode/**",
13+
"__pycache__/**",
14+
"*.pyc",
15+
]
16+
}

.github/workflows/license.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check for LICENSE file header
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
10+
jobs:
11+
check-license-header:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Setup Copywrite
17+
uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e
18+
- name: Check Header Compliance
19+
run: copywrite headers --plan --config .copywrite.hcl

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
# For more information, please refer to https://aka.ms/vscode-docker-python
25
FROM python:3.12-slim-bookworm
36

config.example.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
#file: noinspection SpellCheckingInspection
25
extensions:
36
topgg: # If your discord bot is on top.gg, you can enable this extension to post your stats (server count, shard count, etc.) on top.gg automatically.

scripts/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
from . import check_listings

scripts/check_listings/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
from .__main__ import main

scripts/check_listings/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
import asyncio
25
import nodriver as uc
36
import markdown

scripts/check_listings/listings/DiscordAppDirectory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
import nodriver as uc
25

36
from bs4 import BeautifulSoup

scripts/check_listings/listings/DiscordBotListCom.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
import nodriver as uc
25
import asyncio
36

scripts/check_listings/listings/DiscordBotsGg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) NiceBots.xyz
2+
# SPDX-License-Identifier: MIT
3+
14
import nodriver as uc
25

36
from bs4 import BeautifulSoup

0 commit comments

Comments
 (0)