@@ -467,11 +467,11 @@ func (issue *Issue) clearLabels(e db.Engine, doer *User) (err error) {
467467// ClearLabels removes all issue labels as the given user.
468468// Triggers appropriate WebHooks, if any.
469469func (issue * Issue ) ClearLabels (doer * User ) (err error ) {
470- ctx , commiter , err := db .TxContext ()
470+ ctx , committer , err := db .TxContext ()
471471 if err != nil {
472472 return err
473473 }
474- defer commiter .Close ()
474+ defer committer .Close ()
475475
476476 if err := issue .loadRepo (ctx .Engine ()); err != nil {
477477 return err
@@ -491,7 +491,7 @@ func (issue *Issue) ClearLabels(doer *User) (err error) {
491491 return err
492492 }
493493
494- if err = commiter .Commit (); err != nil {
494+ if err = committer .Commit (); err != nil {
495495 return fmt .Errorf ("Commit: %v" , err )
496496 }
497497
@@ -515,11 +515,11 @@ func (ts labelSorter) Swap(i, j int) {
515515// ReplaceLabels removes all current labels and add new labels to the issue.
516516// Triggers appropriate WebHooks, if any.
517517func (issue * Issue ) ReplaceLabels (labels []* Label , doer * User ) (err error ) {
518- ctx , commiter , err := db .TxContext ()
518+ ctx , committer , err := db .TxContext ()
519519 if err != nil {
520520 return err
521521 }
522- defer commiter .Close ()
522+ defer committer .Close ()
523523
524524 if err = issue .loadRepo (ctx .Engine ()); err != nil {
525525 return err
@@ -577,7 +577,7 @@ func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error) {
577577 return err
578578 }
579579
580- return commiter .Commit ()
580+ return committer .Commit ()
581581}
582582
583583// ReadBy sets issue to be read by given user.
@@ -682,11 +682,11 @@ func (issue *Issue) doChangeStatus(e db.Engine, doer *User, isMergePull bool) (*
682682
683683// ChangeStatus changes issue status to open or closed.
684684func (issue * Issue ) ChangeStatus (doer * User , isClosed bool ) (* Comment , error ) {
685- ctx , commiter , err := db .TxContext ()
685+ ctx , committer , err := db .TxContext ()
686686 if err != nil {
687687 return nil , err
688688 }
689- defer commiter .Close ()
689+ defer committer .Close ()
690690
691691 if err := issue .loadRepo (ctx .Engine ()); err != nil {
692692 return nil , err
@@ -700,7 +700,7 @@ func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (*Comment, error) {
700700 return nil , err
701701 }
702702
703- if err = commiter .Commit (); err != nil {
703+ if err = committer .Commit (); err != nil {
704704 return nil , fmt .Errorf ("Commit: %v" , err )
705705 }
706706
@@ -709,11 +709,11 @@ func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (*Comment, error) {
709709
710710// ChangeTitle changes the title of this issue, as the given user.
711711func (issue * Issue ) ChangeTitle (doer * User , oldTitle string ) (err error ) {
712- ctx , commiter , err := db .TxContext ()
712+ ctx , committer , err := db .TxContext ()
713713 if err != nil {
714714 return err
715715 }
716- defer commiter .Close ()
716+ defer committer .Close ()
717717
718718 if err = updateIssueCols (ctx .Engine (), issue , "name" ); err != nil {
719719 return fmt .Errorf ("updateIssueCols: %v" , err )
@@ -738,22 +738,22 @@ func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error) {
738738 return err
739739 }
740740
741- return commiter .Commit ()
741+ return committer .Commit ()
742742}
743743
744744// ChangeRef changes the branch of this issue, as the given user.
745745func (issue * Issue ) ChangeRef (doer * User , oldRef string ) (err error ) {
746- ctx , commiter , err := db .TxContext ()
746+ ctx , committer , err := db .TxContext ()
747747 if err != nil {
748748 return err
749749 }
750- defer commiter .Close ()
750+ defer committer .Close ()
751751
752752 if err = updateIssueCols (ctx .Engine (), issue , "ref" ); err != nil {
753753 return fmt .Errorf ("updateIssueCols: %v" , err )
754754 }
755755
756- return commiter .Commit ()
756+ return committer .Commit ()
757757}
758758
759759// AddDeletePRBranchComment adds delete branch comment for pull request issue
@@ -762,11 +762,11 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
762762 if err != nil {
763763 return err
764764 }
765- ctx , commiter , err := db .TxContext ()
765+ ctx , committer , err := db .TxContext ()
766766 if err != nil {
767767 return err
768768 }
769- defer commiter .Close ()
769+ defer committer .Close ()
770770 opts := & CreateCommentOptions {
771771 Type : CommentTypeDeleteBranch ,
772772 Doer : doer ,
@@ -778,16 +778,16 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
778778 return err
779779 }
780780
781- return commiter .Commit ()
781+ return committer .Commit ()
782782}
783783
784784// UpdateAttachments update attachments by UUIDs for the issue
785785func (issue * Issue ) UpdateAttachments (uuids []string ) (err error ) {
786- ctx , commiter , err := db .TxContext ()
786+ ctx , committer , err := db .TxContext ()
787787 if err != nil {
788788 return err
789789 }
790- defer commiter .Close ()
790+ defer committer .Close ()
791791 attachments , err := getAttachmentsByUUIDs (ctx .Engine (), uuids )
792792 if err != nil {
793793 return fmt .Errorf ("getAttachmentsByUUIDs [uuids: %v]: %v" , uuids , err )
@@ -798,18 +798,18 @@ func (issue *Issue) UpdateAttachments(uuids []string) (err error) {
798798 return fmt .Errorf ("update attachment [id: %d]: %v" , attachments [i ].ID , err )
799799 }
800800 }
801- return commiter .Commit ()
801+ return committer .Commit ()
802802}
803803
804804// ChangeContent changes issue content, as the given user.
805805func (issue * Issue ) ChangeContent (doer * User , content string ) (err error ) {
806806 issue .Content = content
807807
808- ctx , commiter , err := db .TxContext ()
808+ ctx , committer , err := db .TxContext ()
809809 if err != nil {
810810 return err
811811 }
812- defer commiter .Close ()
812+ defer committer .Close ()
813813
814814 if err = updateIssueCols (ctx .Engine (), issue , "content" ); err != nil {
815815 return fmt .Errorf ("UpdateIssueCols: %v" , err )
@@ -819,7 +819,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) {
819819 return err
820820 }
821821
822- return commiter .Commit ()
822+ return committer .Commit ()
823823}
824824
825825// GetTasks returns the amount of tasks in the issues content
@@ -990,11 +990,11 @@ func newIssue(e db.Engine, doer *User, opts NewIssueOptions) (err error) {
990990// RecalculateIssueIndexForRepo create issue_index for repo if not exist and
991991// update it based on highest index of existing issues assigned to a repo
992992func RecalculateIssueIndexForRepo (repoID int64 ) error {
993- ctx , commiter , err := db .TxContext ()
993+ ctx , committer , err := db .TxContext ()
994994 if err != nil {
995995 return err
996996 }
997- defer commiter .Close ()
997+ defer committer .Close ()
998998
999999 if err := db .UpsertResourceIndex (ctx .Engine (), "issue_index" , repoID ); err != nil {
10001000 return err
@@ -1009,7 +1009,7 @@ func RecalculateIssueIndexForRepo(repoID int64) error {
10091009 return err
10101010 }
10111011
1012- return commiter .Commit ()
1012+ return committer .Commit ()
10131013}
10141014
10151015// NewIssue creates new issue with labels for repository.
@@ -1021,11 +1021,11 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
10211021
10221022 issue .Index = idx
10231023
1024- ctx , commiter , err := db .TxContext ()
1024+ ctx , committer , err := db .TxContext ()
10251025 if err != nil {
10261026 return err
10271027 }
1028- defer commiter .Close ()
1028+ defer committer .Close ()
10291029
10301030 if err = newIssue (ctx .Engine (), issue .Poster , NewIssueOptions {
10311031 Repo : repo ,
@@ -1039,7 +1039,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
10391039 return fmt .Errorf ("newIssue: %v" , err )
10401040 }
10411041
1042- if err = commiter .Commit (); err != nil {
1042+ if err = committer .Commit (); err != nil {
10431043 return fmt .Errorf ("Commit: %v" , err )
10441044 }
10451045
0 commit comments