fix: stalled PR 作者已交棒審核改判 reviewer-idle(agents #51)
considerPull 的 author-idle 分支缺少 #47 的交棒檢查,且既有 IsDeliveryReport 訊號為 issue 交付報告設計,PR 端「已就緒,可審閱+ @審核者」形態無對應訊號——fox#60 作者留言交棒後仍被誤判 author-idle。 新增 IsReviewHandoff(@目前審核者帳號 ∧ 就緒語,mention 邊界感知 避免 @chenyunda218 誤命中 chenyunda),considerPull 在判 author-idle 前檢查,命中改判 reviewer-idle,讓既有 48 小時改派規則自然適用。 gitea.py 側 _consider pull 分支以 _is_review_handoff 同步(另 PR)。
This commit is contained in:
@@ -602,7 +602,14 @@ func considerPull(src Source, org, repo string, pr PullRequest, comments []Comme
|
||||
case len(reviewers) == 0:
|
||||
reason = "no-reviewer"
|
||||
case lastCommentBy == author:
|
||||
reason = "author-idle"
|
||||
if IsReviewHandoff(last, reviewers) {
|
||||
// 審核交棒(agents #51):作者已表明 PR 就緒並 @目前審核者,
|
||||
// 停滯點在審核者,不是作者停滯——球在審核者,讓既有
|
||||
// reviewer 催促與 48 小時改派規則自然適用。
|
||||
reason = "reviewer-idle"
|
||||
} else {
|
||||
reason = "author-idle"
|
||||
}
|
||||
case lastCommentBy != "" && containsString(reviewers, lastCommentBy):
|
||||
reason = "reviewer-idle"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user