Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006)

Reviewed-on: https://gitea.com/gitea/tea/pulls/1006
Reviewed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
This commit is contained in:
Lunny Xiao
2026-05-26 04:51:09 +00:00
parent 579099f9d9
commit 28ba9b915b
179 changed files with 617 additions and 599 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"
"code.gitea.io/sdk/gitea"
"gitea.dev/sdk"
"gitea.dev/tea/cmd/flags"
"gitea.dev/tea/modules/context"
@@ -35,7 +35,7 @@ var CmdSSHKeyAdd = cli.Command{
}
// RunSSHKeyAdd reads a public key file and registers it with the Gitea instance
func RunSSHKeyAdd(_ stdctx.Context, cmd *cli.Command) error {
func RunSSHKeyAdd(requestCtx stdctx.Context, cmd *cli.Command) error {
ctx, err := context.InitCommand(cmd)
if err != nil {
return err
@@ -62,7 +62,7 @@ func RunSSHKeyAdd(_ stdctx.Context, cmd *cli.Command) error {
title = strings.TrimSuffix(base, filepath.Ext(base))
}
key, _, err := ctx.Login.Client().CreatePublicKey(gitea.CreateKeyOption{
key, _, err := ctx.Login.Client().Users.CreatePublicKey(requestCtx, gitea.CreateKeyOption{
Title: title,
Key: keyContent,
})