mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-13 12:41:21 +00:00
Gitea use default branch (#480)
instead of hard-coded default branch use what gitea tell us
This commit is contained in:
parent
3c5827f08a
commit
63a93087a1
2 changed files with 5 additions and 4 deletions
|
@ -47,7 +47,7 @@ func toRepo(from *gitea.Repository, privateMode bool) *model.Repo {
|
|||
Link: from.HTMLURL,
|
||||
IsPrivate: private,
|
||||
Clone: from.CloneURL,
|
||||
Branch: "master",
|
||||
Branch: from.DefaultBranch,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -203,9 +203,10 @@ func Test_parse(t *testing.T) {
|
|||
UserName: "gordon",
|
||||
AvatarURL: "http://1.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87",
|
||||
},
|
||||
CloneURL: "http://gitea.golang.org/gophers/hello-world.git",
|
||||
HTMLURL: "http://gitea.golang.org/gophers/hello-world",
|
||||
Private: true,
|
||||
CloneURL: "http://gitea.golang.org/gophers/hello-world.git",
|
||||
HTMLURL: "http://gitea.golang.org/gophers/hello-world",
|
||||
Private: true,
|
||||
DefaultBranch: "master",
|
||||
}
|
||||
repo := toRepo(&from, false)
|
||||
g.Assert(repo.FullName).Equal(from.FullName)
|
||||
|
|
Loading…
Reference in a new issue