From 1d03d6c313a564aa8099ff2df7897956e5f03785 Mon Sep 17 00:00:00 2001 From: LiHaohua Date: Tue, 21 Jul 2026 22:06:40 +0800 Subject: [PATCH] fix(worker): scope submission track_url to package+version The success link used a broad `pulls?q=is:pr ` search that surfaced stale/older PRs (e.g. an old 1.0.3 PR showing up for a 1.0.4 submission). Search by exact title (`in:title `) so it points at this submission's PR. Co-authored-by: Cursor --- worker/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worker/src/index.js b/worker/src/index.js index 91d2154..bdc7b78 100644 --- a/worker/src/index.js +++ b/worker/src/index.js @@ -269,7 +269,9 @@ async function apiSubmit(request, env) { ok: true, sha256, message: "已提交,服务器正在做最终校验;通过后会自动生成发布 PR。", - track_url: `https://github.com/${env.TARGET_OWNER}/${env.TARGET_REPO}/pulls?q=is%3Apr+${pkg}`, + // Scope the link to this exact package+version title so it lands on THIS + // submission's PR, not stale/older PRs for the same package. + track_url: `https://github.com/${env.TARGET_OWNER}/${env.TARGET_REPO}/pulls?q=${encodeURIComponent(`is:pr in:title ${pkg} ${version}`)}`, actions_url: `https://github.com/${env.TARGET_OWNER}/${env.TARGET_REPO}/actions/workflows/process-web-submission.yml`, }); }