Allow filtering PRs by poster in the ListPullRequests API (#32209)
as title --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
parent
fa35ace9fb
commit
bdd655f2bd
3 changed files with 57 additions and 15 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue