Search before asking
What happened
Environment:
- DevLake version: v1.0.3-beta15
- Bitbucket Cloud
- Workspace: ~1,266 repositories
Bug Description:
The /api/plugins/bitbucket/connections/:id/remote-scopes?groupId=<workspace>
endpoint only returns the first 100 repositories. The nextPageToken is empty,
so the UI shows no way to load more.
Root Cause:
The Bitbucket Cloud API returns paginated results (default pagelen=100).
The plugin appears to fetch only the first page and does not follow the
next link in the Bitbucket API response.
Evidence:
- DevLake returns exactly 100 repos (sorted by creation date, oldest first)
- Last repo returned was created 2021-10-06
- Bitbucket API confirms 1,266 total repos:
curl "https://api.bitbucket.org/2.0/repositories/<workspace>?pagelen=1&fields=size"
returns {"size": 1266}
What do you expect to happen
Expected Behavior:
The plugin should either paginate through all results from the Bitbucket API,
or pass the Bitbucket next URL back as nextPageToken so the UI can
request subsequent pages.
How to reproduce
- Deploy DevLake v1.0.3-beta15 (Helm chart or docker-compose)
- Create a Bitbucket Cloud connection with an API-Token that has
access to a workspace containing more than 100 repositories
- In the DevLake UI, go to Connections → Bitbucket → Add Data Scope
- Expand the workspace to browse repositories
- Observe that only 100 repositories are listed
- Note that nextPageToken is an empty string "", so there is no way
to request the next page
- All 100 repos are the oldest in the workspace (sorted by creation date).
Any repo created after the 100th one is inaccessible through the UI browse.
Verify actual repo count with Bitbucket API:
curl -u "user-email:api-token"
"https://api.bitbucket.org/2.0/repositories/?pagelen=1&fields=size"
Returns {"size": 1266}
Anything else
No response
Version
v1.0.3-beta15
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
Environment:
Bug Description:
The
/api/plugins/bitbucket/connections/:id/remote-scopes?groupId=<workspace>endpoint only returns the first 100 repositories. The
nextPageTokenis empty,so the UI shows no way to load more.
Root Cause:
The Bitbucket Cloud API returns paginated results (default pagelen=100).
The plugin appears to fetch only the first page and does not follow the
nextlink in the Bitbucket API response.Evidence:
curl "https://api.bitbucket.org/2.0/repositories/<workspace>?pagelen=1&fields=size"returns
{"size": 1266}What do you expect to happen
Expected Behavior:
The plugin should either paginate through all results from the Bitbucket API,
or pass the Bitbucket
nextURL back asnextPageTokenso the UI canrequest subsequent pages.
How to reproduce
access to a workspace containing more than 100 repositories
to request the next page
Any repo created after the 100th one is inaccessible through the UI browse.
Verify actual repo count with Bitbucket API:
curl -u "user-email:api-token"
"https://api.bitbucket.org/2.0/repositories/?pagelen=1&fields=size"
Returns {"size": 1266}
Anything else
No response
Version
v1.0.3-beta15
Are you willing to submit PR?
Code of Conduct