@@ -467,11 +467,11 @@ func (issue *Issue) clearLabels(e db.Engine, doer *User) (err error) {
467
467
// ClearLabels removes all issue labels as the given user.
468
468
// Triggers appropriate WebHooks, if any.
469
469
func (issue * Issue ) ClearLabels (doer * User ) (err error ) {
470
- ctx , commiter , err := db .TxContext ()
470
+ ctx , committer , err := db .TxContext ()
471
471
if err != nil {
472
472
return err
473
473
}
474
- defer commiter .Close ()
474
+ defer committer .Close ()
475
475
476
476
if err := issue .loadRepo (ctx .Engine ()); err != nil {
477
477
return err
@@ -491,7 +491,7 @@ func (issue *Issue) ClearLabels(doer *User) (err error) {
491
491
return err
492
492
}
493
493
494
- if err = commiter .Commit (); err != nil {
494
+ if err = committer .Commit (); err != nil {
495
495
return fmt .Errorf ("Commit: %v" , err )
496
496
}
497
497
@@ -515,11 +515,11 @@ func (ts labelSorter) Swap(i, j int) {
515
515
// ReplaceLabels removes all current labels and add new labels to the issue.
516
516
// Triggers appropriate WebHooks, if any.
517
517
func (issue * Issue ) ReplaceLabels (labels []* Label , doer * User ) (err error ) {
518
- ctx , commiter , err := db .TxContext ()
518
+ ctx , committer , err := db .TxContext ()
519
519
if err != nil {
520
520
return err
521
521
}
522
- defer commiter .Close ()
522
+ defer committer .Close ()
523
523
524
524
if err = issue .loadRepo (ctx .Engine ()); err != nil {
525
525
return err
@@ -577,7 +577,7 @@ func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error) {
577
577
return err
578
578
}
579
579
580
- return commiter .Commit ()
580
+ return committer .Commit ()
581
581
}
582
582
583
583
// ReadBy sets issue to be read by given user.
@@ -682,11 +682,11 @@ func (issue *Issue) doChangeStatus(e db.Engine, doer *User, isMergePull bool) (*
682
682
683
683
// ChangeStatus changes issue status to open or closed.
684
684
func (issue * Issue ) ChangeStatus (doer * User , isClosed bool ) (* Comment , error ) {
685
- ctx , commiter , err := db .TxContext ()
685
+ ctx , committer , err := db .TxContext ()
686
686
if err != nil {
687
687
return nil , err
688
688
}
689
- defer commiter .Close ()
689
+ defer committer .Close ()
690
690
691
691
if err := issue .loadRepo (ctx .Engine ()); err != nil {
692
692
return nil , err
@@ -700,7 +700,7 @@ func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (*Comment, error) {
700
700
return nil , err
701
701
}
702
702
703
- if err = commiter .Commit (); err != nil {
703
+ if err = committer .Commit (); err != nil {
704
704
return nil , fmt .Errorf ("Commit: %v" , err )
705
705
}
706
706
@@ -709,11 +709,11 @@ func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (*Comment, error) {
709
709
710
710
// ChangeTitle changes the title of this issue, as the given user.
711
711
func (issue * Issue ) ChangeTitle (doer * User , oldTitle string ) (err error ) {
712
- ctx , commiter , err := db .TxContext ()
712
+ ctx , committer , err := db .TxContext ()
713
713
if err != nil {
714
714
return err
715
715
}
716
- defer commiter .Close ()
716
+ defer committer .Close ()
717
717
718
718
if err = updateIssueCols (ctx .Engine (), issue , "name" ); err != nil {
719
719
return fmt .Errorf ("updateIssueCols: %v" , err )
@@ -738,22 +738,22 @@ func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error) {
738
738
return err
739
739
}
740
740
741
- return commiter .Commit ()
741
+ return committer .Commit ()
742
742
}
743
743
744
744
// ChangeRef changes the branch of this issue, as the given user.
745
745
func (issue * Issue ) ChangeRef (doer * User , oldRef string ) (err error ) {
746
- ctx , commiter , err := db .TxContext ()
746
+ ctx , committer , err := db .TxContext ()
747
747
if err != nil {
748
748
return err
749
749
}
750
- defer commiter .Close ()
750
+ defer committer .Close ()
751
751
752
752
if err = updateIssueCols (ctx .Engine (), issue , "ref" ); err != nil {
753
753
return fmt .Errorf ("updateIssueCols: %v" , err )
754
754
}
755
755
756
- return commiter .Commit ()
756
+ return committer .Commit ()
757
757
}
758
758
759
759
// AddDeletePRBranchComment adds delete branch comment for pull request issue
@@ -762,11 +762,11 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
762
762
if err != nil {
763
763
return err
764
764
}
765
- ctx , commiter , err := db .TxContext ()
765
+ ctx , committer , err := db .TxContext ()
766
766
if err != nil {
767
767
return err
768
768
}
769
- defer commiter .Close ()
769
+ defer committer .Close ()
770
770
opts := & CreateCommentOptions {
771
771
Type : CommentTypeDeleteBranch ,
772
772
Doer : doer ,
@@ -778,16 +778,16 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
778
778
return err
779
779
}
780
780
781
- return commiter .Commit ()
781
+ return committer .Commit ()
782
782
}
783
783
784
784
// UpdateAttachments update attachments by UUIDs for the issue
785
785
func (issue * Issue ) UpdateAttachments (uuids []string ) (err error ) {
786
- ctx , commiter , err := db .TxContext ()
786
+ ctx , committer , err := db .TxContext ()
787
787
if err != nil {
788
788
return err
789
789
}
790
- defer commiter .Close ()
790
+ defer committer .Close ()
791
791
attachments , err := getAttachmentsByUUIDs (ctx .Engine (), uuids )
792
792
if err != nil {
793
793
return fmt .Errorf ("getAttachmentsByUUIDs [uuids: %v]: %v" , uuids , err )
@@ -798,18 +798,18 @@ func (issue *Issue) UpdateAttachments(uuids []string) (err error) {
798
798
return fmt .Errorf ("update attachment [id: %d]: %v" , attachments [i ].ID , err )
799
799
}
800
800
}
801
- return commiter .Commit ()
801
+ return committer .Commit ()
802
802
}
803
803
804
804
// ChangeContent changes issue content, as the given user.
805
805
func (issue * Issue ) ChangeContent (doer * User , content string ) (err error ) {
806
806
issue .Content = content
807
807
808
- ctx , commiter , err := db .TxContext ()
808
+ ctx , committer , err := db .TxContext ()
809
809
if err != nil {
810
810
return err
811
811
}
812
- defer commiter .Close ()
812
+ defer committer .Close ()
813
813
814
814
if err = updateIssueCols (ctx .Engine (), issue , "content" ); err != nil {
815
815
return fmt .Errorf ("UpdateIssueCols: %v" , err )
@@ -819,7 +819,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) {
819
819
return err
820
820
}
821
821
822
- return commiter .Commit ()
822
+ return committer .Commit ()
823
823
}
824
824
825
825
// 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) {
990
990
// RecalculateIssueIndexForRepo create issue_index for repo if not exist and
991
991
// update it based on highest index of existing issues assigned to a repo
992
992
func RecalculateIssueIndexForRepo (repoID int64 ) error {
993
- ctx , commiter , err := db .TxContext ()
993
+ ctx , committer , err := db .TxContext ()
994
994
if err != nil {
995
995
return err
996
996
}
997
- defer commiter .Close ()
997
+ defer committer .Close ()
998
998
999
999
if err := db .UpsertResourceIndex (ctx .Engine (), "issue_index" , repoID ); err != nil {
1000
1000
return err
@@ -1009,7 +1009,7 @@ func RecalculateIssueIndexForRepo(repoID int64) error {
1009
1009
return err
1010
1010
}
1011
1011
1012
- return commiter .Commit ()
1012
+ return committer .Commit ()
1013
1013
}
1014
1014
1015
1015
// NewIssue creates new issue with labels for repository.
@@ -1021,11 +1021,11 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
1021
1021
1022
1022
issue .Index = idx
1023
1023
1024
- ctx , commiter , err := db .TxContext ()
1024
+ ctx , committer , err := db .TxContext ()
1025
1025
if err != nil {
1026
1026
return err
1027
1027
}
1028
- defer commiter .Close ()
1028
+ defer committer .Close ()
1029
1029
1030
1030
if err = newIssue (ctx .Engine (), issue .Poster , NewIssueOptions {
1031
1031
Repo : repo ,
@@ -1039,7 +1039,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
1039
1039
return fmt .Errorf ("newIssue: %v" , err )
1040
1040
}
1041
1041
1042
- if err = commiter .Commit (); err != nil {
1042
+ if err = committer .Commit (); err != nil {
1043
1043
return fmt .Errorf ("Commit: %v" , err )
1044
1044
}
1045
1045
0 commit comments