mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Support Git as only VCS (#4346)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
This commit is contained in:
@@ -94,7 +94,6 @@ func convertRepo(from *github.Repository) *model.Repo {
|
||||
Owner: from.GetOwner().GetLogin(),
|
||||
Avatar: from.GetOwner().GetAvatarURL(),
|
||||
Perm: convertPerm(from.GetPermissions()),
|
||||
SCMKind: model.RepoGit,
|
||||
PREnabled: true,
|
||||
}
|
||||
return repo
|
||||
@@ -152,7 +151,6 @@ func convertRepoHook(eventRepo *github.PushEventRepository) *model.Repo {
|
||||
Clone: eventRepo.GetCloneURL(),
|
||||
CloneSSH: eventRepo.GetSSHURL(),
|
||||
Branch: eventRepo.GetDefaultBranch(),
|
||||
SCMKind: model.RepoGit,
|
||||
PREnabled: true,
|
||||
}
|
||||
if repo.FullName == "" {
|
||||
|
||||
@@ -115,7 +115,6 @@ func Test_helper(t *testing.T) {
|
||||
g.Assert(to.Owner).Equal("octocat")
|
||||
g.Assert(to.Name).Equal("hello-world")
|
||||
g.Assert(to.Branch).Equal("develop")
|
||||
g.Assert(string(to.SCMKind)).Equal("git")
|
||||
g.Assert(to.IsSCMPrivate).IsTrue()
|
||||
g.Assert(to.Clone).Equal("https://github.com/octocat/hello-world.git")
|
||||
g.Assert(to.ForgeURL).Equal("https://github.com/octocat/hello-world")
|
||||
|
||||
Reference in New Issue
Block a user