You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Bitbucket] PR commits collector stops after 100 commits because the fields filter drops next #9372
Bitbucket's partial response returns only the listed fields, so the response has no top-level next. The collector pages with GetNextPageCustomData (plugins/bitbucket/tasks/api_common.go), which reads next and returns api.ErrFinishCollect when it is empty. On a full first page (pagelen=100) it always finds next empty and stops.
The other Bitbucket collectors add page,pagelen,size to their fields for the same reason; this one doesn't include next.
What do you expect to happen
All commits of a pull request are collected, following next until it is absent.
How to reproduce
Against a public repo, with pagelen=2 so a PR with 6 commits needs more than one page:
Without next in fields there is nothing to follow. In DevLake, a PR with more than 100 commits ends up with 100 rows in _raw_bitbucket_api_pull_request_commits and pull_request_commits.
Anything else
Proposed fix (I have a PR ready): add next to the fields list, and move the query into a small function so it can be unit tested.
Activity