File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,33 +246,40 @@ jobs:
246246
247247 // 4. Classify the PRs locally (Hierarchical Triage Engine)
248248 let explanation = '';
249- let sortWeight = 5 ;
249+ let sortWeight = 7 ;
250250 let statusIcon = '👀';
251-
252- if (unresolvedComments.length > 0) {
253- const count = unresolvedComments.length;
254- explanation = `${count} ${count === 1 ? 'comment' : 'comments'} to resolve`;
251+
252+ const changesRequested = pr.requested_reviewers
253+ .some(r => r.state === 'CHANGES_REQUESTED');
254+ const resolveCount = unresolvedComments.length;
255+
256+ if (changesRequested) {
257+ explanation = `Changes requested`;
255258 sortWeight = 1;
259+ statusIcon = '🛑';
260+ } else if (resolveCount > 0) {
261+ explanation = `${resolveCount} ${resolveCount === 1 ? 'comment' : 'comments'} to resolve`;
262+ sortWeight = 2;
256263 statusIcon = '💬';
257264 } else if (pr.merge_conflict_present) {
258265 explanation = `Needs merge conflicts fixed`;
259- sortWeight = 2 ;
266+ sortWeight = 3 ;
260267 statusIcon = '⚠️';
261268 } else if (pr.out_of_date_with_base) {
262269 explanation = `Needs rebase/merge`;
263- sortWeight = 3 ;
270+ sortWeight = 4 ;
264271 statusIcon = '⏩';
265272 } else if (approvedCount >= 2) {
266273 explanation = `Ready for merge`;
267274 sortWeight = 0;
268275 statusIcon = '✅';
269276 } else if (allReviewersSuperset.length === 0) {
270277 explanation = `Needs reviewers assigned`;
271- sortWeight = 5 ;
278+ sortWeight = 6 ;
272279 statusIcon = '👥';
273280 } else {
274281 explanation = `Needs reviews`;
275- sortWeight = 4 ;
282+ sortWeight = 5 ;
276283 statusIcon = '⏳';
277284 }
278285
You can’t perform that action at this time.
0 commit comments