From a381cfbdb85bf1460293482e37e1fb1c0ff651c5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Jul 2024 23:52:17 +0200 Subject: [PATCH] fixup! open-pr: support `msys2-runtime` PRs --- .github/workflows/open-pr.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/open-pr.yml b/.github/workflows/open-pr.yml index bfe165a..51fc2e1 100644 --- a/.github/workflows/open-pr.yml +++ b/.github/workflows/open-pr.yml @@ -155,10 +155,13 @@ jobs: else if (name === 'mingw-w64-pcre2') body = `See https://github.com/PCRE2Project/pcre2/blob/pcre2-${version}/ChangeLog for details.` const terms = 'type:issue repo:git-for-windows/git state:open author:app/github-actions label:component-update' - const { data } = await github.rest.search.issuesAndPullRequests({ - q: `"[New ${name.replace(/^mingw-w64-/, '')} version]" (${version} OR v${version}) in:title ${terms}`, - }) - if (data.total_count) body = `${body ? `${body}\n\n` : ''}This closes ${data.items[0].html_url}` + const [verb, q] = name === 'msys2-runtime' + ? ['corresponds to', `type:pr repo:git-for-windows/msys2-runtime state:open ${version}`] + : ['closes', `"[New ${name.replace(/^mingw-w64-/, '')} version]" (${version} OR v${version}) in:title ${terms}`] + } else { + const { data } = await github.rest.search.issuesAndPullRequests({ q }) + if (data.total_count) body = `${body ? `${body}\n\n` : ''}This ${verb} ${data.items[0].html_url}` + } } catch (e) { console.log(e) }