File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11fileignoreconfig:
2+ - filename: .github/workflows/secrets-scan.yml
3+ ignore_detectors:
4+ - filecontent
25- filename: package-lock.json
36 checksum: 8662ef51f09893ea01f9d191eec48984fd6ad71f0f1a34b37e604b7195991ebc
47- filename: test/unit/dummy/asset_publish.json
Original file line number Diff line number Diff line change 1- * @ contentstack/security-admin
1+ * @ contentstack/devex-pr-reviewers
2+
3+ .github /workflows /sca-scan.yml @ contentstack/security-admin
4+
5+ .github /workflows /codeql-anaylsis.yml @ contentstack/security-admin
6+
7+ ** /.snyk @ contentstack/security-admin
8+
9+ .github /workflows /policy-scan.yml @ contentstack/security-admin
10+
11+ .github /workflows /issues-jira.yml @ contentstack/security-admin
You can’t perform that action at this time.
0 commit comments