for p, v := range baseBranchName {
if v == '/' && gitRepo.IsBranchExist(baseBranchName[:p]) && p != len(baseBranchName)-1 {
- curentTopicBranch = baseBranchName[p+1:]
+ currentTopicBranch = baseBranchName[p+1:]
baseBranchName = baseBranchName[:p]
break
}
}
}
- if len(topicBranch) == 0 && len(curentTopicBranch) == 0 {
+ if len(topicBranch) == 0 && len(currentTopicBranch) == 0 {
results = append(results, private.HookProcReceiveRefResult{
OriginalRef: opts.RefFullNames[i],
OldOID: opts.OldCommitIDs[i],
@@ -82,17 +82,17 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
var headBranch string
userName := strings.ToLower(opts.UserName)
- if len(curentTopicBranch) == 0 {
- curentTopicBranch = topicBranch
+ if len(currentTopicBranch) == 0 {
+ currentTopicBranch = topicBranch
}
// because different user maybe want to use same topic,
// So it's better to make sure the topic branch name
// has user name prefix
- if !strings.HasPrefix(curentTopicBranch, userName+"/") {
- headBranch = userName + "/" + curentTopicBranch
+ if !strings.HasPrefix(currentTopicBranch, userName+"/") {
+ headBranch = userName + "/" + currentTopicBranch
} else {
- headBranch = curentTopicBranch
+ headBranch = currentTopicBranch
}
pr, err := issues_model.GetUnmergedPullRequest(ctx, repo.ID, repo.ID, headBranch, baseBranchName, issues_model.PullRequestFlowAGit)
diff --git a/services/automerge/automerge.go b/services/automerge/automerge.go
index bf713c44314dd..8d6f5376d3cda 100644
--- a/services/automerge/automerge.go
+++ b/services/automerge/automerge.go
@@ -228,12 +228,12 @@ func handlePull(pullID int64, sha string) {
return
}
- if err := pull_service.CheckPullMergable(ctx, doer, &perm, pr, pull_service.MergeCheckTypeGeneral, false); err != nil {
+ if err := pull_service.CheckPullMergeable(ctx, doer, &perm, pr, pull_service.MergeCheckTypeGeneral, false); err != nil {
if errors.Is(pull_service.ErrUserNotAllowedToMerge, err) {
log.Info("%-v was scheduled to automerge by an unauthorized user", pr)
return
}
- log.Error("%-v CheckPullMergable: %v", pr, err)
+ log.Error("%-v CheckPullMergeable: %v", pr, err)
return
}
diff --git a/services/convert/issue_comment.go b/services/convert/issue_comment.go
index b0145c38e6390..6df470bccaade 100644
--- a/services/convert/issue_comment.go
+++ b/services/convert/issue_comment.go
@@ -72,8 +72,8 @@ func ToTimelineComment(ctx context.Context, repo *repo_model.Repository, c *issu
c.Type == issues_model.CommentTypeStopTracking ||
c.Type == issues_model.CommentTypeDeleteTimeManual) &&
c.Content[0] == '|' {
- // TimeTracking Comments from v1.21 on store the seconds instead of an formated string
- // so we check for the "|" delimeter and convert new to legacy format on demand
+ // TimeTracking Comments from v1.21 on store the seconds instead of an formatted string
+ // so we check for the "|" delimiter and convert new to legacy format on demand
c.Content = util.SecToTime(c.Content[1:])
}
}
diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go
index 9e1db6fd4353c..5ae3ef09ee34c 100644
--- a/services/gitdiff/gitdiff.go
+++ b/services/gitdiff/gitdiff.go
@@ -168,7 +168,7 @@ func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection {
}
func getDiffLineSectionInfo(treePath, line string, lastLeftIdx, lastRightIdx int) *DiffLineSectionInfo {
- leftLine, leftHunk, rightLine, righHunk := git.ParseDiffHunkString(line)
+ leftLine, leftHunk, rightLine, rightHunk := git.ParseDiffHunkString(line)
return &DiffLineSectionInfo{
Path: treePath,
@@ -177,7 +177,7 @@ func getDiffLineSectionInfo(treePath, line string, lastLeftIdx, lastRightIdx int
LeftIdx: leftLine,
RightIdx: rightLine,
LeftHunkSize: leftHunk,
- RightHunkSize: righHunk,
+ RightHunkSize: rightHunk,
}
}
diff --git a/services/issue/assignee.go b/services/issue/assignee.go
index 8fe35b560203e..48ba5f8525dd3 100644
--- a/services/issue/assignee.go
+++ b/services/issue/assignee.go
@@ -19,10 +19,10 @@ import (
// DeleteNotPassedAssignee deletes all assignees who aren't passed via the "assignees" array
func DeleteNotPassedAssignee(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, assignees []*user_model.User) (err error) {
var found bool
- oriAssignes := make([]*user_model.User, len(issue.Assignees))
- _ = copy(oriAssignes, issue.Assignees)
+ oriAssignees := make([]*user_model.User, len(issue.Assignees))
+ _ = copy(oriAssignees, issue.Assignees)
- for _, assignee := range oriAssignes {
+ for _, assignee := range oriAssignees {
found = false
for _, alreadyAssignee := range assignees {
if assignee.ID == alreadyAssignee.ID {
diff --git a/services/org/org.go b/services/org/org.go
index a62e5b6fc8f6d..f5bde8267f7ac 100644
--- a/services/org/org.go
+++ b/services/org/org.go
@@ -20,11 +20,11 @@ import (
// DeleteOrganization completely and permanently deletes everything of organization.
func DeleteOrganization(org *org_model.Organization) error {
- ctx, commiter, err := db.TxContext(db.DefaultContext)
+ ctx, committer, err := db.TxContext(db.DefaultContext)
if err != nil {
return err
}
- defer commiter.Close()
+ defer committer.Close()
// Check ownership of repository.
count, err := repo_model.CountRepositories(ctx, repo_model.CountRepositoryOptions{OwnerID: org.ID})
@@ -45,7 +45,7 @@ func DeleteOrganization(org *org_model.Organization) error {
return fmt.Errorf("DeleteOrganization: %w", err)
}
- if err := commiter.Commit(); err != nil {
+ if err := committer.Commit(); err != nil {
return err
}
diff --git a/services/packages/container/blob_uploader.go b/services/packages/container/blob_uploader.go
index bae2e2d6af667..034944874feda 100644
--- a/services/packages/container/blob_uploader.go
+++ b/services/packages/container/blob_uploader.go
@@ -18,8 +18,8 @@ import (
var (
// errWriteAfterRead occurs if Write is called after a read operation
errWriteAfterRead = errors.New("write is unsupported after a read operation")
- // errOffsetMissmatch occurs if the file offset is different than the model
- errOffsetMissmatch = errors.New("offset mismatch between file and model")
+ // errOffsetMismatch occurs if the file offset is different than the model
+ errOffsetMismatch = errors.New("offset mismatch between file and model")
)
// BlobUploader handles chunked blob uploads
@@ -77,7 +77,7 @@ func (u *BlobUploader) Append(ctx context.Context, r io.Reader) error {
return err
}
if offset != u.BytesReceived {
- return errOffsetMissmatch
+ return errOffsetMismatch
}
n, err := io.Copy(io.MultiWriter(u.file, u.MultiHasher), r)
diff --git a/services/pull/check.go b/services/pull/check.go
index b5150ad9a8047..12308d8c14a3a 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -38,7 +38,7 @@ var (
ErrHasMerged = errors.New("has already been merged")
ErrIsWorkInProgress = errors.New("work in progress PRs cannot be merged")
ErrIsChecking = errors.New("cannot merge while conflict checking is in progress")
- ErrNotMergableState = errors.New("not in mergeable state")
+ ErrNotMergeableState = errors.New("not in mergeable state")
ErrDependenciesLeft = errors.New("is blocked by an open dependency")
)
@@ -65,8 +65,8 @@ const (
MergeCheckTypeAuto // Auto Merge (Scheduled Merge) After Checks Succeed
)
-// CheckPullMergable check if the pull mergable 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 {
+// CheckPullMergeable check if the pull mergeable based on all conditions (branch protection, merge options, ...)
+func CheckPullMergeable(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 {
return ErrHasMerged
@@ -96,7 +96,7 @@ func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *acce
}
if !pr.CanAutoMerge() && !pr.IsEmpty() {
- return ErrNotMergableState
+ return ErrNotMergeableState
}
if pr.IsChecking() {
diff --git a/services/pull/merge_merge.go b/services/pull/merge_merge.go
index 0f7664297aa81..0c37d58f9775e 100644
--- a/services/pull/merge_merge.go
+++ b/services/pull/merge_merge.go
@@ -9,7 +9,7 @@ import (
"code.gitea.io/gitea/modules/log"
)
-// doMergeStyleMerge merges the tracking into the current HEAD - which is assumed to tbe staging branch (equal to the pr.BaseBranch)
+// doMergeStyleMerge merges the tracking into the current HEAD - which is assumed to the staging branch (equal to the pr.BaseBranch)
func doMergeStyleMerge(ctx *mergeContext, message string) error {
cmd := git.NewCommand(ctx, "merge", "--no-ff", "--no-commit").AddDynamicArguments(trackingBranch)
if err := runMergeCommand(ctx, repo_model.MergeStyleMerge, cmd); err != nil {
diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl
index 36210af6d8e8f..c4b70282aedb0 100644
--- a/templates/shared/actions/runner_list.tmpl
+++ b/templates/shared/actions/runner_list.tmpl
@@ -71,7 +71,7 @@
{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}} |
- {{if .Editable $.RunnerOnwerID $.RunnerRepoID}}
+ {{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
{{svg "octicon-pencil"}}
{{end}}
|
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 7b3a616740ca2..f7f511fbea355 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -22008,7 +22008,7 @@
"author": {
"$ref": "#/definitions/CommitUser"
},
- "commiter": {
+ "committer": {
"$ref": "#/definitions/CommitUser"
},
"message": {
diff --git a/tests/integration/api_packages_maven_test.go b/tests/integration/api_packages_maven_test.go
index 81112f305a62e..fb147ef4517ac 100644
--- a/tests/integration/api_packages_maven_test.go
+++ b/tests/integration/api_packages_maven_test.go
@@ -107,7 +107,7 @@ func TestPackageMaven(t *testing.T) {
t.Run("UploadVerifySHA1", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
- t.Run("Missmatch", func(t *testing.T) {
+ t.Run("Mismatch", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
putFile(t, fmt.Sprintf("/%s/%s.sha1", packageVersion, filename), "test", http.StatusBadRequest)