mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Allow filtering PRs by poster in the ListPullRequests API (#32209)
as title --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@ -26,6 +26,7 @@ type PullRequestsOptions struct {
|
||||
SortType string
|
||||
Labels []int64
|
||||
MilestoneID int64
|
||||
PosterID int64
|
||||
}
|
||||
|
||||
func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullRequestsOptions) *xorm.Session {
|
||||
@ -46,6 +47,10 @@ func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullR
|
||||
sess.And("issue.milestone_id=?", opts.MilestoneID)
|
||||
}
|
||||
|
||||
if opts.PosterID > 0 {
|
||||
sess.And("issue.poster_id=?", opts.PosterID)
|
||||
}
|
||||
|
||||
return sess
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user