@@ -134,11 +134,22 @@ automations:
134134 label : " {{ calc.etr }} min review"
135135 color : " {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}"
136136
137+ # Request advisory AI review for large PRs and critical runtime changes
138+ request_ai_review :
139+ if :
140+ - {{ not pr.draft }}
141+ - {{ is.high_risk }}
142+ run :
143+ - action : add-label@v1
144+ args :
145+ label : " needs-ai-review"
146+ color : " 5319e7"
147+
137148 # Add review progress label when team approval target is met
138149 label_approved_by_team :
139150 if :
140- - " {{ not pr.draft }}"
141- - " {{ pr.approvals | length >= required_approvals }}"
151+ - {{ not pr.draft }}
152+ - {{ pr.approvals | length >= required_approvals }}
142153 run :
143154 - action : add-label@v1
144155 args :
@@ -148,8 +159,8 @@ automations:
148159 # Add Greptile reviewed label once Greptile check succeeds
149160 label_greptile_reviewed :
150161 if :
151- - " {{ not pr.draft }}"
152- - " {{ pr.checks | filter(attr='name', regex=r/greptile/i) | filter(attr='status', term='completed') | match(attr='conclusion', term='success') | some }}"
162+ - {{ not pr.draft }}
163+ - {{ pr.checks | filter(attr='name', regex=r/greptile/i) | filter(attr='status', term='completed') | match(attr='conclusion', term='success') | some }}
153164 run :
154165 - action : add-label@v1
155166 args :
@@ -183,7 +194,15 @@ colors:
183194is :
184195 # Documented gitStream predicate for Dependabot and common bot accounts.
185196 bot_author : " {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}"
197+ high_risk : {{ ((not is.bot_author) and calc.etr >= 20) or (files | match(list=critical_files) | some) }}
186198 formatting : " {{ source.diff.files | isFormattingChange }}"
187199 docs : " {{ files | allDocs }}"
188200 tests : " {{ files | allTests }}"
189201 image : " {{ files | allImages }}"
202+
203+ critical_files :
204+ - src/index.ts
205+ - src/utils/telemetry.ts
206+ - src/utils/error-handler.ts
207+ - src/utils/stdio-observability.ts
208+ - src/utils/hevyClientKubb.ts
0 commit comments