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>
This commit is contained in:
luzpaz 2022-07-12 17:32:37 -04:00 committed by GitHub
parent 966e7bdc9b
commit d29d6d1991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 34 additions and 34 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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,