From 570a23f95204d685ccadc33ebd169ea2d7a560f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Bruland?= Date: Fri, 16 Jan 2015 17:36:56 +0100 Subject: [PATCH] Use Slug instead of Name for Bitbucket repos. --- plugin/remote/bitbucket/bitbucket.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/remote/bitbucket/bitbucket.go b/plugin/remote/bitbucket/bitbucket.go index 410d1bb41..22f3c114a 100644 --- a/plugin/remote/bitbucket/bitbucket.go +++ b/plugin/remote/bitbucket/bitbucket.go @@ -155,16 +155,16 @@ func (r *Bitbucket) GetRepos(user *model.User) ([]*model.Repo, error) { // these are the urls required to clone the repository // TODO use the bitbucketurl.Host and bitbucketurl.Scheme instead of hardcoding // so that we can support Stash. - var html = fmt.Sprintf("https://bitbucket.org/%s/%s", item.Owner, item.Name) - var clone = fmt.Sprintf("https://bitbucket.org/%s/%s.git", item.Owner, item.Name) - var ssh = fmt.Sprintf("git@bitbucket.org:%s/%s.git", item.Owner, item.Name) + var html = fmt.Sprintf("https://bitbucket.org/%s/%s", item.Owner, item.Slug) + var clone = fmt.Sprintf("https://bitbucket.org/%s/%s.git", item.Owner, item.Slug) + var ssh = fmt.Sprintf("git@bitbucket.org:%s/%s.git", item.Owner, item.Slug) var repo = model.Repo{ UserID: user.ID, Remote: remote, Host: hostname, Owner: item.Owner, - Name: item.Name, + Name: item.Slug, Private: item.Private, URL: html, CloneURL: clone, @@ -261,7 +261,7 @@ func (r *Bitbucket) ParseHook(req *http.Request) (*model.Hook, error) { return &model.Hook{ Owner: hook.Repo.Owner, - Repo: hook.Repo.Name, + Repo: hook.Repo.Slug, Sha: hook.Commits[len(hook.Commits)-1].Hash, Branch: hook.Commits[len(hook.Commits)-1].Branch, Author: author,