This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move license check to separate file.
- Loading branch information
Heinrich Kuttler
committed
Sep 20, 2021
1 parent
b573f56
commit 2dec456
Showing
2 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Check license | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test_license: | ||
name: Check license headers | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
||
- name: Check copyright header in added files | ||
- shell: bash | ||
- run: | | ||
missing=0 | ||
for file in "${{ steps.changed-files.outputs.added_files }}"; do | ||
if ! egrep -q '(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)' $file | ||
echo "Missing copyright header in $file" | ||
missing=$(expr $missing + 1) | ||
done | ||
exit $missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,26 +13,6 @@ on: | |
|
||
|
||
jobs: | ||
test_license: | ||
name: Check license headers | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
||
- name: Check copyright header in added files | ||
- shell: bash | ||
- run: | | ||
missing=0 | ||
for file in "${{ steps.changed-files.outputs.added_files }}"; do | ||
if ! egrep -q '(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)' $file | ||
echo "Missing copyright header in $file" | ||
missing=$(expr $missing + 1) | ||
done | ||
exit $missing | ||
test_repo: | ||
name: Test on ${{ matrix.os }} w/ Py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
|