aboutsummaryrefslogtreecommitdiffstats
path: root/models/actions
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 /models/actions
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 'models/actions')
-rw-r--r--models/actions/run.go6
-rw-r--r--models/actions/task.go12
-rw-r--r--models/actions/tasks_version.go8
3 files changed, 13 insertions, 13 deletions
diff --git a/models/actions/run.go b/models/actions/run.go
index d68710f46d..4f886999e9 100644
--- a/models/actions/run.go
+++ b/models/actions/run.go
@@ -262,11 +262,11 @@ func CancelPreviousJobs(ctx context.Context, repoID int64, ref, workflowID strin
// InsertRun inserts a run
func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWorkflow) error {
- ctx, commiter, err := db.TxContext(ctx)
+ ctx, committer, err := db.TxContext(ctx)
if err != nil {
return err
}
- defer commiter.Close()
+ defer committer.Close()
index, err := db.GetNextResourceIndex(ctx, "action_run_index", run.RepoID)
if err != nil {
@@ -331,7 +331,7 @@ func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWork
}
}
- return commiter.Commit()
+ return committer.Commit()
}
func GetRunByID(ctx context.Context, id int64) (*ActionRun, error) {
diff --git a/models/actions/task.go b/models/actions/task.go
index 9946cf5233..f2f796a626 100644
--- a/models/actions/task.go
+++ b/models/actions/task.go
@@ -216,11 +216,11 @@ func GetRunningTaskByToken(ctx context.Context, token string) (*ActionTask, erro
}
func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask, bool, error) {
- ctx, commiter, err := db.TxContext(ctx)
+ ctx, committer, err := db.TxContext(ctx)
if err != nil {
return nil, false, err
}
- defer commiter.Close()
+ defer committer.Close()
e := db.GetEngine(ctx)
@@ -322,7 +322,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
task.Job = job
- if err := commiter.Commit(); err != nil {
+ if err := committer.Commit(); err != nil {
return nil, false, err
}
@@ -347,11 +347,11 @@ func UpdateTaskByState(ctx context.Context, state *runnerv1.TaskState) (*ActionT
stepStates[v.Id] = v
}
- ctx, commiter, err := db.TxContext(ctx)
+ ctx, committer, err := db.TxContext(ctx)
if err != nil {
return nil, err
}
- defer commiter.Close()
+ defer committer.Close()
e := db.GetEngine(ctx)
@@ -412,7 +412,7 @@ func UpdateTaskByState(ctx context.Context, state *runnerv1.TaskState) (*ActionT
}
}
- if err := commiter.Commit(); err != nil {
+ if err := committer.Commit(); err != nil {
return nil, err
}
diff --git a/models/actions/tasks_version.go b/models/actions/tasks_version.go
index 5c0a86538d..96c5468c1a 100644
--- a/models/actions/tasks_version.go
+++ b/models/actions/tasks_version.go
@@ -13,7 +13,7 @@ import (
// ActionTasksVersion
// If both ownerID and repoID is zero, its scope is global.
-// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currrently).
+// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currently).
// If ownerID is zero and repoID is not zero, its scope is repo.
type ActionTasksVersion struct {
ID int64 `xorm:"pk autoincr"`
@@ -73,11 +73,11 @@ func increaseTasksVersionByScope(ctx context.Context, ownerID, repoID int64) err
}
func IncreaseTaskVersion(ctx context.Context, ownerID, repoID int64) error {
- ctx, commiter, err := db.TxContext(ctx)
+ ctx, committer, err := db.TxContext(ctx)
if err != nil {
return err
}
- defer commiter.Close()
+ defer committer.Close()
// 1. increase global
if err := increaseTasksVersionByScope(ctx, 0, 0); err != nil {
@@ -101,5 +101,5 @@ func IncreaseTaskVersion(ctx context.Context, ownerID, repoID int64) error {
}
}
- return commiter.Commit()
+ return committer.Commit()
}