Bitbucket workflow maxes out at 50 drafts #7144
Labels
area: extensions/backends/bitbucket
area: ui/editorial-workflow
type: bug
code to address defects in shipped code
Describe the bug
Using Bitbucket as a backend, only 50 pull requests are loaded for Workflow. As a result, once they created more than 50 draft articles, it no longer loads them all.
The pagelen is hard coded to 50 for pull requests (and only first page loaded) here:
decap-cms/packages/decap-cms-backend-bitbucket/src/API.ts
Line 656 in 84ec574
In comparison with the Github Backend (which has 100 pull requests hard coded), we can see that Bitbucket Backend simply requests the first page of pull requests, while the Github Backend requests all pages of pull requests.
decap-cms/packages/decap-cms-backend-github/src/API.ts
Line 503 in 84ec574
Therefore, I suggest that Bitbucket's backend should be updated to use a new function like the one that Github Backend uses
this.requestAllPages
decap-cms/packages/decap-cms-backend-github/src/API.ts
Line 338 in 84ec574
Should it look similar to listAllFiles?
decap-cms/packages/decap-cms-backend-bitbucket/src/API.ts
Line 408 in 84ec574
To Reproduce
Steps to reproduce the behavior. For example:
Expected behavior
Match other environments, which load all pages of pull requests, not simply the first one.
Screenshots
Inspecting the network requests, I can see that pagelen=50 is hard coded, and only one page is loaded. (Note that the screenshot is from #7025, completely different image but the relevant thing is that pagelen=50)
Applicable Versions:
CMS configuration
The text was updated successfully, but these errors were encountered: