Skip to content

Commit

Permalink
fixup! open-pr: support msys2-runtime PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho committed Jul 8, 2024
1 parent 90c2a11 commit a381cfb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a381cfb

Please sign in to comment.