Repository navigation
add Meta copyright headers to all source files - #2193
Merged
Merged
Conversation
|
@czarandy must be a member of the Meta Open Source team on Vercel to deploy. Learn more about collaboration on Vercel and other options here. |
cixzhang
approved these changes
May 18, 2026
czarandy
force-pushed
the
add-copyright-headers
branch
from
May 18, 2026 23:45
0287e1d to
7714b89
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
czarandy
enabled auto-merge (squash)
May 19, 2026 00:14
czarandy
force-pushed
the
add-copyright-headers
branch
from
May 19, 2026 01:08
69c39a4 to
dc06a3b
Compare
czarandy
force-pushed
the
add-copyright-headers
branch
from
May 19, 2026 01:37
dc06a3b to
bc531b8
Compare
Add "Copyright (c) Meta Platforms, Inc. and affiliates." as the first line of every source file (ts, tsx, js, mjs, cjs, jsx, css, sh, py, yml, yaml, html). Includes a reusable script at scripts/add-copyright.sh with a --check mode for CI verification.
Also updates all code generation scripts (sync-templates, generate-versions, generate-changelog, generate-cli-registry, generate-token-docs) to include the copyright header in their generated output files.
czarandy
force-pushed
the
add-copyright-headers
branch
from
May 19, 2026 01:54
bc531b8 to
d1c6152
Compare
2 of 3 tasks
zurfyx
added a commit
that referenced
this pull request
May 19, 2026
The docsite's prebuild step runs `generate-data.mjs` to emit 9 typed TypeScript registries (packageRegistry.ts, componentRegistry.ts, etc.) into apps/docsite/src/generated/. These files are not git-tracked, so when #2193 added the @xds/copyright-header lint rule and back-filled all checked-in source files, the generated files were missed. Every Vercel deployment of the docsite has been red since with 9 identical errors: Error: File is missing the copyright header @xds/copyright-header (The repro is local-invisible — the lint runs after `next build` in the Vercel pipeline; CI's separate `test` job only checks committed files.) Fix: prepend the copyright header inside writeRegistry() so every generated file picks it up automatically. Verified by regenerating locally and checking all 9 outputs.
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* chore: add copyright notice to all source files Add "Copyright (c) Meta Platforms, Inc. and affiliates." as the first line of every source file (ts, tsx, js, mjs, cjs, jsx, css, sh, py, yml, yaml, html). Includes a reusable script at scripts/add-copyright.sh with a --check mode for CI verification. * chore: enforce copyright header via ESLint rule and CI check Also updates all code generation scripts (sync-templates, generate-versions, generate-changelog, generate-cli-registry, generate-token-docs) to include the copyright header in their generated output files.
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* chore: add copyright notice to all source files Add "Copyright (c) Meta Platforms, Inc. and affiliates." as the first line of every source file (ts, tsx, js, mjs, cjs, jsx, css, sh, py, yml, yaml, html). Includes a reusable script at scripts/add-copyright.sh with a --check mode for CI verification. * chore: enforce copyright header via ESLint rule and CI check Also updates all code generation scripts (sync-templates, generate-versions, generate-changelog, generate-cli-registry, generate-token-docs) to include the copyright header in their generated output files.
4 tasks done
This branch had an error being deployed
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
scripts/add-copyright.shscript (with--checkmode) to apply or verify the header across all file types.@xds/copyright-headerESLint rule with autofix support, so missing headers are caught in the editor and fixed automatically by lint-staged on commit../scripts/add-copyright.sh --checkto catch file types ESLint doesn't cover (CSS, YAML, HTML, shell, Python).Test plan
scripts/add-copyright.sh --checkreports all files have the noticevitest run internal/eslint-plugin-xds/copyright-header.test.mjs)