Skip to content

chore: add apache license header script & CI check#1404

Open
jescalada wants to merge 9 commits intofinos:mainfrom
jescalada:1002-add-apache-license-headers
Open

chore: add apache license header script & CI check#1404
jescalada wants to merge 9 commits intofinos:mainfrom
jescalada:1002-add-apache-license-headers

Conversation

@jescalada
Copy link
Contributor

@jescalada jescalada commented Feb 13, 2026

Fixes #1002. Inspired by #1253, credit goes to @sam-holmes2 for the original PR 🙂

Changes

  • Added add-license-headers.ts script to /scripts in order to add license headers automatically
    • Executed by running npm run add-license-headers
    • Checks if the license header is already present
    • Included special handling to prevent executable files (with shebangs in first line) from breaking
    • Excludes /src/config/generated files from having the license appended, due to infinite loop with quicktype generated config
  • Prepended the licenses to all TS, JS, TSX and JSX files
    • We may want to extend this to cover other file extensions
  • Added check-license-headers.ts for checking headers in CI
    • Added header check to Code Cleanliness workflow (lint.yml)

Note: For files with shebangs in the first line, we add the license after the shebang
@netlify
Copy link

netlify bot commented Feb 13, 2026

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 3b9d58d
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/699002fd49b259000889a276

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the interesting stuff happens. So you don't have to dig through the diff! 🙂

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (2f71c12) to head (3b9d58d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1404      +/-   ##
==========================================
+ Coverage   81.25%   81.51%   +0.25%     
==========================================
  Files          65       65              
  Lines        4657     4722      +65     
  Branches      792      792              
==========================================
+ Hits         3784     3849      +65     
  Misses        858      858              
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Prevents infinite loops with `quicktype` validation failing due to the license header being present
@jescalada jescalada changed the title chore: add apache license headers chore: add apache license header script Feb 13, 2026
@jescalada jescalada requested review from a team and kriswest February 13, 2026 05:42
@jescalada jescalada self-assigned this Feb 13, 2026
@jescalada jescalada changed the title chore: add apache license header script chore: add apache license header script & CI check Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Apache-2.0 license headers to source code

1 participant