Skip to content

Commit cfcbe19

Browse files
authored
Merge pull request #180 from contentstack/staging
Back merge
2 parents 6e40987 + 1850911 commit cfcbe19

File tree

5 files changed

+588
-1116
lines changed

5 files changed

+588
-1116
lines changed

.github/workflows/policy-scan.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,23 @@ jobs:
2424
- uses: actions/checkout@master
2525
- name: Checks for License file
2626
run: |
27-
if ! [[ -f "LICENSE" || -f "License.txt" || -f "LICENSE.md" ]]; then exit 1; fi
27+
expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt")
28+
license_file_found=false
29+
current_year=$(date +"%Y")
30+
31+
for license_file in "${expected_license_files[@]}"; do
32+
if [ -f "$license_file" ]; then
33+
license_file_found=true
34+
# check the license file for the current year, if not exists, exit with error
35+
if ! grep -q "$current_year" "$license_file"; then
36+
echo "License file $license_file does not contain the current year."
37+
exit 2
38+
fi
39+
break
40+
fi
41+
done
42+
43+
if [ "$license_file_found" = false ]; then
44+
echo "No license file found. Please add a license file to the repository."
45+
exit 1
46+
fi

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fileignoreconfig:
88
- filename: src/lib/query.ts
99
checksum: c4529069bc974d15c104303c5ae573c9341185a869c612ab07f0ee7f42e8b149
1010
- filename: package-lock.json
11-
checksum: 785542a3fd3925cf6d6067b78580a93519e2fd4f552b0edf747aace573f4a372
11+
checksum: 815fd2251550d87a0f113dd2e14266879be37af3a264041e871436a1cc84ae1c
1212
- filename: .husky/pre-commit
1313
checksum: 5baabd7d2c391648163f9371f0e5e9484f8fb90fa2284cfc378732ec3192c193
1414
version: ""

0 commit comments

Comments
 (0)