Commit 306705c7 by Ben Clayton

Regres: Fix priority boost for +2 code review.

Confusingly the "Code-Review" label uses 'Value' for -1 / +1, and 'Approved' for +2s. Changes that were ready to land were not being prioritized over no-code review. Change-Id: Ia31adcbbba70b2f52b9abc7299f4bafdcdb8fe48 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27170Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 665ee574
......@@ -533,6 +533,7 @@ func (c *changeInfo) update(client *gerrit.Client) error {
kokoroPresubmit := change.Labels["Kokoro-Presubmit"].Approved.AccountID != 0
codeReviewScore := change.Labels["Code-Review"].Value
codeReviewApproved := change.Labels["Code-Review"].Approved.AccountID != 0
presubmitReady := change.Labels["Presubmit-Ready"].Approved.AccountID != 0
c.priority = 0
......@@ -540,6 +541,9 @@ func (c *changeInfo) update(client *gerrit.Client) error {
c.priority += 10
}
c.priority += codeReviewScore
if codeReviewApproved {
c.priority += 2
}
if kokoroPresubmit {
c.priority++
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment