Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket workflow maxes out at 50 drafts #7144

Open
twocs opened this issue Mar 14, 2024 · 0 comments
Open

Bitbucket workflow maxes out at 50 drafts #7144

twocs opened this issue Mar 14, 2024 · 0 comments

Comments

@twocs
Copy link

twocs commented Mar 14, 2024

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:

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.

Therefore, I suggest that Bitbucket's backend should be updated to use a new function like the one that Github Backend uses this.requestAllPages

async requestAllPages<T>(url: string, options: Options = {}) {

Should it look similar to listAllFiles?

listAllFiles = async (path: string, depth: number, branch: string) => {

To Reproduce
Steps to reproduce the behavior. For example:

  1. Create 51 drafts in Workflow for Bitbucket
  2. You can only see 50.
  3. Seems that you also can't edit number 51 (is it not in memory?)

Expected behavior
Match other environments, which load all pages of pull requests, not simply the first one.

Screenshots
image
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:

  • Decap CMS version: netlify-cms-app 2.15.72
  • Git provider: Bitbucket
  • OS: Mac Ventura 13.5.1 (22G90
  • Browser version Chrome Version 122.0.6261.112 (Official Build) (arm64)

CMS configuration

baseURL = "<base_URL>"
languageCode = "en-us"
title = "rougon"

timeZone = "UTC"

enableGitInfo = true
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = ["lastmod", ":git", "date", "publishDate"]

[module]
  [[module.mounts]]
    source = "assets"
    target = "assets"
  [[module.mounts]]
    source = "static"
    target = "static"
  [[module.mounts]]
    source = "node_modules"
    target = "assets/node_modules"
  [[module.mounts]]
    source = "assets/uploads"
    target = "static/uploads"


[server]
[[server.headers]]
  for = '/**'
  [server.headers.values]
    Access-Control-Allow-Origin = "*"

[outputs]
  page = ["html","json"]
  home = ["html","json"]
  section = ["html","json"]
  term = ["json"]

[mediaTypes."text/netlify"]
  suffixes = ["txt"]
  delimiters = ["txt"]

[outputFormats.players]
  baseName = "players"
  mediatype ="application/json"
[outputFormats.redirect]
  mediatype = "text/netlify"
  baseName = "_redirects"

[taxonomies]
  sport = "sports"
  training = "trainings"

[permalinks]
  page = "/:section/:title/"

  [deployment]
# By default, files are uploaded in an arbitrary order.
# Files that match the regular expressions in the "Order" list
# will be uploaded first, in the listed order.
order = [".jpg$", ".gif$"]

[[deployment.targets]]
# An arbitrary name for this target.
name = "deployment-target"
# The Go Cloud Development Kit URL to deploy to. Examples:
# GCS; see https://gocloud.dev/howto/blob/#gcs
URL = "<gs url>"


[[deployment.matchers]]
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true

[[deployment.matchers]]
pattern = "^.+\\.(png|jpg)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false

[[deployment.matchers]]
# Set custom content type for /sitemap.xml
pattern = "^sitemap\\.xml$"
contentType = "application/xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants