mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 03:52:36 +02:00
Fix show single review comments in the PR page (#9143)
This commit is contained in:
1 parent
8ab35eefc4
commit
d779deef6e
2 files changed
+34
-3
No files matched your search
@@ -223,6 +223,11 @@ func getCurrentReview(e Engine, reviewer *User, issue *Issue) (*Review, error) {
|
||||
return reviews[0], nil
|
||||
}
|
||||
|
||||
// ReviewExists returns whether a review exists for a particular line of code in the PR
|
||||
func ReviewExists(issue *Issue, treePath string, line int64) (bool, error) {
|
||||
return x.Cols("id").Exist(&Comment{IssueID: issue.ID, TreePath: treePath, Line: line, Type: CommentTypeCode})
|
||||
}
|
||||
|
||||
// GetCurrentReview returns the current pending review of reviewer for given issue
|
||||
func GetCurrentReview(reviewer *User, issue *Issue) (*Review, error) {
|
||||
return getCurrentReview(x, reviewer, issue)
|
||||
|
||||
Reference in new issue
Block a user