Merge pull request #824 from orjanbruland/master
Use Slug instead of Name for Bitbucket repos.
This commit is contained in:
commit
11e7ea7e15
1 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue