Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
java_version: '17'
ktlint_version: '-1'
test_command: 'test'
commitlint_version: "20"
secrets:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pull Request License Check
on:
pull_request:

jobs:
check_licenses:
name: Check License Headers
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Find Source Files
id: find-files
shell: bash
run: |
echo "SOURCE_FILES=$(find . -path "*/src/*" \( -name "*.java" -o -name "*.kt" -o -name "*.kts" \) -type f -exec printf "%s " {} \;)" >> "$GITHUB_OUTPUT"

- name: Run addlicense
uses: docker://ghcr.io/google/addlicense:v1.2.0
with:
args: -check -v -f LICENSE ${{ steps.find-files.outputs.SOURCE_FILES }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- opened
- reopened
- edited

jobs:
check_pr_title:
name: Check PR Title
Expand Down
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ else
exit_code=0
fi
### AUTOGENERATED KGP KOTLINTER HOOK END ###

if which addlicense; then
addlicense -f LICENSE $(find . -path "*/src/*" \( -name "*.java" -o -name "*.kt" -o -name "*.kts" \) -type f)
else
echo "ERROR: Please install addlicense to contribute to this project: brew install addlicense"
exit 1
fi
Loading
Loading