Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: milo/appengine/buildbucket/common.go

Issue 2768203002: Milo: Fix Gerrit CL reporting in buildbucket view (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package buildbucket 5 package buildbucket
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "net/http" 9 "net/http"
10 "strings" 10 "strings"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 Revision: resultDetails.Properties.GotRev ision, 115 Revision: resultDetails.Properties.GotRev ision,
116 RequestRevision: prop.Revision, 116 RequestRevision: prop.Revision,
117 Changelist: &resp.Link{ 117 Changelist: &resp.Link{
118 Label: fmt.Sprintf("Rietveld CL %d", pro p.Issue), 118 Label: fmt.Sprintf("Rietveld CL %d", pro p.Issue),
119 URL: fmt.Sprintf("%s/%d/#ps%d", prop.R ietveldURL, prop.Issue, prop.PatchSet), 119 URL: fmt.Sprintf("%s/%d/#ps%d", prop.R ietveldURL, prop.Issue, prop.PatchSet),
120 }, 120 },
121 } 121 }
122 } 122 }
123 123
124 case "gerrit": 124 case "gerrit":
125 » » if prop.GerritURL != "" && prop.GerritChangeNumber != 0 { 125 » » if prop.PatchGerritURL != "" && prop.PatchIssue != 0 {
126 result = &resp.Commit{ 126 result = &resp.Commit{
127 Revision: prop.GerritPatchRef,
128 RequestRevision: prop.GerritPatchRef,
129 Changelist: &resp.Link{ 127 Changelist: &resp.Link{
130 » » » » » Label: fmt.Sprintf("Gerrit CL %d", prop. GerritChangeNumber), 128 » » » » » Label: fmt.Sprintf("Gerrit CL %d", prop. PatchIssue),
131 » » » » » URL: prop.GerritChangeURL, 129 » » » » » URL: fmt.Sprintf("%s/c/%d", prop.Patch GerritURL, prop.PatchIssue),
tandrii(chromium) 2017/03/23 15:32:57 wdyt about linking to specific patchset like you d
nodir 2017/03/24 06:35:02 +1 do it if GerritPatchSet != 0
hinoka 2017/03/27 18:22:08 Done.
132 }, 130 },
133 } 131 }
134 } 132 }
135 } 133 }
136 134
137 if result != nil && len(params.Changes) != 0 { 135 if result != nil && len(params.Changes) != 0 {
138 // tryjobs have one change and it is the CL author 136 // tryjobs have one change and it is the CL author
139 result.AuthorEmail = params.Changes[0].Author.Email 137 result.AuthorEmail = params.Changes[0].Author.Email
140 } 138 }
141 139
142 return result 140 return result
143 } 141 }
OLDNEW
« no previous file with comments | « no previous file | milo/appengine/buildbucket/properties.go » ('j') | milo/appengine/buildbucket/properties.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698