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
+4 -2
View File
@@ -4,9 +4,10 @@
package task
import (
stdctx "context"
"fmt"
"code.gitea.io/sdk/gitea"
gitea "gitea.dev/sdk"
"gitea.dev/tea/modules/config"
local_git "gitea.dev/tea/modules/git"
@@ -14,6 +15,7 @@ import (
// PullCheckout checkout current workdir to the head branch of specified pull request
func PullCheckout(
ctx stdctx.Context,
login *config.Login,
repoOwner, repoName string,
forceCreateBranch bool,
@@ -21,7 +23,7 @@ func PullCheckout(
callback func(string) (string, error),
) error {
client := login.Client()
pr, _, err := client.GetPullRequest(repoOwner, repoName, index)
pr, _, err := client.PullRequests.GetPullRequest(ctx, repoOwner, repoName, index)
if err != nil {
return fmt.Errorf("couldn't fetch PR: %s", err)
}