| OLD | NEW |
| 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 "bytes" | 8 "bytes" |
| 9 "strconv" | 9 "strconv" |
| 10 ) | 10 ) |
| 11 | 11 |
| 12 // This file is about buildbucket build params in the format supported by | 12 // This file is about buildbucket build params in the format supported by |
| 13 // Buildbot. | 13 // Buildbot. |
| 14 | 14 |
| 15 // properties is well-established build properties. | 15 // properties is well-established build properties. |
| 16 type properties struct { | 16 type properties struct { |
| 17 PatchStorage string `json:"patch_storage"` // e.g. "rietveld", "gerrit" | 17 PatchStorage string `json:"patch_storage"` // e.g. "rietveld", "gerrit" |
| 18 | 18 |
| 19 RietveldURL string `json:"rietveld"` // e.g. "https://codereview.chromiu
m.org" | 19 RietveldURL string `json:"rietveld"` // e.g. "https://codereview.chromiu
m.org" |
| 20 Issue number `json:"issue"` // e.g. 2127373005 | 20 Issue number `json:"issue"` // e.g. 2127373005 |
| 21 » PatchSet number `json:"patchset"` // e.g. 40001 | 21 » PatchSet number `json:"patchset"` // e.g. 40001 for rietveld |
| 22 | 22 |
| 23 » GerritURL string `json:"gerrit"` // e.g. "https://
chromium-review.googlesource.com" | 23 » GerritPatchURL string `json:"patch_gerrit_url"` // e.g. "h
ttps://chromium-review.googlesource.com" |
| 24 » GerritChangeNumber int `json:"event.change.number"` // e.g. 358171 | 24 » GerritPatchIssue int `json:"patch_issue"` // e.g. 35
8171 |
| 25 » GerritChangeID string `json:"event.change.id"` // e.g. "infra%2F
infra~master~Iee05b76799d577d491f533b8acaa4560ac14a806" | 25 » GerritPatchSet number `json:"patch_set"` // e.g. 1 |
| 26 » GerritChangeURL string `json:"event.change.url"` // e.g. "https://
chromium-review.googlesource.com/#/c/358171" | 26 » GerritPatchProject string `json:"patch_project"` // e.g. "i
nfra/infra" |
| 27 » GerritPatchRef string `json:"event.patchSet.ref"` // e.g. "refs/cha
nges/71/358171/2" | 27 » GerritPatchRepositoryURL string `json:"patch_repository_url"` // e.g. ht
tps://chromium.googlesource.com/infra/infra |
| 28 | 28 |
| 29 Revision string `json:"revision"` // e.g. "0b04861933367c62630751702
c84fd64bc3caf6f" | 29 Revision string `json:"revision"` // e.g. "0b04861933367c62630751702
c84fd64bc3caf6f" |
| 30 BlameList []string `json:"blamelist"` // e.g. ["someone@chromium.org"] | 30 BlameList []string `json:"blamelist"` // e.g. ["someone@chromium.org"] |
| 31 | 31 |
| 32 // Fields below are present only in ResultDetails. | 32 // Fields below are present only in ResultDetails. |
| 33 | 33 |
| 34 GotRevision string `json:"got_revision"` // e.g. "0b04861933367c62630751
702c84fd64bc3caf6f" | 34 GotRevision string `json:"got_revision"` // e.g. "0b04861933367c62630751
702c84fd64bc3caf6f" |
| 35 BuildNumber int `json:"buildnumber"` // e.g. 3021 | 35 BuildNumber int `json:"buildnumber"` // e.g. 3021 |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 BuilderName string `json:"builder_name"` | 63 BuilderName string `json:"builder_name"` |
| 64 Properties properties | 64 Properties properties |
| 65 Changes []change | 65 Changes []change |
| 66 } | 66 } |
| 67 | 67 |
| 68 // resultDetails is contents of "result_details_json" buildbucket build field | 68 // resultDetails is contents of "result_details_json" buildbucket build field |
| 69 // in the format supported by Buildbot. | 69 // in the format supported by Buildbot. |
| 70 type resultDetails struct { | 70 type resultDetails struct { |
| 71 Properties properties | 71 Properties properties |
| 72 } | 72 } |
| OLD | NEW |