Support Git as only VCS (#4346)

Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
This commit is contained in:
qwerty287
2024-12-27 23:49:19 +02:00
committed by GitHub
parent 1ed009424d
commit fdfabe6368
29 changed files with 100 additions and 98 deletions

View File

@@ -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 == "" {

View File

@@ -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")