aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-08 08:04:13 +0100
committerGitHub <noreply@github.com>2021-11-08 09:04:13 +0200
commitebaf4c48ea278955c5d79c5f37a2039ccb3cf775 (patch)
tree574893d946aaaf14a752d7e6a37408e4a0f85a9d /modules
parent513951bc16f31c4a2821319baea846735f341a0e (diff)
downloadgitea-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.tar.gz
gitea-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.zip
Avoid double imports (#17569)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/convert/convert.go3
-rw-r--r--modules/migrations/gitea_uploader.go5
2 files changed, 3 insertions, 5 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go
index 3c309a82f8..2960f7741a 100644
--- a/modules/convert/convert.go
+++ b/modules/convert/convert.go
@@ -15,7 +15,6 @@ import (
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/structs"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/services/webhook"
@@ -158,7 +157,7 @@ func ToVerification(c *git.Commit) *api.PayloadCommitVerification {
commitVerification.Payload = c.Signature.Payload
}
if verif.SigningUser != nil {
- commitVerification.Signer = &structs.PayloadUser{
+ commitVerification.Signer = &api.PayloadUser{
Name: verif.SigningUser.Name,
Email: verif.SigningUser.Email,
}
diff --git a/modules/migrations/gitea_uploader.go b/modules/migrations/gitea_uploader.go
index 62e8924e54..d62ce80c77 100644
--- a/modules/migrations/gitea_uploader.go
+++ b/modules/migrations/gitea_uploader.go
@@ -20,7 +20,6 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/migrations/base"
- "code.gitea.io/gitea/modules/repository"
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
@@ -111,7 +110,7 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, opts base.Migrate
}
r.DefaultBranch = repo.DefaultBranch
- r, err = repository.MigrateRepositoryGitData(g.ctx, owner, r, base.MigrateOptions{
+ r, err = repo_module.MigrateRepositoryGitData(g.ctx, owner, r, base.MigrateOptions{
RepoName: g.repoName,
Description: repo.Description,
OriginalURL: repo.OriginalURL,
@@ -341,7 +340,7 @@ func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error {
// SyncTags syncs releases with tags in the database
func (g *GiteaLocalUploader) SyncTags() error {
- return repository.SyncReleasesWithTags(g.repo, g.gitRepo)
+ return repo_module.SyncReleasesWithTags(g.repo, g.gitRepo)
}
// CreateIssues creates issues