Skip to content

ci: auto-review fork PRs from allowlisted authors - #151

Merged
Carinoasd merged 1 commit into
masterfrom
ci/claude-review-allowlist
Sep 30, 2026
Merged

Carinoasd merged 1 commit into
masterfrom
ci/claude-review-allowlist

Conversation

@Carinoasd

Copy link
Copy Markdown
Owner

變更

  • claude-code-review.yml 改用 pull_request_target 觸發,讓 fork 的 PR 也能取得 secret、跑自動審查。
  • 只有下列 PR 會審查(草稿一律跳過):
    • 從本 repo 分支開的 PR(跟原本一樣)
    • 作者列在 repo 變數 CLAUDE_REVIEW_USERS 裡的 fork PR
  • 名單用 repo 變數管理(Settings → Secrets and variables → Actions → Variables),以逗號分隔 GitHub 帳號,例如 bbtu1,alice。改名單不用改 workflow。

安全考量

  • 只 checkout base 分支,不 checkout 也不執行 PR 的程式碼;Claude 只透過 gh pr diff/view 讀內容、用 gh pr comment 留言。
  • 名單內的非 write 使用者走 allowed_non_write_users + job 範圍的 GITHUB_TOKEN(job 結束即失效),workflow 權限只有 contents: read、pull-requests: write。
  • workflow 檔以 base 分支為準,fork 的 PR 無法修改它。

注意

  • 審查留言會以 github-actions[bot] 身分發出。
  • 名單裡的帳號大小寫要跟 GitHub 帳號完全一致。

🤖 Generated with Claude Code

Switch the Claude review workflow to pull_request_target so fork PRs can
use the base repo's secrets. Fork PRs are reviewed only when the author is
listed in the CLAUDE_REVIEW_USERS repo variable; the PR head is never
checked out.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T07:58:21.961470Z eff8559 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Carinoasd
Carinoasd merged commit 5d3c51e into master Sep 30, 2026
5 checks passed
@Carinoasd
Carinoasd deleted the ci/claude-review-allowlist branch September 30, 2026 08:04
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