Skip to content

Commit a381cfb

Browse files
committed
fixup! open-pr: support msys2-runtime PRs
1 parent 90c2a11 commit a381cfb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/open-pr.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@ jobs:
155155
else if (name === 'mingw-w64-pcre2') body = `See https://github.com/PCRE2Project/pcre2/blob/pcre2-${version}/ChangeLog for details.`
156156
157157
const terms = 'type:issue repo:git-for-windows/git state:open author:app/github-actions label:component-update'
158-
const { data } = await github.rest.search.issuesAndPullRequests({
159-
q: `"[New ${name.replace(/^mingw-w64-/, '')} version]" (${version} OR v${version}) in:title ${terms}`,
160-
})
161-
if (data.total_count) body = `${body ? `${body}\n\n` : ''}This closes ${data.items[0].html_url}`
158+
const [verb, q] = name === 'msys2-runtime'
159+
? ['corresponds to', `type:pr repo:git-for-windows/msys2-runtime state:open ${version}`]
160+
: ['closes', `"[New ${name.replace(/^mingw-w64-/, '')} version]" (${version} OR v${version}) in:title ${terms}`]
161+
} else {
162+
const { data } = await github.rest.search.issuesAndPullRequests({ q })
163+
if (data.total_count) body = `${body ? `${body}\n\n` : ''}This ${verb} ${data.items[0].html_url}`
164+
}
162165
} catch (e) {
163166
console.log(e)
164167
}

0 commit comments

Comments
 (0)