Hide PR tab if PRs are disabled (#3004)

Closes https://github.com/woodpecker-ci/woodpecker/issues/2988
This commit is contained in:
qwerty287
2023-12-24 10:04:18 +01:00
committed by GitHub
parent 030db4e110
commit 9d9bcbf363
16 changed files with 37 additions and 13 deletions

View File

@@ -95,6 +95,7 @@ func convertRepo(from *github.Repository) *model.Repo {
Avatar: from.GetOwner().GetAvatarURL(),
Perm: convertPerm(from.GetPermissions()),
SCMKind: model.RepoGit,
PREnabled: true,
}
return repo
}
@@ -152,6 +153,7 @@ func convertRepoHook(eventRepo *github.PushEventRepository) *model.Repo {
CloneSSH: eventRepo.GetSSHURL(),
Branch: eventRepo.GetDefaultBranch(),
SCMKind: model.RepoGit,
PREnabled: true,
}
if repo.FullName == "" {
repo.FullName = repo.Owner + "/" + repo.Name