go/vcs: use Bitbucket v2 REST API

This ports the change made to cmd/go in
https://go-review.googlesource.com/36219 (Feb 2017).

Change-Id: I04e55749b187e21d140500b8878866bd3ceea174
Reviewed-on: https://go-review.googlesource.com/c/154677
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
David Symonds 2018-12-18 12:41:13 +11:00
parent a072e66104
commit 13ba8ad772
1 changed files with 1 additions and 1 deletions

View File

@ -731,7 +731,7 @@ func bitbucketVCS(match map[string]string) error {
var resp struct {
SCM string `json:"scm"`
}
url := expand(match, "https://api.bitbucket.org/1.0/repositories/{bitname}")
url := expand(match, "https://api.bitbucket.org/2.0/repositories/{bitname}?fields=scm")
data, err := httpGET(url)
if err != nil {
return err