@@ -51,7 +51,7 @@ var ErrSubmitReviewOnClosedPR = errors.New("can't submit review for a closed or
5151// If the line got changed the comment is going to be invalidated.
5252func checkInvalidation (ctx context.Context , c * issues_model.Comment , repo * git.Repository , branch string ) error {
5353 // FIXME differentiate between previous and proposed line
54- commit , err := repo .LineBlame (branch , repo .Path , c .TreePath , uint (c .UnsignedLine ()))
54+ commit , err := repo .LineBlame (ctx , branch , repo .Path , c .TreePath , uint (c .UnsignedLine ()))
5555 if err != nil && (strings .Contains (err .Error (), "fatal: no such path" ) || notEnoughLines .MatchString (err .Error ())) {
5656 c .Invalidated = true
5757 return issues_model .UpdateCommentInvalidate (ctx , c )
@@ -233,7 +233,7 @@ func createCodeComment(ctx context.Context, doer *user_model.User, repo *repo_mo
233233 // FIXME validate treePath
234234 // Get latest commit referencing the commented line
235235 // No need for get commit for base branch changes
236- commit , err := gitRepo .LineBlame (head , gitRepo .Path , treePath , uint (line ))
236+ commit , err := gitRepo .LineBlame (ctx , head , gitRepo .Path , treePath , uint (line ))
237237 if err == nil {
238238 commitID = commit .ID .String ()
239239 } else if ! (strings .Contains (err .Error (), "exit status 128 - fatal: no such path" ) || notEnoughLines .MatchString (err .Error ())) {
0 commit comments