summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorluzpaz <luzpaz@users.noreply.github.com>2022-07-12 17:32:37 -0400
committerGitHub <noreply@github.com>2022-07-12 23:32:37 +0200
commitd29d6d1991496cc688e9418db4960ca945fd9d6b (patch)
tree878dcc8a2c8621f9328d5093c6003d664d6fe9ed /models
parent966e7bdc9b875abb7192cd572beec40123a815da (diff)
downloadgitea-d29d6d1991496cc688e9418db4960ca945fd9d6b.tar.gz
gitea-d29d6d1991496cc688e9418db4960ca945fd9d6b.zip
Fix various typos (#20338)
* Fix various typos Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon` Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models')
-rw-r--r--models/db/context.go2
-rw-r--r--models/issues/pull_list.go2
-rw-r--r--models/organization/team_repo.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/models/db/context.go b/models/db/context.go
index 783033c0e0..4fd35200cf 100644
--- a/models/db/context.go
+++ b/models/db/context.go
@@ -100,7 +100,7 @@ func TxContext() (*Context, Committer, error) {
}
// WithTx represents executing database operations on a transaction
-// you can optionally change the context to a parrent one
+// you can optionally change the context to a parent one
func WithTx(f func(ctx context.Context) error, stdCtx ...context.Context) error {
parentCtx := DefaultContext
if len(stdCtx) != 0 && stdCtx[0] != nil {
diff --git a/models/issues/pull_list.go b/models/issues/pull_list.go
index 9ca536909e..8eeffa2c0d 100644
--- a/models/issues/pull_list.go
+++ b/models/issues/pull_list.go
@@ -62,7 +62,7 @@ func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequ
Find(&prs)
}
-// CanMaintainerWriteToBranch check whether user is a matainer and could write to the branch
+// CanMaintainerWriteToBranch check whether user is a maintainer and could write to the branch
func CanMaintainerWriteToBranch(p access_model.Permission, branch string, user *user_model.User) bool {
if p.CanWrite(unit.TypeCode) {
return true
diff --git a/models/organization/team_repo.go b/models/organization/team_repo.go
index 717d754c40..fb3f267f81 100644
--- a/models/organization/team_repo.go
+++ b/models/organization/team_repo.go
@@ -55,7 +55,7 @@ func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) ([]*r
Find(&repos)
}
-// AddTeamRepo addes a repo for an organization's team
+// AddTeamRepo adds a repo for an organization's team
func AddTeamRepo(ctx context.Context, orgID, teamID, repoID int64) error {
_, err := db.GetEngine(ctx).Insert(&TeamRepo{
OrgID: orgID,