Chromium Code Reviews| 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 or 1 for gerrit |
|
nodir
2017/03/24 06:35:02
apparently for Gerrit it is "patch_set" with under
| |
| 22 | 22 |
| 23 » GerritURL string `json:"gerrit"` // e.g. "https:// chromium-review.googlesource.com" | 23 » PatchGerritURL string `json:"patch_gerrit_url"` // e.g. "https:/ /chromium-review.googlesource.com" |
| 24 » GerritChangeNumber int `json:"event.change.number"` // e.g. 358171 | 24 » PatchIssue int `json:"patch_issue"` // e.g. 358171 |
| 25 » GerritChangeID string `json:"event.change.id"` // e.g. "infra%2F infra~master~Iee05b76799d577d491f533b8acaa4560ac14a806" | 25 » PatchProject string `json:"patch_project"` // e.g. "infra/i nfra" |
| 26 » GerritChangeURL string `json:"event.change.url"` // e.g. "https:// chromium-review.googlesource.com/#/c/358171" | 26 » PatchRepositoryURL string `json:"patch_repository_url"` // e.g. https:// chromium.googlesource.com/infra/infra |
| 27 » GerritPatchRef string `json:"event.patchSet.ref"` // e.g. "refs/cha nges/71/358171/2" | |
| 28 | 27 |
| 29 Revision string `json:"revision"` // e.g. "0b04861933367c62630751702 c84fd64bc3caf6f" | 28 Revision string `json:"revision"` // e.g. "0b04861933367c62630751702 c84fd64bc3caf6f" |
| 30 BlameList []string `json:"blamelist"` // e.g. ["someone@chromium.org"] | 29 BlameList []string `json:"blamelist"` // e.g. ["someone@chromium.org"] |
| 31 | 30 |
| 32 // Fields below are present only in ResultDetails. | 31 // Fields below are present only in ResultDetails. |
| 33 | 32 |
| 34 GotRevision string `json:"got_revision"` // e.g. "0b04861933367c62630751 702c84fd64bc3caf6f" | 33 GotRevision string `json:"got_revision"` // e.g. "0b04861933367c62630751 702c84fd64bc3caf6f" |
| 35 BuildNumber int `json:"buildnumber"` // e.g. 3021 | 34 BuildNumber int `json:"buildnumber"` // e.g. 3021 |
| 36 } | 35 } |
| 37 | 36 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 63 BuilderName string `json:"builder_name"` | 62 BuilderName string `json:"builder_name"` |
| 64 Properties properties | 63 Properties properties |
| 65 Changes []change | 64 Changes []change |
| 66 } | 65 } |
| 67 | 66 |
| 68 // resultDetails is contents of "result_details_json" buildbucket build field | 67 // resultDetails is contents of "result_details_json" buildbucket build field |
| 69 // in the format supported by Buildbot. | 68 // in the format supported by Buildbot. |
| 70 type resultDetails struct { | 69 type resultDetails struct { |
| 71 Properties properties | 70 Properties properties |
| 72 } | 71 } |
| OLD | NEW |