diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/branches.go | 2 | ||||
-rw-r--r-- | models/issue.go | 2 | ||||
-rw-r--r-- | models/issue_list.go | 6 | ||||
-rw-r--r-- | models/migrations/v14.go | 2 | ||||
-rw-r--r-- | models/org_team_test.go | 6 | ||||
-rw-r--r-- | models/release.go | 2 | ||||
-rw-r--r-- | models/user.go | 6 | ||||
-rw-r--r-- | models/webhook.go | 4 |
8 files changed, 15 insertions, 15 deletions
diff --git a/models/branches.go b/models/branches.go index 89a699603b..322d33daae 100644 --- a/models/branches.go +++ b/models/branches.go @@ -57,7 +57,7 @@ func GetProtectedBranchBy(repoID int64, BranchName string) (*ProtectedBranch, er return rel, nil } -// GetProtectedBranches get all protected btanches +// GetProtectedBranches get all protected branches func (repo *Repository) GetProtectedBranches() ([]*ProtectedBranch, error) { protectedBranches := make([]*ProtectedBranch, 0) return protectedBranches, x.Find(&protectedBranches, &ProtectedBranch{RepoID: repo.ID}) diff --git a/models/issue.go b/models/issue.go index d5e20eb20a..eab494bdea 100644 --- a/models/issue.go +++ b/models/issue.go @@ -733,7 +733,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) { return nil } -// ChangeAssignee changes the Asssignee field of this issue. +// ChangeAssignee changes the Assignee field of this issue. func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) { var oldAssigneeID = issue.AssigneeID issue.AssigneeID = assigneeID diff --git a/models/issue_list.go b/models/issue_list.go index 692243eff7..ede7e8433c 100644 --- a/models/issue_list.go +++ b/models/issue_list.go @@ -59,10 +59,10 @@ func (issues IssueList) loadPosters(e Engine) error { return nil } - postgerIDs := issues.getPosterIDs() - posterMaps := make(map[int64]*User, len(postgerIDs)) + posterIDs := issues.getPosterIDs() + posterMaps := make(map[int64]*User, len(posterIDs)) err := e. - In("id", postgerIDs). + In("id", posterIDs). Find(&posterMaps) if err != nil { return err diff --git a/models/migrations/v14.go b/models/migrations/v14.go index 12ae6290b1..392f9fdba6 100644 --- a/models/migrations/v14.go +++ b/models/migrations/v14.go @@ -28,7 +28,7 @@ type UserV14 struct { DiffViewStyle string `xorm:"NOT NULL DEFAULT ''"` } -// TableName will be invoked by XORM to customrize the table name +// TableName will be invoked by XORM to customize the table name func (*UserV14) TableName() string { return "user" } diff --git a/models/org_team_test.go b/models/org_team_test.go index 506de6e6bd..9afd733d81 100644 --- a/models/org_team_test.go +++ b/models/org_team_test.go @@ -117,15 +117,15 @@ func TestTeam_HasRepository(t *testing.T) { func TestTeam_AddRepository(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - testSucess := func(teamID, repoID int64) { + testSuccess := func(teamID, repoID int64) { team := AssertExistsAndLoadBean(t, &Team{ID: teamID}).(*Team) repo := AssertExistsAndLoadBean(t, &Repository{ID: repoID}).(*Repository) assert.NoError(t, team.AddRepository(repo)) AssertExistsAndLoadBean(t, &TeamRepo{TeamID: teamID, RepoID: repoID}) CheckConsistencyFor(t, &Team{ID: teamID}, &Repository{ID: repoID}) } - testSucess(2, 3) - testSucess(2, 5) + testSuccess(2, 3) + testSuccess(2, 5) team := AssertExistsAndLoadBean(t, &Team{ID: 1}).(*Team) repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) diff --git a/models/release.go b/models/release.go index ae3200d39d..bc48f61596 100644 --- a/models/release.go +++ b/models/release.go @@ -73,7 +73,7 @@ func (r *Release) loadAttributes(e Engine) error { return nil } -// LoadAttributes load repo and publisher attributes for a realease +// LoadAttributes load repo and publisher attributes for a release func (r *Release) LoadAttributes() error { return r.loadAttributes(x) } diff --git a/models/user.go b/models/user.go index cfc01936f0..ff898573a6 100644 --- a/models/user.go +++ b/models/user.go @@ -541,7 +541,7 @@ func (u *User) GetOrgRepositoryIDs() ([]int64, error) { GroupBy("repository.id").Find(&ids) } -// GetAccessRepoIDs returns all repsitories IDs where user's or user is a team member orgnizations +// GetAccessRepoIDs returns all repositories IDs where user's or user is a team member organizations func (u *User) GetAccessRepoIDs() ([]int64, error) { ids, err := u.GetRepositoryIDs() if err != nil { @@ -596,7 +596,7 @@ func (u *User) ShortName(length int) string { return base.EllipsisString(u.Name, length) } -// IsMailable checks if a user is elegible +// IsMailable checks if a user is eligible // to receive emails. func (u *User) IsMailable() bool { return u.IsActive @@ -615,7 +615,7 @@ func IsUserExist(uid int64, name string) (bool, error) { Get(&User{LowerName: strings.ToLower(name)}) } -// GetUserSalt returns a ramdom user salt token. +// GetUserSalt returns a random user salt token. func GetUserSalt() (string, error) { return base.GetRandomString(10) } diff --git a/models/webhook.go b/models/webhook.go index 20303916c5..8cd2b7dd43 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -475,11 +475,11 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err // check if repo belongs to org and append additional webhooks if repo.MustOwner().IsOrganization() { // get hooks for org - orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID) + orgHooks, err := GetActiveWebhooksByOrgID(repo.OwnerID) if err != nil { return fmt.Errorf("GetActiveWebhooksByOrgID: %v", err) } - ws = append(ws, orgws...) + ws = append(ws, orgHooks...) } if len(ws) == 0 { |