bramhanandlingala opened a new pull request, #9004:
URL: https://github.com/apache/devlake/pull/9004
### Summary
The Bitbucket `remote-scopes` endpoint only returned the first 100
repos/workspaces — `nextPageToken` was always empty, so the UI had no way to
load more.
### Root Cause
- `listBitbucketRepos` / `listBitbucketWorkspaces` never set the `nextPage`
return value, so `nextPageToken` was always `""`.
- The `/repositories/{workspace}` call's `fields` filter also excluded
`next`, so Bitbucket wouldn't have returned it anyway.
### Changes Made
- `models/repo.go` — added a `Next` field to `WorkspaceResponse` and
`ReposResponse` to capture Bitbucket's `next` link.
- `api/remote_api.go`:
- Added `next` to the `fields` filter so Bitbucket includes it in the
response.
- Set `nextPage` whenever `resBody.Next != ""`, so the UI can request the
following page.
- `api/remote_api_test.go` — tests for both the next-page and last-page
cases.
### Does this close any open issues?
Closes #8999
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]