Skip to content

chore: copyright header on every source file + GitHub Sponsors button - #23

Open
KageBinary wants to merge 5 commits into
mainfrom
chore/copyright-headers-and-sponsor
Open

chore: copyright header on every source file + GitHub Sponsors button#23
KageBinary wants to merge 5 commits into
mainfrom
chore/copyright-headers-and-sponsor

Conversation

@KageBinary

@KageBinary KageBinary commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Tanner, in Slack: every source file in the open source needs a copyright line at the top, in the format already used with LLC replaced by Inc.. Plus a Sponsor button, since the org has GitHub Sponsorship.

Copyright headers

26 source files get the header as their first line, in each language's own comment syntax:

// Copyright 2026 Ix Infrastructure Inc.

Shebangs stay on line 1 — the header goes after #!/usr/bin/env bash and friends, verified mechanically across every changed file.

The wording matches the LICENSE/NOTICE in the main Ix repo, which read Copyright 2026 Ix Infrastructure LLC, with LLCInc..

Excluded

2,834 files under node_modules/, which is committed to this repo. They are third-party dependencies — we have no standing to put our copyright on them — and any header would be lost on the next npm install anyway.

Sponsor button

The org already has a public sponsors listing at github.com/sponsors/ix-infrastructure, but no repo had a .github/FUNDING.yml — that file, not a README edit, is what renders GitHub's Sponsor button. This adds it, plus a sponsor badge at the top of the README.

Verification

bun test 125 passed / 3 skipped / 0 failed.

Part of a 10-repo sweep across the Ix open source; the main repo is Ix#663.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw

LICENSE copyright holder

The Apache-2.0 appendix here still carried the literal template placeholder — Copyright [yyyy] [name of copyright owner] — so the repo's own license named no owner at all. It now reads Copyright 2026 Ix Infrastructure Inc., matching the header these PRs add to the source files and the notice in the main Ix repo.

CI gate

Headers decay the moment someone adds a file, so this PR also ships the gate. .github/workflows/copyright.yml runs on every PR and push to main and fails the build listing each offender:

2 source file(s) are missing the copyright header:

  ix-cli/src/cli/brand-new.ts
  scripts/brand-new.sh

Fix them all with:

    python3 .github/scripts/copyright-headers.py --fix

The same script carries --fix, so a contributor repairs every offender in one command rather than hand-editing files.

It reuses the exact exclusion rules the headers were applied under — fixtures, linguist-generated paths, build output, dependencies — so the gate agrees with the tree instead of fighting it. Verified by adding a throwaway .ts, a throwaway .sh and a throwaway fixture: it flagged the first two, correctly ignored the fixture, --fix repaired both with the shebang left on line 1, and the re-check went green.

No setup-python step — python3 is preinstalled on ubuntu-latest and the script is stdlib plus git ls-files / git check-attr.

To make this binding, the check needs adding to branch protection — otherwise it reports but cannot block.

Tanner asked for a copyright line at the top of every source file in the
open source, matching the format already used in the Ix repo's LICENSE and
NOTICE with LLC replaced by INC.

- 26 source files get `Copyright 2026 Ix Infrastructure INC` as the
  first line, in each language's comment syntax (`//`, `#`, `@REM`).
  Shebangs and `@echo off` keep line 1.
- **2,834 files under `node_modules/`, which is committed to this repo.** They are third-party dependencies — we have no standing to put our copyright on them — and any header would be lost on the next `npm install` anyway.
- Adds .github/FUNDING.yml so GitHub renders the Sponsor button, plus a
  sponsor badge at the top of the README.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw
KageBinary and others added 4 commits September 9, 2026 17:55
Until now the Apache appendix carried the unfilled template placeholder, so the repo's own license named no owner while its
source files carry `Copyright 2026 Ix Infrastructure INC`. This makes the
two agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw
Without a gate the headers decay the moment someone adds a file. This checks
every tracked source file on each PR and push to main, and ships the same
script with a --fix flag so a contributor can repair all offenders at once.

The check reuses the exact exclusion rules the headers were applied under —
test fixtures, linguist-generated paths, build output and dependencies — so
it agrees with the tree instead of fighting it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw
The check shipped as a workflow of its own, which gates nothing here: the
ruleset requires exactly one status check, `CI Passed`, so a check in any
other workflow reports on the PR and blocks no merge.

Moves it into a job that `CI Passed` already aggregates, beside the other
toolchain-free validation steps.

Adding a second required context to the ruleset was the alternative, and it
would hang every open PR predating the workflow file — the context would never
report on those branches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw
Tanner's wording, confirmed with Ian: `Inc.` rather than `INC`. Applied to
every source header, the LICENSE (and NOTICE where present), the enforcement
script and the contributor docs, so one spelling appears everywhere.

Also tightens the check to match the header line exactly. It previously only
looked for the word "Copyright", which would have passed a file still carrying
the old `INC` spelling — precisely the drift this rename could have left
behind. A file with a copyright line that is not ours verbatim is now reported
separately and never auto-fixed, since inserting a second header would leave it
naming two owners.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WMzUgkHNBXpThNT9c9wWw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant