mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Add "Reviewed by you" filter for pull requests (#22927)
This includes pull requests that you approved, requested changes or commented on. Currently such pull requests are not visible in any of the filters on /pulls, while they may need further action like merging, or prodding the author or reviewers. Especially when working with a large team on a repository it's helpful to get a full overview of pull requests that may need your attention, without having to sift through the complete list.
This commit is contained in:
committed by
GitHub
parent
843f81113e
commit
10cdcb9ea8
@ -92,6 +92,10 @@ func SearchIssues(ctx *context.APIContext) {
|
||||
// in: query
|
||||
// description: filter pulls requesting your review, default is false
|
||||
// type: boolean
|
||||
// - name: reviewed
|
||||
// in: query
|
||||
// description: filter pulls reviewed by you, default is false
|
||||
// type: boolean
|
||||
// - name: owner
|
||||
// in: query
|
||||
// description: filter by owner
|
||||
@ -266,6 +270,9 @@ func SearchIssues(ctx *context.APIContext) {
|
||||
if ctx.FormBool("review_requested") {
|
||||
issuesOpt.ReviewRequestedID = ctxUserID
|
||||
}
|
||||
if ctx.FormBool("reviewed") {
|
||||
issuesOpt.ReviewedID = ctxUserID
|
||||
}
|
||||
|
||||
if issues, err = issues_model.Issues(ctx, issuesOpt); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "Issues", err)
|
||||
|
Reference in New Issue
Block a user