aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull
diff options
context:
space:
mode:
authorChongyi Zheng <git@zcy.dev>2024-04-29 04:47:56 -0400
committerGitHub <noreply@github.com>2024-04-29 08:47:56 +0000
commite80466f7349164ce4cf3c07bdac30d736d20f035 (patch)
tree03f321ea4f4892671111a814aab10008bcf0136e /services/pull
parentad4e902d5a1430c0c1df18bf404537df5ded1dba (diff)
downloadgitea-e80466f7349164ce4cf3c07bdac30d736d20f035.tar.gz
gitea-e80466f7349164ce4cf3c07bdac30d736d20f035.zip
Resolve lint for unused parameter and unnecessary type arguments (#30750)
Resolve all cases for `unused parameter` and `unnecessary type arguments` Related: #30729 --------- Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services/pull')
-rw-r--r--services/pull/review.go4
-rw-r--r--services/pull/update.go2
-rw-r--r--services/pull/update_rebase.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/services/pull/review.go b/services/pull/review.go
index e303cd9a9d..3d5eca779f 100644
--- a/services/pull/review.go
+++ b/services/pull/review.go
@@ -49,7 +49,7 @@ var ErrSubmitReviewOnClosedPR = errors.New("can't submit review for a closed or
// checkInvalidation checks if the line of code comment got changed by another commit.
// If the line got changed the comment is going to be invalidated.
-func checkInvalidation(ctx context.Context, c *issues_model.Comment, doer *user_model.User, repo *git.Repository, branch string) error {
+func checkInvalidation(ctx context.Context, c *issues_model.Comment, repo *git.Repository, branch string) error {
// FIXME differentiate between previous and proposed line
commit, err := repo.LineBlame(branch, repo.Path, c.TreePath, uint(c.UnsignedLine()))
if err != nil && (strings.Contains(err.Error(), "fatal: no such path") || notEnoughLines.MatchString(err.Error())) {
@@ -83,7 +83,7 @@ func InvalidateCodeComments(ctx context.Context, prs issues_model.PullRequestLis
return fmt.Errorf("find code comments: %v", err)
}
for _, comment := range codeComments {
- if err := checkInvalidation(ctx, comment, doer, repo, branch); err != nil {
+ if err := checkInvalidation(ctx, comment, repo, branch); err != nil {
return err
}
}
diff --git a/services/pull/update.go b/services/pull/update.go
index bc8c4a25e5..9b676e13ef 100644
--- a/services/pull/update.go
+++ b/services/pull/update.go
@@ -39,7 +39,7 @@ func Update(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.
go AddTestPullRequestTask(doer, pr.BaseRepo.ID, pr.BaseBranch, false, "", "")
}()
- return updateHeadByRebaseOnToBase(ctx, pr, doer, message)
+ return updateHeadByRebaseOnToBase(ctx, pr, doer)
}
if err := pr.LoadBaseRepo(ctx); err != nil {
diff --git a/services/pull/update_rebase.go b/services/pull/update_rebase.go
index 8e7bfa0ffd..3e2a7be132 100644
--- a/services/pull/update_rebase.go
+++ b/services/pull/update_rebase.go
@@ -18,7 +18,7 @@ import (
)
// updateHeadByRebaseOnToBase handles updating a PR's head branch by rebasing it on the PR current base branch
-func updateHeadByRebaseOnToBase(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, message string) error {
+func updateHeadByRebaseOnToBase(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User) error {
// "Clone" base repo and add the cache headers for the head repo and branch
mergeCtx, cancel, err := createTemporaryRepoForMerge(ctx, pr, doer, "")
if err != nil {