Skip to content

🧪 Auto-PR: Merge developtest #478

🧪 Auto-PR: Merge developtest

🧪 Auto-PR: Merge developtest #478

Workflow file for this run

name: License Compliance
on:
pull_request:
branches: [main, develop, test]
push:
branches: [main, develop]
permissions:
contents: read
jobs:
reuse-lint:
name: REUSE compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Verifies every file resolves to a license/copyright via REUSE.toml or a
# per-file header. The catch-all in REUSE.toml keeps this green today; it
# tightens automatically as real headers are added.
- name: REUSE lint
uses: fsfe/reuse-action@v5
changed-file-headers:
name: SPDX headers on changed files
runs-on: ubuntu-latest
# Incremental enforcement only where new source lands: feature PRs into
# develop. The release-train promotions (develop -> test -> main) carry a
# large accumulated diff of pre-existing files and must never be gated on
# per-file headers; REUSE compliance is covered by the reuse-lint job's
# REUSE.toml catch-all regardless.
if: github.event_name == 'pull_request' && github.base_ref == 'develop'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
# Only files ADDED in this PR must carry a per-file SPDX header. Modifying
# an existing (legacy) file never forces a header migration mid-change;
# legacy files are migrated opt-in via `bun run spdx:add`.
- name: Check headers on newly added source files
run: |
BASE="${{ github.event.pull_request.base.sha }}"
HEAD="${{ github.event.pull_request.head.sha }}"
mapfile -t FILES < <(git diff --name-only --diff-filter=A "$BASE" "$HEAD" \
| grep -E '\.(ts|tsx|mts|cts|js|jsx|mjs|cjs|scss|sh|bash|py)$' \
| grep -vE 'node_modules/|dist/|build/|coverage/|\.d\.ts$|api-client(/|\.)|\.tgz$' || true)
if [ ${#FILES[@]} -eq 0 ]; then
echo "No newly added source files."
exit 0
fi
node scripts/spdx.mjs --check "${FILES[@]}"