Skip to content

Commit b3eee64

Browse files
ajstormclaude
andcommitted
dev-inf: Improve AI review workflow based on feedback
This commit addresses feedback on the three-stage Claude Code PR review workflow: 1. Added 60-minute timeout to prevent jobs from running indefinitely (previous run exceeded 2.5 hours before being cancelled). 2. Skip workflow entirely if PR is already merged. The workflow now checks github.event.pull_request.merged in the job condition to prevent unnecessary runs on merged PRs. 3. Removed 'labeled' from trigger types. Since the workflow now runs by default (not triggered by labels), changing labels on a PR should not trigger new workflow runs. 4. Added guidance in PR comment to help users navigate verbose output. Users are now directed to scroll to the bottom of the workflow run to find the Final Analysis Summary, making it easier to locate the relevant findings among the three-stage output. Release note: none Epic: None 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cd17f4e commit b3eee64

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/pr-analyzer-threestage.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ name: Claude Code PR Review
22

33
on:
44
pull_request_target:
5-
types: [synchronize, ready_for_review, reopened, labeled]
5+
types: [synchronize, ready_for_review, reopened]
66

77
jobs:
88
claude-code-pr-review:
99
runs-on: ubuntu-latest
10-
if: "!startsWith(github.base_ref, 'release-') && !contains(github.event.pull_request.labels.*.name, 'O-No-AI-Review')"
10+
timeout-minutes: 60
11+
if: "!startsWith(github.base_ref, 'release-') && !contains(github.event.pull_request.labels.*.name, 'O-No-AI-Review') && github.event.pull_request.merged == false"
1112
permissions:
1213
contents: read
1314
pull-requests: write
@@ -237,8 +238,10 @@ jobs:
237238
**Next Steps:**
238239
Please review the detailed findings in the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
239240
241+
**Note:** When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary.
242+
240243
After you review the findings, please tag the issue as follows:
241244
- If the detected issue is real or was helpful in any way, please tag the issue with \`O-AI-Review-Real-Issue-Found\`
242245
- If the detected issue was not helpful in any way, please tag the issue with \`O-AI-Review-Not-Helpful\`"
243246
244-
gh pr edit ${{ github.event.pull_request.number }} --add-label "o-AI-Review-Potential-Issue-Detected"
247+
gh pr edit ${{ github.event.pull_request.number }} --add-label "o-AI-Review-Potential-Issue-Detected"

0 commit comments

Comments
 (0)