Skip to content

Commit fc0cba9

Browse files
furedea-agent[bot]furedeaclaude
authored
fix(claude-review): keep the caller job green when the review is skipped (#5)
## 概要 `claude-review.yml` のレビュー対象外ケース(main への push,furedea-agent 以外の bot の PR,fork PR)で,呼び出し側ジョブ `claude-review / Claude review` が `skipped` になり,`all-green` が失敗する問題を修正します. - 常に成功する `should-review` ジョブを追加(secrets なし,`permissions: {}`,`timeout-minutes: 1`,no-op ステップ 1 つ). - レビュー対象かどうかの判定は,元の `if` 式をそのままジョブの `outputs.run` に移したもの(スクリプトや env 変数なし). - `review` ジョブは `needs: should-review` とし,`outputs.run == 'true'` のときだけ実行. - 内側のジョブが 1 つ成功するため,レビューを skip しても呼び出し側ジョブは success になる. - 呼び出し側(`ci.yml`,`all-green`)と README は変更なし.P0/P1 ゲート,失敗ヒント,concurrency,model,effort も変更なし. ## 検証 - `actionlint` 通過. - 本 PR の CI で `all-green` を含む全チェックが成功.`Review pull request` ステップが実行されており(skipped ではない),式の出力が文字列 `true` として `review` の `if` と一致することを確認. - Claude review の指摘は 0 件. - main への push の場合は,マージ後に親セッションが確認する. Closes #4 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
1 parent 5f1413f commit fc0cba9

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

‎.github/workflows/claude-review.yml‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,28 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
review:
22-
name: Claude review
21+
should-review:
22+
name: Decide whether to review
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 1
25+
permissions: {}
2326
# Only same-repository pull requests (secrets are not passed to forks), and not
2427
# those opened by a bot other than furedea-agent (the action rejects other bots).
25-
if: >-
26-
github.event_name == 'pull_request'
27-
&& github.event.pull_request.head.repo.full_name == github.repository
28-
&& (github.event.pull_request.user.type != 'Bot'
29-
|| github.event.pull_request.user.login == 'furedea-agent[bot]')
28+
# This job always succeeds so the caller job is never reported as skipped.
29+
outputs:
30+
run: >-
31+
${{ github.event_name == 'pull_request'
32+
&& github.event.pull_request.head.repo.full_name == github.repository
33+
&& (github.event.pull_request.user.type != 'Bot'
34+
|| github.event.pull_request.user.login == 'furedea-agent[bot]') }}
35+
steps:
36+
- name: No-op
37+
run: "true"
38+
39+
review:
40+
name: Claude review
41+
needs: should-review
42+
if: needs.should-review.outputs.run == 'true'
3043
runs-on: ubuntu-latest
3144
timeout-minutes: 20
3245
permissions:

0 commit comments

Comments
 (0)