chore: license under Apache-2.0 with CI-enforced SPDX headers#151
Merged
UtkarshBhardwaj007 merged 1 commit intomainfrom May 9, 2026
Merged
chore: license under Apache-2.0 with CI-enforced SPDX headers#151UtkarshBhardwaj007 merged 1 commit intomainfrom
UtkarshBhardwaj007 merged 1 commit intomainfrom
Conversation
- Add LICENSE (canonical Apache-2.0 text from apache.org). - Apply the Parity-style copyright + SPDX + Apache appendix block to every tracked .ts / .tsx / .rs source file (153 files). - Add scripts/check-license-headers.sh — verifies every tracked source file has both the SPDX line and the Parity copyright line; --fix prepends the standard header to any file missing it. The fixer preserves shebangs (`#!/usr/bin/env node|bun`) on line 1 so executable scripts under tools/ and scripts/ continue to run. - Add .github/workflows/license.yml — runs the check on every PR, on push to main, and via workflow_dispatch; concurrency-cancelled to avoid pile-ups; runs on parity-default for org PRs. - Declare license = "Apache-2.0" in package.json and add a pnpm lint:license script that calls the check. - Document the new step in CLAUDE.md, AGENTS.md, and README.md as part of the "Verification before committing" recipe (pnpm format:check + pnpm lint:license + pnpm test). Verification: pnpm format:check, pnpm lint:license, pnpm test (486 tests, 45 files), and pnpm build all pass on this commit. Negative test confirms a bare-SPDX file (no Parity copyright line) is rejected.
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ❌ FAILTag:
Sentry traces: view spans for this run |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LICENSE(canonical Apache-2.0 text) and apply the Parity-style copyright + SPDX + Apache-appendix header to every tracked.ts/.tsx/.rssource file (153 files).scripts/check-license-headers.sh(check +--fixmodes) and a.github/workflows/license.ymlworkflow that runs the check on every PR, on push tomain, and via workflow_dispatch. The check requires both theSPDX-License-Identifier: Apache-2.0line and theCopyright (C) Parity Technologiesline so a bare SPDX identifier alone won't pass. The--fixpreserves shebangs (#!/usr/bin/env node|bun) on line 1 so executable scripts undertools/andscripts/keep working."license": "Apache-2.0"inpackage.json, add apnpm lint:licensescript, and updateCLAUDE.md/AGENTS.md/README.mdwith a "Verification before committing" section that points contributors and AI agents at the full local check recipe (pnpm format:check+pnpm lint:license+pnpm test).Test plan
pnpm format:checkpasses (Biome canonicalised the new headers; one trailing-blank-line nit auto-fixed).pnpm lint:licensepasses — all 153 source files have the strengthened header.// SPDX-License-Identifier: Apache-2.0(no Parity copyright line) is correctly rejected with exit code 1.scripts/check-license-headers.sh --fixis idempotent on a clean tree and correctly preserves shebangs onsrc/index.ts,scripts/check-funder-balance.ts, and the three executable scripts intools/.while IFS= read -r fwith nomapfile, works on macOS bash 3.2 and Ubuntu CI bash.100755(git ls-files --stage scripts/check-license-headers.sh).pnpm testpasses (486 tests across 45 files).pnpm buildsucceeds (bun build --compile).License Headersworkflow turns green on this PR.FormatandUnit Testsworkflows still pass with the new headers.Notes
paritytech/playground-app#159.patch) included so the next release surfaces the license change in the changelog.