From 4e8a5ff9686768421210f806202e7353d568c482 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Tue, 26 May 2026 18:19:48 +0200 Subject: [PATCH] fix(renovate): use find to locate pr-cache.js before patching The file is not at the assumed path; use find to locate it first. Co-Authored-By: Claude Sonnet 4.6 --- ci/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/main.go b/ci/main.go index 3c90532..652e762 100644 --- a/ci/main.go +++ b/ci/main.go @@ -847,8 +847,8 @@ 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 = `sed -i 's/limit: this\.items\.length ? 20 : 100/limit: this.items.length ? 10 : 10/' \ - /usr/local/renovate/lib/modules/platform/gitea/pr-cache.js` + const patchCmd = `f=$(find / -path '*/platform/gitea/pr-cache.js' 2>/dev/null | head -1); \ + [ -n "$f" ] && sed -i 's/limit: this\.items\.length ? 20 : 100/limit: this.items.length ? 10 : 10/' "$f" && echo "patched $f" || echo "pr-cache.js not found"` return dag.Container(). From("renovate/renovate:43"). WithSecretVariable("RENOVATE_TOKEN", renovateToken).