aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-03-02 10:14:49 -0800
committerGitHub <noreply@github.com>2025-03-02 10:14:49 -0800
commit5cbdf83f706ecdace65e5b42897ebbde82c3a0a1 (patch)
tree24674b523d6fd8017174d6ad29ffe571700cabfa /services
parent2c8bdd22332973dfda62e25c30c6427c44c47885 (diff)
downloadgitea-5cbdf83f706ecdace65e5b42897ebbde82c3a0a1.tar.gz
gitea-5cbdf83f706ecdace65e5b42897ebbde82c3a0a1.zip
Use pullrequestlist instead of []*pullrequest (#33765)
Just renames no code changed.
Diffstat (limited to 'services')
-rw-r--r--services/pull/pull.go21
1 files changed, 10 insertions, 11 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go
index 5d3758eca6..e4db3127b9 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -407,11 +407,10 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
}
if isSync {
- requests := issues_model.PullRequestList(prs)
- if err = requests.LoadAttributes(ctx); err != nil {
+ if err = prs.LoadAttributes(ctx); err != nil {
log.Error("PullRequestList.LoadAttributes: %v", err)
}
- if invalidationErr := checkForInvalidation(ctx, requests, repoID, doer, branch); invalidationErr != nil {
+ if invalidationErr := checkForInvalidation(ctx, prs, repoID, doer, branch); invalidationErr != nil {
log.Error("checkForInvalidation: %v", invalidationErr)
}
if err == nil {
@@ -645,7 +644,7 @@ func retargetBranchPulls(ctx context.Context, doer *user_model.User, repoID int6
return err
}
- if err := issues_model.PullRequestList(prs).LoadAttributes(ctx); err != nil {
+ if err := prs.LoadAttributes(ctx); err != nil {
return err
}
@@ -672,11 +671,11 @@ func AdjustPullsCausedByBranchDeleted(ctx context.Context, doer *user_model.User
return err
}
- if err := issues_model.PullRequestList(prs).LoadAttributes(ctx); err != nil {
+ if err := prs.LoadAttributes(ctx); err != nil {
return err
}
- issues_model.PullRequestList(prs).SetHeadRepo(repo)
- if err := issues_model.PullRequestList(prs).LoadRepositories(ctx); err != nil {
+ prs.SetHeadRepo(repo)
+ if err := prs.LoadRepositories(ctx); err != nil {
return err
}
@@ -707,11 +706,11 @@ func AdjustPullsCausedByBranchDeleted(ctx context.Context, doer *user_model.User
return err
}
- if err := issues_model.PullRequestList(prs).LoadAttributes(ctx); err != nil {
+ if err := prs.LoadAttributes(ctx); err != nil {
return err
}
- issues_model.PullRequestList(prs).SetBaseRepo(repo)
- if err := issues_model.PullRequestList(prs).LoadRepositories(ctx); err != nil {
+ prs.SetBaseRepo(repo)
+ if err := prs.LoadRepositories(ctx); err != nil {
return err
}
@@ -744,7 +743,7 @@ func CloseRepoBranchesPulls(ctx context.Context, doer *user_model.User, repo *re
return err
}
- if err = issues_model.PullRequestList(prs).LoadAttributes(ctx); err != nil {
+ if err = prs.LoadAttributes(ctx); err != nil {
return err
}