diff options
Diffstat (limited to 'modules/convert')
-rw-r--r-- | modules/convert/convert.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go index eda9f23cd6..1c78c35cda 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -12,6 +12,7 @@ import ( "time" "code.gitea.io/gitea/models" + asymkey_model "code.gitea.io/gitea/models/asymkey" "code.gitea.io/gitea/models/login" "code.gitea.io/gitea/models/perm" repo_model "code.gitea.io/gitea/models/repo" @@ -152,7 +153,7 @@ func ToTag(repo *repo_model.Repository, t *git.Tag) *api.Tag { // ToVerification convert a git.Commit.Signature to an api.PayloadCommitVerification func ToVerification(c *git.Commit) *api.PayloadCommitVerification { - verif := models.ParseCommitWithSignature(c) + verif := asymkey_model.ParseCommitWithSignature(c) commitVerification := &api.PayloadCommitVerification{ Verified: verif.Verified, Reason: verif.Reason, @@ -170,8 +171,8 @@ func ToVerification(c *git.Commit) *api.PayloadCommitVerification { return commitVerification } -// ToPublicKey convert models.PublicKey to api.PublicKey -func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey { +// ToPublicKey convert asymkey_model.PublicKey to api.PublicKey +func ToPublicKey(apiLink string, key *asymkey_model.PublicKey) *api.PublicKey { return &api.PublicKey{ ID: key.ID, Key: key.Content, @@ -183,7 +184,7 @@ func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey { } // ToGPGKey converts models.GPGKey to api.GPGKey -func ToGPGKey(key *models.GPGKey) *api.GPGKey { +func ToGPGKey(key *asymkey_model.GPGKey) *api.GPGKey { subkeys := make([]*api.GPGKey, len(key.SubsKey)) for id, k := range key.SubsKey { subkeys[id] = &api.GPGKey{ @@ -264,8 +265,8 @@ func ToGitHook(h *git.Hook) *api.GitHook { } } -// ToDeployKey convert models.DeployKey to api.DeployKey -func ToDeployKey(apiLink string, key *models.DeployKey) *api.DeployKey { +// ToDeployKey convert asymkey_model.DeployKey to api.DeployKey +func ToDeployKey(apiLink string, key *asymkey_model.DeployKey) *api.DeployKey { return &api.DeployKey{ ID: key.ID, KeyID: key.KeyID, |