mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-07 04:19:06 +00:00
Fix Bitbucket get pull requests that ignores pagination (#3235)
Fixes #3180
This commit is contained in:
parent
3193a12671
commit
39c1beffc5
@ -50,7 +50,7 @@ const (
|
|||||||
pathStatus = "%s/2.0/repositories/%s/%s/commit/%s/statuses/build"
|
pathStatus = "%s/2.0/repositories/%s/%s/commit/%s/statuses/build"
|
||||||
pathBranches = "%s/2.0/repositories/%s/%s/refs/branches?%s"
|
pathBranches = "%s/2.0/repositories/%s/%s/refs/branches?%s"
|
||||||
pathOrgPerms = "%s/2.0/workspaces/%s/permissions?%s"
|
pathOrgPerms = "%s/2.0/workspaces/%s/permissions?%s"
|
||||||
pathPullRequests = "%s/2.0/repositories/%s/%s/pullrequests"
|
pathPullRequests = "%s/2.0/repositories/%s/%s/pullrequests?%s"
|
||||||
pathBranchCommits = "%s/2.0/repositories/%s/%s/commits/%s"
|
pathBranchCommits = "%s/2.0/repositories/%s/%s/commits/%s"
|
||||||
pathDir = "%s/2.0/repositories/%s/%s/src/%s%s"
|
pathDir = "%s/2.0/repositories/%s/%s/src/%s%s"
|
||||||
)
|
)
|
||||||
@ -235,8 +235,8 @@ func (c *Client) GetUserWorkspaceMembership(workspace, user string) (string, err
|
|||||||
|
|
||||||
func (c *Client) ListPullRequests(owner, name string, opts *ListOpts) ([]*PullRequest, error) {
|
func (c *Client) ListPullRequests(owner, name string, opts *ListOpts) ([]*PullRequest, error) {
|
||||||
out := new(PullRequestResp)
|
out := new(PullRequestResp)
|
||||||
uri := fmt.Sprintf(pathPullRequests, c.base, owner, name)
|
uri := fmt.Sprintf(pathPullRequests, c.base, owner, name, opts.Encode())
|
||||||
_, err := c.do(uri, get, opts.Encode(), out)
|
_, err := c.do(uri, get, nil, out)
|
||||||
return out.Values, err
|
return out.Values, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user