summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNoah Zweben <noahz@anthropic.com>2026-07-03 20:19:31 -0400
committerGitHub <noreply@github.com>2026-07-03 19:19:31 -0500
commit8326199c6ec61fdcece33199b61bdaa4f9ae1570 (patch)
tree35cc2dae5d88890480beeffad9dccc892e78931c /.github/workflows
parentb01a789953570a420688033e8518dff3af35bb8d (diff)
validate-licenses: also verify LICENSE content is Apache 2.0 (#3633)
The existing check only verified that a LICENSE file exists in each plugins/ directory. Extend it to also grep for 'Apache License' and 'Version 2.0' so that a placeholder or wrong-license file is caught at PR time rather than silently passing. Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/validate-licenses.yml13
1 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/validate-licenses.yml b/.github/workflows/validate-licenses.yml
index f882df6e..8376578c 100644
--- a/.github/workflows/validate-licenses.yml
+++ b/.github/workflows/validate-licenses.yml
@@ -22,10 +22,14 @@ jobs:
run: |
set -euo pipefail
missing=()
+ wrong_content=()
for plugin_dir in plugins/*/; do
plugin="${plugin_dir%/}"
if [[ ! -f "$plugin/LICENSE" ]]; then
missing+=("$plugin")
+ elif ! grep -q "Apache License" "$plugin/LICENSE" || \
+ ! grep -q "Version 2.0" "$plugin/LICENSE"; then
+ wrong_content+=("$plugin")
fi
done
if [[ "${#missing[@]}" -gt 0 ]]; then
@@ -35,4 +39,11 @@ jobs:
done
exit 1
fi
- echo "All $(ls -d plugins/*/ | wc -l) plugins have a LICENSE file."
+ if [[ "${#wrong_content[@]}" -gt 0 ]]; then
+ echo "::error::The following plugins have a LICENSE file that does not contain Apache 2.0 text:"
+ for p in "${wrong_content[@]}"; do
+ echo " - $p"
+ done
+ exit 1
+ fi
+ echo "All $(ls -d plugins/*/ | wc -l) plugins have an Apache 2.0 LICENSE file."