Repository navigation
feat(track): 自动收录 Lithe-IDEA 组织的 lithe-plugin-* 仓库 - #49
Merged
Merged
Conversation
Track plugin releases 除了追踪已收录插件的新版本,还会扫描 Lithe-IDEA 组织下尚未收录的公开 lithe-plugin-* 仓库(排除 lithe-plugin-docs、私有、 已归档和 fork 仓库)。仓库有带插件包的正式 Release 时,按包内 plugin.json (id、displayName、vendor.displayName)和仓库简介、许可证、topics 草拟条目, 连同全部正式版本放进同一个 bot PR。pre-release 仍然不收录。 草拟条目和版本一起经过 validateIndex,不合格的仓库只记录跳过原因, 不会让整份索引校验失败、挡住其他插件的新版本。
xiaoyumuxi
marked this pull request as ready for review
November 4, 2026 14:44
5 of 10 tasks
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.
改动类型
插件
lithe-plugin-index.json)改动内容
Track plugin releases原来只追踪已收录插件的新版本,Lithe-IDEA 组织新建的插件仓库必须手工提首次收录 PR。现在它会自动发现并收录组织下的lithe-plugin-*仓库。scripts/track-releases.mjsLithe-IDEA的公开仓库,保留名称以lithe-plugin-开头、尚未收录(按repository不区分大小写比较)、不是私有、已归档或 fork 的仓库。lithe-plugin-docs不发布插件,放在DISCOVERY_EXCLUDED里固定排除。entryFromRepository:取最新的、带插件包的正式 Release 草拟条目。id、name、author来自包内plugin.json(id、displayName、vendor.displayName);repository、homepage(#readme)、description、license(SPDX ID)、tags(topics,为空时省略)来自 GitHub 仓库。仓库没有简介或 GitHub 识别不出许可证时不下载任何包,直接跳过。trackEntry,已收录插件和新插件共用;仍然跳过 draft 和 pre-release。新插件至少加进一个版本才会按 id 排序插入索引,所以只发布过 pre-release 的仓库不会被收录。validateIndex。条目不合格(缺displayName/vendor.displayName、dev.lithe.*命名空间等)时,该仓库只记录跳过原因,不会让整份索引校验失败、挡住其他插件的新版本。id 已被别的条目占用时也跳过并写明占用方。--plugin现在也可以指定组织中尚未收录的插件 ID。GITHUB_OUTPUT增加new_plugins,summary 中的新插件行带[new plugin]后缀。scripts/validate-index.mjsreadPackageManifests(archive, pluginID)的pluginID变成可选;不传时返回所有声明了字符串id的plugin.json,用于在还不知道 id 时读出新插件的清单。原有调用不受影响。.github/workflows/track-releases.ymlbot/track-releases(下一轮扫描会从 main 重建)。文档
docs/publishing.md:“首次收录”开头说明组织仓库自动收录的条件、字段来源表和跳过条件;“发布新版本”说明扫描范围;预发布段落说明稳定版支持后组织插件会被自动首次收录。docs/maintainers.md:审查清单加入 bot 首次收录的检查项;“自动追踪新版本”说明扫描范围、docs 排除和--plugin的新含义。CONTRIBUTING.md:任务表和仓库结构的说明同步更新。测试(
scripts/store.test.mjs)lithe-plugin-*仓库(排除 docs、私有、归档、fork、其他前缀、已收录仓库)。validateIndex,每个包只下载一次,pre-release 不收录。--plugin只保留指定插件。vendor.displayName、dev.lithe.*id;元数据问题在下载前发现。readPackageManifests不传 id 时的行为。验证
node --test scripts/store.test.mjs:50 通过,0 失败。node scripts/validate-index.mjs lithe-plugin-index.json:12 个插件全部有效(本 PR 不改索引)。GITHUB_TOKEN=$(gh auth token) node scripts/track-releases.mjs lithe-plugin-index.json --plugin io.github.lithe-idea.editor-keymap-import --dry-run。输出skipped Lithe-IDEA/lithe-plugin-keymap-import: no stable release with a plugin archive yet(它目前只有 pre-release),退出码 0,没有写索引。自检
plugin.json的vendor.signatureRequirement为"none",ID 不在dev.lithe.*(自动收录同样经过这项校验)node scripts/validate-index.mjs --verify-archives(本 PR 不改索引,没有新包需要校验)plugin.json中声明,并在仓库 README 中说明(不涉及)downloadURL/sha256,没有删除历史版本(撤回除外)