Skip to content

Commit ad46b4d

Browse files
committed
Sync auto-tag-based-review.yml from .github repo
1 parent e7d09de commit ad46b4d

File tree

1 file changed

+77
-21
lines changed

1 file changed

+77
-21
lines changed

.github/workflows/auto-tag-based-review.yml

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ on:
55
tags:
66
- 'e2eweekly'
77
- 'weeklyreview'
8+
- 'proreview'
89
- 'e2e-*'
910
- 'review-*'
11+
- 'proreview-*'
1012
workflow_dispatch:
1113
inputs:
1214
review_type:
@@ -18,18 +20,28 @@ on:
1820
- e2e
1921
- weekly
2022
- full
23+
- pro
2124
ai_model:
2225
description: 'AI Model to use for review'
2326
required: false
24-
default: 'gpt-5.1-codex'
27+
default: 'gpt-5.4'
2528
type: choice
2629
options:
27-
- gpt-5.1-codex
28-
- gpt-5.1
30+
- gpt-5.4
31+
- gpt-5.3-codex
32+
- gpt-5.4-pro
2933
- gpt-5
30-
- amazonq
31-
- codex
32-
- gemini
34+
reasoning_effort:
35+
description: 'Reasoning effort preference'
36+
required: false
37+
default: 'xhigh'
38+
type: choice
39+
options:
40+
- xhigh
41+
- high
42+
- medium
43+
- low
44+
- none
3345

3446
permissions:
3547
contents: write
@@ -52,15 +64,23 @@ jobs:
5264
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
5365
echo "type=${{ inputs.review_type }}" >> $GITHUB_OUTPUT
5466
echo "model=${{ inputs.ai_model }}" >> $GITHUB_OUTPUT
67+
echo "effort=${{ inputs.reasoning_effort }}" >> $GITHUB_OUTPUT
68+
elif [[ "${{ github.ref }}" == *"proreview"* ]]; then
69+
echo "type=pro" >> $GITHUB_OUTPUT
70+
echo "model=gpt-5.4-pro" >> $GITHUB_OUTPUT
71+
echo "effort=xhigh" >> $GITHUB_OUTPUT
5572
elif [[ "${{ github.ref }}" == *"e2eweekly"* ]] || [[ "${{ github.ref }}" == *"e2e"* ]]; then
5673
echo "type=e2e" >> $GITHUB_OUTPUT
57-
echo "model=gpt-5.1-codex" >> $GITHUB_OUTPUT
74+
echo "model=gpt-5.3-codex" >> $GITHUB_OUTPUT
75+
echo "effort=xhigh" >> $GITHUB_OUTPUT
5876
elif [[ "${{ github.ref }}" == *"weeklyreview"* ]] || [[ "${{ github.ref }}" == *"review"* ]]; then
5977
echo "type=weekly" >> $GITHUB_OUTPUT
60-
echo "model=gpt-5.1" >> $GITHUB_OUTPUT
78+
echo "model=gpt-5.4" >> $GITHUB_OUTPUT
79+
echo "effort=xhigh" >> $GITHUB_OUTPUT
6180
else
6281
echo "type=full" >> $GITHUB_OUTPUT
63-
echo "model=gpt-5.1-codex" >> $GITHUB_OUTPUT
82+
echo "model=gpt-5.4" >> $GITHUB_OUTPUT
83+
echo "effort=xhigh" >> $GITHUB_OUTPUT
6484
fi
6585
6686
- name: Setup Node.js
@@ -77,12 +97,15 @@ jobs:
7797

7898
- name: E2E Review with Selected Model
7999
if: steps.review-type.outputs.type == 'e2e'
80-
uses: austenstone/copilot-cli-action@v2
100+
uses: austenstone/copilot-cli@v3
81101
with:
82-
copilot-token: ${{ secrets.COPILOT_TOKEN }}
102+
copilot-token: ${{ secrets.COPILOT_TOKEN || github.token }}
103+
repo-token: ${{ github.token }}
104+
model: ${{ steps.review-type.outputs.model }}
105+
reasoning-effort: ${{ steps.review-type.outputs.effort == 'none' && '' || steps.review-type.outputs.effort }}
83106
prompt: |
84-
Perform a comprehensive end-to-end code review using ${{ steps.review-type.outputs.model }}:
85-
107+
Perform a comprehensive end-to-end code review.
108+
86109
**E2E Testing Focus:**
87110
1. Integration Points
88111
- Review all API endpoints and their integrations
@@ -119,12 +142,15 @@ jobs:
119142

120143
- name: Weekly Review with Selected Model
121144
if: steps.review-type.outputs.type == 'weekly'
122-
uses: austenstone/copilot-cli-action@v2
145+
uses: austenstone/copilot-cli@v3
123146
with:
124-
copilot-token: ${{ secrets.COPILOT_TOKEN }}
147+
copilot-token: ${{ secrets.COPILOT_TOKEN || github.token }}
148+
repo-token: ${{ github.token }}
149+
model: ${{ steps.review-type.outputs.model }}
150+
reasoning-effort: ${{ steps.review-type.outputs.effort == 'none' && '' || steps.review-type.outputs.effort }}
125151
prompt: |
126-
Perform a comprehensive weekly code review using ${{ steps.review-type.outputs.model }}:
127-
152+
Perform a comprehensive weekly code review.
153+
128154
**Weekly Review Scope:**
129155
1. Architecture & Design
130156
- Review overall system architecture
@@ -167,12 +193,15 @@ jobs:
167193

168194
- name: Full Review with Selected Model
169195
if: steps.review-type.outputs.type == 'full'
170-
uses: austenstone/copilot-cli-action@v2
196+
uses: austenstone/copilot-cli@v3
171197
with:
172-
copilot-token: ${{ secrets.COPILOT_TOKEN }}
198+
copilot-token: ${{ secrets.COPILOT_TOKEN || github.token }}
199+
repo-token: ${{ github.token }}
200+
model: ${{ steps.review-type.outputs.model }}
201+
reasoning-effort: ${{ steps.review-type.outputs.effort == 'none' && '' || steps.review-type.outputs.effort }}
173202
prompt: |
174-
Perform a full comprehensive code review using ${{ steps.review-type.outputs.model }}:
175-
203+
Perform a full comprehensive code review.
204+
176205
**Complete Code Review:**
177206
1. Code Quality & Architecture
178207
2. Security Analysis
@@ -188,13 +217,37 @@ jobs:
188217
Provide detailed analysis with specific recommendations.
189218
continue-on-error: true
190219

220+
- name: Pro Review with Selected Model
221+
if: steps.review-type.outputs.type == 'pro'
222+
uses: austenstone/copilot-cli@v3
223+
with:
224+
copilot-token: ${{ secrets.COPILOT_TOKEN || github.token }}
225+
repo-token: ${{ github.token }}
226+
model: ${{ steps.review-type.outputs.model }}
227+
reasoning-effort: ${{ steps.review-type.outputs.effort == 'none' && '' || steps.review-type.outputs.effort }}
228+
prompt: |
229+
Perform a deep, long-horizon Pro review.
230+
231+
**Pro Review Focus:**
232+
1. Deep architecture and system boundary risks
233+
2. Hidden correctness issues and edge-case failures
234+
3. Non-obvious security, privacy, and abuse-path concerns
235+
4. Performance bottlenecks, scaling constraints, and operational risks
236+
5. Rollout safety, migration risks, and observability gaps
237+
6. Test strategy depth, especially missing high-value scenarios
238+
239+
Prefer fewer, higher-confidence findings over broad speculation.
240+
Provide a prioritized review with specific files, concrete risks, and recommended fixes.
241+
continue-on-error: true
242+
191243
- name: Generate Review Report
192244
id: generate-report
193245
run: |
194246
echo "## Tag-Based Code Review Report" > /tmp/tag-review-report.md
195247
echo "" >> /tmp/tag-review-report.md
196248
echo "**Review Type:** ${{ steps.review-type.outputs.type }}" >> /tmp/tag-review-report.md
197249
echo "**AI Model:** ${{ steps.review-type.outputs.model }}" >> /tmp/tag-review-report.md
250+
echo "**Reasoning Effort:** ${{ steps.review-type.outputs.effort }}" >> /tmp/tag-review-report.md
198251
echo "**Triggered by:** ${{ github.event_name }}" >> /tmp/tag-review-report.md
199252
echo "**Tag/Branch:** ${{ github.ref }}" >> /tmp/tag-review-report.md
200253
echo "**Date:** $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> /tmp/tag-review-report.md
@@ -234,6 +287,7 @@ jobs:
234287
const date = new Date().toISOString().split('T')[0];
235288
const reviewType = '${{ steps.review-type.outputs.type }}';
236289
const model = '${{ steps.review-type.outputs.model }}';
290+
const effort = '${{ steps.review-type.outputs.effort }}';
237291
const title = `${reviewType.toUpperCase()} Code Review (${model}) - ${date}`;
238292
239293
const body = `# Tag-Based Code Review Report
@@ -244,6 +298,7 @@ jobs:
244298
245299
- **Review Type:** ${reviewType}
246300
- **AI Model:** ${model}
301+
- **Reasoning Effort:** ${effort}
247302
- **Repository:** ${{ github.repository }}
248303
- **Branch/Tag:** ${{ github.ref }}
249304
- **Commit:** ${{ github.sha }}
@@ -256,6 +311,7 @@ jobs:
256311
- **E2E Review:** Comprehensive end-to-end testing and integration analysis
257312
- **Weekly Review:** Broad code quality, architecture, and trend analysis
258313
- **Full Review:** Complete analysis covering all aspects
314+
- **Pro Review:** Deep long-horizon review with extra reasoning time
259315
260316
## Action Items
261317

0 commit comments

Comments
 (0)