Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
a0bb61e9
Unverified
Commit
a0bb61e9
authored
1 month ago
by
Michael Kriese
Committed by
GitHub
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(bitbucket): use next url instead of custom paging (#34602)
parent
9dd1bdd1
No related branches found
Branches containing commit
Tags
19.15.5
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/util/http/bitbucket.ts
+6
-3
6 additions, 3 deletions
lib/util/http/bitbucket.ts
with
6 additions
and
3 deletions
lib/util/http/bitbucket.ts
+
6
−
3
View file @
a0bb61e9
...
@@ -31,7 +31,10 @@ export class BitbucketHttp extends HttpBase<BitbucketHttpOptions> {
...
@@ -31,7 +31,10 @@ export class BitbucketHttp extends HttpBase<BitbucketHttpOptions> {
options
:
InternalJsonUnsafeOptions
<
BitbucketHttpOptions
>
,
options
:
InternalJsonUnsafeOptions
<
BitbucketHttpOptions
>
,
):
Promise
<
HttpResponse
<
T
>>
{
):
Promise
<
HttpResponse
<
T
>>
{
const
resolvedUrl
=
this
.
resolveUrl
(
options
.
url
,
options
.
httpOptions
);
const
resolvedUrl
=
this
.
resolveUrl
(
options
.
url
,
options
.
httpOptions
);
const
opts
=
{
...
options
,
url
:
resolvedUrl
};
const
opts
:
InternalJsonUnsafeOptions
<
BitbucketHttpOptions
>
=
{
...
options
,
url
:
resolvedUrl
,
};
const
paginate
=
opts
.
httpOptions
?.
paginate
;
const
paginate
=
opts
.
httpOptions
?.
paginate
;
if
(
paginate
&&
!
hasPagelen
(
resolvedUrl
))
{
if
(
paginate
&&
!
hasPagelen
(
resolvedUrl
))
{
...
@@ -47,10 +50,10 @@ export class BitbucketHttp extends HttpBase<BitbucketHttpOptions> {
...
@@ -47,10 +50,10 @@ export class BitbucketHttp extends HttpBase<BitbucketHttpOptions> {
if
(
paginate
&&
isPagedResult
(
result
.
body
))
{
if
(
paginate
&&
isPagedResult
(
result
.
body
))
{
const
resultBody
=
result
.
body
;
const
resultBody
=
result
.
body
;
let
nextURL
=
result
.
body
.
next
;
let
nextURL
=
result
.
body
.
next
;
let
page
=
2
;
let
page
=
1
;
for
(;
nextURL
&&
page
<=
MAX_PAGES
;
page
++
)
{
for
(;
nextURL
&&
page
<=
MAX_PAGES
;
page
++
)
{
resolvedUrl
.
searchParams
.
set
(
'
page
'
,
page
.
toString
())
;
opts
.
url
=
nextURL
;
const
nextResult
=
await
super
.
requestJsonUnsafe
<
PagedResult
<
T
>>
(
const
nextResult
=
await
super
.
requestJsonUnsafe
<
PagedResult
<
T
>>
(
method
,
method
,
opts
,
opts
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment