@@ -432,9 +432,9 @@ func Diff(ctx *context.Context) {
432432 ctx .Data ["MergedPRIssueNumber" ] = pr .Index
433433 }
434434
435- commitComment , err := git_model .GetCommitDataBySHA (ctx , ctx .Repo .Repository .ID , commitID )
435+ commitComment , err := git_model .GetCommitCommentBySHA (ctx , ctx .Repo .Repository .ID , commitID )
436436 if err != nil {
437- ctx .ServerError ("GetCommitDataBySHA " , err )
437+ ctx .ServerError ("GetCommitCommentBySHA " , err )
438438 return
439439 }
440440
@@ -531,7 +531,7 @@ func CreateCommitComment(ctx *context.Context) {
531531 attachmentsMap = ctx .Session .Get ("attachmentsMaps" ).(git_model.AttachmentMap )
532532 }
533533
534- opts := git_model.CreateCommitDataOptions {
534+ opts := git_model.CreateCommitCommentOptions {
535535 RefRepoID : ctx .Repo .Repository .ID ,
536536 Repo : ctx .Repo .Repository ,
537537 Doer : ctx .Doer ,
@@ -558,13 +558,13 @@ func CreateCommitComment(ctx *context.Context) {
558558 return
559559 }
560560 }
561- renderCommitData (ctx , commitComment , form .Origin , signedLine )
561+ renderCommitComment (ctx , commitComment , form .Origin , signedLine )
562562}
563563
564- func renderCommitData (ctx * context.Context , commitComment * git_model.CommitComment , origin string , signedLine int64 ) {
564+ func renderCommitComment (ctx * context.Context , commitComment * git_model.CommitComment , origin string , signedLine int64 ) {
565565 ctx .Data ["PageIsDiff" ] = true
566566
567- opts := git_model.FindCommitDataOptions {
567+ opts := git_model.FindCommitCommentOptions {
568568 CommitSHA : commitComment .CommitSHA ,
569569 Line : signedLine ,
570570 }
@@ -600,7 +600,7 @@ func renderCommitData(ctx *context.Context, commitComment *git_model.CommitComme
600600
601601// DeleteCommitComment delete comment of commit
602602func DeleteCommitComment (ctx * context.Context ) {
603- commitComment , err := git_model .GetCommitDataByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
603+ commitComment , err := git_model .GetCommitCommentByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
604604 if err != nil {
605605 return
606606 }
@@ -610,17 +610,17 @@ func DeleteCommitComment(ctx *context.Context) {
610610 }
611611
612612 if err = git_model .DeleteCommitComment (ctx , commitComment ); err != nil {
613- ctx .ServerError ("GetCommitDataByID " , err )
613+ ctx .ServerError ("DeleteCommitComment " , err )
614614 return
615615 }
616616
617617 ctx .Status (http .StatusOK )
618618}
619619
620620func UpdateCommitComment (ctx * context.Context ) {
621- commitComment , err := git_model .GetCommitDataByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
621+ commitComment , err := git_model .GetCommitCommentByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
622622 if err != nil {
623- ctx .ServerError ("GetCommitDataByID " , err )
623+ ctx .ServerError ("GetCommitCommentByID " , err )
624624 return
625625 }
626626
@@ -660,7 +660,7 @@ func UpdateCommitComment(ctx *context.Context) {
660660 }
661661 }
662662 maps .Copy (attachmentMap , uploadedAttachments )
663- err = git_model .UpdateCommitData (ctx , & attachmentMap , commitComment )
663+ err = git_model .UpdateCommitComment (ctx , & attachmentMap , commitComment )
664664 if err != nil {
665665 ctx .ServerError ("UpdateCommitComment" , err )
666666 return
@@ -717,9 +717,9 @@ func CancelCommitComment(ctx *context.Context) {
717717
718718func ChangeCommitCommentReaction (ctx * context.Context ) {
719719 form := web .GetForm (ctx ).(* forms.ReactionForm )
720- commitComment , err := git_model .GetCommitDataByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
720+ commitComment , err := git_model .GetCommitCommentByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
721721 if err != nil {
722- ctx .ServerError ("GetCommitDataByID " , err )
722+ ctx .ServerError ("GetCommitCommentByID " , err )
723723 return
724724 }
725725
@@ -866,7 +866,7 @@ func DeleteCommitAttachment(ctx *context.Context) {
866866}
867867
868868func GetCommitAttachmentByUUID (ctx * context.Context ) {
869- commitComment , err := git_model .GetCommitDataByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
869+ commitComment , err := git_model .GetCommitCommentByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
870870 if err != nil {
871871 return
872872 }
@@ -914,7 +914,7 @@ func GetCommitAttachmentByUUID(ctx *context.Context) {
914914}
915915
916916func GetCommitAttachments (ctx * context.Context ) {
917- commitComment , err := git_model .GetCommitDataByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
917+ commitComment , err := git_model .GetCommitCommentByID (ctx , ctx .Repo .Repository .ID , ctx .PathParamInt64 ("id" ))
918918 if err != nil {
919919 return
920920 }
0 commit comments