Skip to content

Add MIT license headers to all source files#15

Merged
huangyiirene merged 2 commits intomainfrom
copilot/add-mit-license-header-again
Jan 18, 2026
Merged

Add MIT license headers to all source files#15
huangyiirene merged 2 commits intomainfrom
copilot/add-mit-license-header-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 18, 2026

Added standardized MIT license headers to all TypeScript/JavaScript source files in the repository to properly attribute copyright and license terms.

Changes

  • License Header Template: Added 8-line MIT license header to 14 source files across packages/site/:

    /**
     * ObjectDocs
     * Copyright (c) 2026-present ObjectStack Inc.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */
  • Placement: Headers inserted at file top, before all imports and code

  • Scope: All .ts, .tsx, .js, .jsx files in:

    • app/ (layouts, pages, routes)
    • lib/ (utilities, configuration)
    • Root-level configuration files
  • Implementation: Node.js script with duplicate detection (checks first 10 lines for existing "Copyright"/"License" keywords) and directory exclusions (node_modules, dist, build, .git, coverage)

Original prompt

我需要给我的开源项目 ObjectDocs 的所有源代码文件添加 MIT 许可协议的头部注释。

请编写一个 Node.js 脚本(或者直接修改文件,如果你有权限)来完成以下任务:

  1. 目标文件:递归遍历项目中所有的 .ts, .js, .tsx, .jsx, .vue 文件。
  2. 排除目录:严格排除 node_modules, dist, build, .git, coverage 目录。
  3. 防止重复:读取每个文件,如果文件顶部前 10 行内已经包含 "Copyright" 或 "License" 关键词,则跳过该文件,不要重复添加。
  4. 插入位置:注释必须插在文件的最顶端(在所有的 import 语句之前)。
  5. 注释内容模板
    /**
     * ObjectDocs
     * Copyright (c) 2026-present ObjectStack Inc.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectdocs-site Ready Ready Preview, Comment Jan 18, 2026 3:51am

Request Review

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Add MIT license header to all source files Add MIT license headers to all source files Jan 18, 2026
Copilot AI requested a review from huangyiirene January 18, 2026 03:53
@huangyiirene huangyiirene marked this pull request as ready for review January 18, 2026 03:56
@huangyiirene huangyiirene merged commit 6093110 into main Jan 18, 2026
2 checks passed
hotlong added a commit that referenced this pull request Jan 18, 2026
…cense-header-again"

This reverts commit 6093110, reversing
changes made to e57d7ed.
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.

2 participants