Commit 72e6254a by Nicolas Capens Committed by Nicolas Capens

Regres: Fix testing external contributions if reviewed by Googler

The account info of Gerrit Labels isn't fetched unless the DETAILED_ACCOUNTS parameter is added to the query: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html This fixes the `canTest` result, setting it to true if either: - The author is a Googler (was previously working as intended) - The change has a Code-Review +1 or +2 from a Googler - The change has a Presubmit-Ready +1 from a Googler Change-Id: I5cd9881ad38a178fb5bbeb6e4aae4b5a18be9749 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54948Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent 9559e583
...@@ -962,7 +962,7 @@ func queryChanges(client *gerrit.Client, changes map[string]*changeInfo) error { ...@@ -962,7 +962,7 @@ func queryChanges(client *gerrit.Client, changes map[string]*changeInfo) error {
// update queries gerrit for information about the given change. // update queries gerrit for information about the given change.
func (c *changeInfo) update(client *gerrit.Client) error { func (c *changeInfo) update(client *gerrit.Client) error {
change, _, err := client.Changes.GetChange(c.id, &gerrit.ChangeOptions{ change, _, err := client.Changes.GetChange(c.id, &gerrit.ChangeOptions{
AdditionalFields: []string{"CURRENT_REVISION", "CURRENT_COMMIT", "MESSAGES", "LABELS"}, AdditionalFields: []string{"CURRENT_REVISION", "CURRENT_COMMIT", "MESSAGES", "LABELS", "DETAILED_ACCOUNTS"},
}) })
if err != nil { if err != nil {
return cause.Wrap(err, "Getting info for change '%s'", c.id) return cause.Wrap(err, "Getting info for change '%s'", c.id)
......
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