From cf94c7c1fb9bba3118225aaec09ac44b56f3960a Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Tue, 26 May 2026 18:39:13 +0200 Subject: [PATCH] fix(renovate): patch forgejo+gitea pr-cache.js at /dist/ path Files are under dist/ not lib/, and we need to patch both forgejo and gitea platform caches since platform=forgejo is set. Co-Authored-By: Claude Sonnet 4.6 --- ci/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/main.go b/ci/main.go index a881519..b86779c 100644 --- a/ci/main.go +++ b/ci/main.go @@ -847,11 +847,11 @@ func (m *Ci) Renovate(ctx context.Context, renovateToken *dagger.Secret) (string // Codeberg's GET /pulls?state=all&limit=100 times out with a 504, but limit=10 // completes in ~9 s. Patch the compiled pr-cache.js to use 10 instead of the // hardcoded 20/100 values before launching renovate. - const patchCmd = `echo "=== finding pr-cache.js ===" && \ - find /usr/local/renovate -name "pr-cache.js" 2>/dev/null && \ - find /usr/local/renovate -name "*.js" 2>/dev/null | grep -i "gitea" | head -10 && \ - ls /usr/local/renovate/ && \ - echo "=== done ==="` + const patchCmd = `for f in \ + /usr/local/renovate/dist/modules/platform/forgejo/pr-cache.js \ + /usr/local/renovate/dist/modules/platform/gitea/pr-cache.js; do \ + sed -i 's/limit: this\.items\.length ? 20 : 100/limit: this.items.length ? 10 : 10/' "$f" && echo "patched $f"; \ + done` return dag.Container(). From("renovate/renovate:43"). WithSecretVariable("RENOVATE_TOKEN", renovateToken).