mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
Ensure we add avatar when activate repo
This commit is contained in:
parent
1dbefc5281
commit
193d524493
1 changed files with 6 additions and 0 deletions
|
@ -145,6 +145,12 @@ func (g *Gitlab) Repo(u *model.User, owner, name string) (*model.Repo, error) {
|
||||||
repo.Clone = repo_.HttpRepoUrl
|
repo.Clone = repo_.HttpRepoUrl
|
||||||
repo.Branch = "master"
|
repo.Branch = "master"
|
||||||
|
|
||||||
|
repo.Avatar = repo_.AvatarUrl
|
||||||
|
|
||||||
|
if len(repo.Avatar) != 0 && !strings.HasPrefix(repo.Avatar, "http") {
|
||||||
|
repo.Avatar = fmt.Sprintf("%s/%s", g.URL, repo.Avatar)
|
||||||
|
}
|
||||||
|
|
||||||
if repo_.DefaultBranch != "" {
|
if repo_.DefaultBranch != "" {
|
||||||
repo.Branch = repo_.DefaultBranch
|
repo.Branch = repo_.DefaultBranch
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue