mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Remove default branch fallbacks (#2065)
This commit is contained in:
@@ -53,10 +53,6 @@ func (g *GitLab) convertGitLabRepo(_repo *gitlab.Project) (*model.Repo, error) {
|
||||
},
|
||||
}
|
||||
|
||||
if len(repo.Branch) == 0 { // TODO: do we need that?
|
||||
repo.Branch = "master"
|
||||
}
|
||||
|
||||
if len(repo.Avatar) != 0 && !strings.HasPrefix(repo.Avatar, "http") {
|
||||
repo.Avatar = fmt.Sprintf("%s/%s", g.url, repo.Avatar)
|
||||
}
|
||||
@@ -101,11 +97,7 @@ func convertMergeRequestHook(hook *gitlab.MergeEvent, req *http.Request) (int, *
|
||||
repo.Clone = target.HTTPURL
|
||||
}
|
||||
|
||||
if target.DefaultBranch != "" {
|
||||
repo.Branch = target.DefaultBranch
|
||||
} else {
|
||||
repo.Branch = "master"
|
||||
}
|
||||
repo.Branch = target.DefaultBranch
|
||||
|
||||
if target.AvatarURL != "" {
|
||||
repo.Avatar = target.AvatarURL
|
||||
|
||||
Reference in New Issue
Block a user