aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-04-27 10:03:49 +0200
committerGitHub <noreply@github.com>2024-04-27 08:03:49 +0000
commit9b2536b78fdcd3cf444a2f54857d9871e153858f (patch)
tree64a2a18c397a44e4e3cf1fc392d696d919e39685 /services/pull
parentdcc3c17e5c41ad446b71215b095617e066a2e8e1 (diff)
downloadgitea-9b2536b78fdcd3cf444a2f54857d9871e153858f.tar.gz
gitea-9b2536b78fdcd3cf444a2f54857d9871e153858f.zip
Update misspell to 0.5.1 and add `misspellings.csv` (#30573)
Misspell 0.5.0 supports passing a csv file to extend the list of misspellings, so I added some common ones from the codebase. There is at least one typo in a API response so we need to decided whether to revert that and then likely remove the dict entry.
Diffstat (limited to 'services/pull')
-rw-r--r--services/pull/check.go2
-rw-r--r--services/pull/comment.go2
-rw-r--r--services/pull/pull.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/services/pull/check.go b/services/pull/check.go
index f4dd332b14..9495e8ad5f 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -66,7 +66,7 @@ const (
MergeCheckTypeAuto // Auto Merge (Scheduled Merge) After Checks Succeed
)
-// CheckPullMergable check if the pull mergable based on all conditions (branch protection, merge options, ...)
+// CheckPullMergable check if the pull mergeable based on all conditions (branch protection, merge options, ...)
func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, pr *issues_model.PullRequest, mergeCheckType MergeCheckType, adminSkipProtectionCheck bool) error {
return db.WithTx(stdCtx, func(ctx context.Context) error {
if pr.HasMerged {
diff --git a/services/pull/comment.go b/services/pull/comment.go
index d538b118d5..53587d4f54 100644
--- a/services/pull/comment.go
+++ b/services/pull/comment.go
@@ -46,7 +46,7 @@ func getCommitIDsFromRepo(ctx context.Context, repo *repo_model.Repository, oldC
return commitIDs, isForcePush, err
}
- // Find commits between new and old commit exclusing base branch commits
+ // Find commits between new and old commit excluding base branch commits
commits, err := gitRepo.CommitsBetweenNotBase(newCommit, oldCommit, baseBranch)
if err != nil {
return nil, false, err
diff --git a/services/pull/pull.go b/services/pull/pull.go
index 764be5c6e3..5c0ea42d77 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -77,7 +77,7 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
}
defer baseGitRepo.Close()
- var reviewNotifers []*issue_service.ReviewRequestNotifier
+ var reviewNotifiers []*issue_service.ReviewRequestNotifier
if err := db.WithTx(ctx, func(ctx context.Context) error {
if err := issues_model.NewPullRequest(ctx, repo, issue, labelIDs, uuids, pr); err != nil {
return err
@@ -137,7 +137,7 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
}
if !pr.IsWorkInProgress(ctx) {
- reviewNotifers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
+ reviewNotifiers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
if err != nil {
return err
}
@@ -152,7 +152,7 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
}
baseGitRepo.Close() // close immediately to avoid notifications will open the repository again
- issue_service.ReviewRequestNotify(ctx, issue, issue.Poster, reviewNotifers)
+ issue_service.ReviewRequestNotify(ctx, issue, issue.Poster, reviewNotifiers)
mentions, err := issues_model.FindAndUpdateIssueMentions(ctx, issue, issue.Poster, issue.Content)
if err != nil {