fix(release): 修复发布说明 PR 链接缺失#322
Conversation
- 修复 release notes 生成 job 缺少 PR 读取权限的问题 - 更新 semantic-release 主题恢复点与验证记录 - 补充当前修复分支到 ai-plan 启动映射
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🧰 Additional context used🪛 LanguageToolai-plan/public/semantic-release-versioning/todos/semantic-release-versioning-tracking.md[uncategorized] ~20-~20: The official name of this software platform is spelled with a capital “H”. (GITHUB) [uncategorized] ~23-~23: The official name of this software platform is spelled with a capital “H”. (GITHUB) [uncategorized] ~40-~40: The official name of this software platform is spelled with a capital “H”. (GITHUB) [uncategorized] ~41-~41: The official name of this software platform is spelled with a capital “H”. (GITHUB) [uncategorized] ~56-~56: The official name of this software platform is spelled with a capital “H”. (GITHUB) [grammar] ~76-~76: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) ai-plan/public/semantic-release-versioning/traces/semantic-release-versioning-trace.md[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”. (GITHUB) [uncategorized] ~17-~17: The official name of this software platform is spelled with a capital “H”. (GITHUB) 🔇 Additional comments (4)
📝 WalkthroughWalkthrough为生成 release notes 时读取 PR 元数据,新增并补齐了工作流作业的 Changes工作流权限修复
Sequence Diagram(s)(条件不满足,已省略) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
| Filename | Overview |
|---|---|
| .github/workflows/auto-tag.yml | Adds pull-requests: read to both preview and release jobs; switches git-cliff-action from PAT_TOKEN to github.token so the job-level permission block takes effect. semantic-release correctly retains PAT_TOKEN. |
| .github/workflows/publish.yml | Adds pull-requests: read to the create-release job; git-cliff-action was already using github.token, so this permission addition is all that was needed. |
| ai-plan/public/README.md | Adds fix/release-notes-pr-links branch mapping to the semantic-release-versioning active topic index. |
| ai-plan/public/semantic-release-versioning/todos/semantic-release-versioning-tracking.md | Advances recovery point to SEMREL-RP-007, documents the permission-fix rationale, and records RP-007 validation steps. |
| ai-plan/public/semantic-release-versioning/traces/semantic-release-versioning-trace.md | Prepends SEMREL-RP-007 trace entry under the existing ## 2026-05-04 heading; no duplicate heading introduced in this commit. |
Sequence Diagram
sequenceDiagram
participant SR as semantic-release
participant GCA as git-cliff-action
participant GH as GitHub API
rect rgb(220,240,255)
Note over SR,GH: auto-tag.yml / publish.yml jobs (after fix)
SR->>GH: push / dry-run (PAT_TOKEN — unrestricted)
GCA->>GH: GET /repos/.../pulls?commit_sha=... (github.token + pull-requests:read)
GH-->>GCA: pr_number resolved
GCA-->>GCA: render "by @user in #PR" in release notes
end
Reviews (2): Last reviewed commit: "fix(release): 修复 git-cliff PR 元数据令牌" | Re-trigger Greptile
Summary
Test ResultsDetails
Insights
build-and-test: Run #1052
🎉 All tests passed!Slowest Tests
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 |
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ai-plan/public/semantic-release-versioning/traces/semantic-release-versioning-trace.md`:
- Around line 3-30: Remove the duplicate second-level date header "##
2026-05-04" that appears immediately before "### PR review notes
类型映射修复(SEMREL-RP-006)" so there is only one "## 2026-05-04" section; delete that
extra heading line and keep SEMREL-RP-006 and SEMREL-RP-007 as sibling
subsections under the single date header to resolve the MD024 markdownlint
warning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: de158bb1-37e5-4c6b-82ab-668e34287388
📒 Files selected for processing (5)
.github/workflows/auto-tag.yml.github/workflows/publish.ymlai-plan/public/README.mdai-plan/public/semantic-release-versioning/todos/semantic-release-versioning-tracking.mdai-plan/public/semantic-release-versioning/traces/semantic-release-versioning-trace.md
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Code Quality & Security
- GitHub Check: Build and Test
- GitHub Check: Analyze (C#)
- GitHub Check: submit-nuget
🧰 Additional context used
📓 Path-based instructions (2)
**/{README,readme,ReadMe}.md
📄 CodeRabbit inference engine (AGENTS.md)
Use canonical filename
README.md; do not introduce newReadMe.mdor other filename variants
Files:
ai-plan/public/README.md
ai-plan/public/README.md
📄 CodeRabbit inference engine (AGENTS.md)
ai-plan/public/README.md:ai-plan/public/README.mdMUST list only active topics; do not addai-plan/public/archive/**content to default boot index
When worktree-to-topic mapping changes, or when topic becomes active/inactive, contributors MUST updateai-plan/public/README.mdin same change
Files:
ai-plan/public/README.md
🪛 LanguageTool
ai-plan/public/semantic-release-versioning/todos/semantic-release-versioning-tracking.md
[uncategorized] ~21-~21: The official name of this software platform is spelled with a capital “H”.
Context: ...ase job 增加 pull-requests: read - 保持 .github/cliff.toml 的 by @userin#PR`` 模板不变,只补...
(GITHUB)
🪛 markdownlint-cli2 (0.22.1)
ai-plan/public/semantic-release-versioning/traces/semantic-release-versioning-trace.md
[warning] 28-28: Multiple headings with the same content
(MD024, no-duplicate-heading)
🔇 Additional comments (4)
.github/workflows/publish.yml (1)
243-246: 权限修复正确,LGTM。
create-releasejob 中 git-cliff 使用GITHUB_TOKEN: ${{ github.token }},job 级别的pull-requests: read直接作用于该内置令牌,修复逻辑完整有效。ai-plan/public/README.md (1)
68-70: LGTM。新增映射条目格式与现有条目一致,
semantic-release-versioning已在 Active Topics 中声明,符合编码规范要求。ai-plan/public/semantic-release-versioning/todos/semantic-release-versioning-tracking.md (1)
16-78: LGTM,跟踪记录与本次变更完全对齐。SEMREL-RP-007 恢复点、已知风险、已完成项及验证结论均已更新,与两个 workflow 文件的改动一致。静态分析工具对第 21 行的
GitHub大小写提示为误报(该处.github/cliff.toml是文件路径,不是平台名称)。.github/workflows/auto-tag.yml (1)
18-20:pull-requests: read对 PAT_TOKEN 无效,需在创建 PAT 时确认其权限范围。Job 级别的
permissions块仅控制github.token(即secrets.GITHUB_TOKEN)的访问范围,不影响以 secret 形式传入的 PAT。在preview和releasejob 中,GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}是通过环境变量传入的 PAT,workflow 中的pull-requests: read权限声明对其无任何约束。git-cliff 的 PR 元数据读取能力完全取决于
PAT_TOKEN创建时的配置 scope:
- Classic PAT(
reposcope):已包含 PR 读取权限,git-cliff 可正常获取 PR 链接渲染数据- Fine-grained PAT:需在 token 创建时单独授予
pull-requests: read权限;仅修改 workflow 文件无效建议确认当前使用的
PAT_TOKEN类型及其权限范围,以确保 git-cliff 能够正确渲染发布说明中的 PR 链接。
- 修复 auto-tag 中 git-cliff 使用 PAT_TOKEN 导致 PR 读取权限不受 job permissions 约束的问题 - 修复 semantic-release trace 中重复日期标题触发 MD024 的问题 - 更新 SEMREL-RP-007 跟踪记录,说明发布说明生成的 token 分工与后续恢复点
Summary
Test ResultsDetails
Insights
build-and-test: Run #1053
🎉 All tests passed!Slowest Tests
± Comparison with run #1052 at 3ecc43e | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 2 runs. Github Test Reporter by CTRF 💚 |

修复 release notes 生成 job 缺少 PR 读取权限的问题
更新 semantic-release 主题恢复点与验证记录
补充当前修复分支到 ai-plan 启动映射
Summary by CodeRabbit
修复
文档