diff --git a/.github/workflows/track-releases.yml b/.github/workflows/track-releases.yml index 6d3609a..b2cac6e 100644 --- a/.github/workflows/track-releases.yml +++ b/.github/workflows/track-releases.yml @@ -62,10 +62,13 @@ jobs: git config user.name "lithe-store-bot" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git switch -C "$BRANCH" - git add lithe-plugin-index.json + # main is protected, so Sync README could only follow up with a second + # pull request. Render the overview here so one merge covers both. + node scripts/render-readme.mjs + git add lithe-plugin-index.json README.md git commit -m "chore(index): track new plugin releases" -m "$SUMMARY" git push --force origin "$BRANCH" - body=$(printf '自动追踪到新的插件版本:\n\n%s\n\n已校验 SHA-256 与包内 plugin.json(id、version、pluginAPIVersion、signatureRequirement)。维护者请按 docs/maintainers.md 的清单审查后合并。' "$(echo "$SUMMARY" | tr ',' '\n' | sed 's/^ */- /')") + body=$(printf '自动追踪到新的插件版本:\n\n%s\n\n已校验 SHA-256 与包内 plugin.json(id、version、pluginAPIVersion、signatureRequirement),README 总览已一并重新生成。维护者请按 docs/maintainers.md 的清单审查后合并。' "$(echo "$SUMMARY" | tr ',' '\n' | sed 's/^ */- /')") if gh pr view "$BRANCH" --json state -q .state 2>/dev/null | grep -q OPEN; then gh pr edit "$BRANCH" --body "$body" else diff --git a/docs/maintainers.md b/docs/maintainers.md index c48fb14..9e852a6 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -20,7 +20,7 @@ CI(`Validate index`)已经自动保证: ## 自动追踪新版本 `Track plugin releases` 每 6 小时运行一次,也可在 Actions 中手动运行(可只指定一个插件 ID)。 -它把结果统一提交到 `bot/track-releases` 分支并开一个 PR;新的扫描会覆盖这个分支并更新 PR 描述。 +它把结果统一提交到 `bot/track-releases` 分支并开一个 PR,PR 里同时包含索引和重新生成的 README 总览(合并后不需要再等 `Sync README`);新的扫描会覆盖这个分支并更新 PR 描述。 需要的仓库设置: