66# native suggestion syntax, allowing one-click commits of suggested changes.
77#
88# Triggers:
9- # - New PR opened: Initial code review
10- # - Label "code-review" added: Re-run review on demand
11- # - PR marked ready for review: Review when draft is promoted
9+ # - Label "code-review" added: Run review on demand
1210# - Workflow dispatch: Manual run with PR URL
1311#
1412# Note: This workflow requires access to secrets and will be skipped for:
@@ -20,9 +18,7 @@ name: AI Code Review
2018on :
2119 pull_request :
2220 types :
23- - opened
2421 - labeled
25- - ready_for_review
2622 workflow_dispatch :
2723 inputs :
2824 pr_url :
4440 cancel-in-progress : true
4541 if : |
4642 (
47- github.event.action == 'opened' ||
4843 github.event.label.name == 'code-review' ||
49- github.event.action == 'ready_for_review' ||
5044 github.event_name == 'workflow_dispatch'
5145 ) &&
5246 (github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch')
@@ -127,15 +121,9 @@ jobs:
127121
128122 # Set trigger type based on action
129123 case "${GITHUB_EVENT_ACTION}" in
130- opened)
131- echo "trigger_type=new_pr" >> "${GITHUB_OUTPUT}"
132- ;;
133124 labeled)
134125 echo "trigger_type=label_requested" >> "${GITHUB_OUTPUT}"
135126 ;;
136- ready_for_review)
137- echo "trigger_type=ready_for_review" >> "${GITHUB_OUTPUT}"
138- ;;
139127 *)
140128 echo "trigger_type=unknown" >> "${GITHUB_OUTPUT}"
141129 ;;
@@ -157,15 +145,9 @@ jobs:
157145
158146 # Build context based on trigger type
159147 case "${TRIGGER_TYPE}" in
160- new_pr)
161- CONTEXT="This is a NEW PR. Perform a thorough code review."
162- ;;
163148 label_requested)
164149 CONTEXT="A code review was REQUESTED via label. Perform a thorough code review."
165150 ;;
166- ready_for_review)
167- CONTEXT="This PR was marked READY FOR REVIEW. Perform a thorough code review."
168- ;;
169151 manual)
170152 CONTEXT="This is a MANUAL review request. Perform a thorough code review."
171153 ;;
0 commit comments