mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 11:18:30 -04: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:
parent
843f81113e
commit
10cdcb9ea8
9 changed files with 100 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue