From 772c8c734573c54797662173f4d2f139bc5c28ec Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 31 Mar 2025 12:21:47 +0000 Subject: Build/Test Tools: Account for `Core-{n}` ticket references. This expands the pull request cleanup action to also account for the `Core-{n}` pattern. This pattern dynamically links to Trac tickets without having to explicitly provide the ticket URL and are not detected in the current workflow logic. Props yogeshbhutkar, johnbillion. Fixes #63081. git-svn-id: https://develop.svn.wordpress.org/trunk@60110 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/reusable-cleanup-pull-requests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-cleanup-pull-requests.yml b/.github/workflows/reusable-cleanup-pull-requests.yml index 79c3566e95..796d67b63e 100644 --- a/.github/workflows/reusable-cleanup-pull-requests.yml +++ b/.github/workflows/reusable-cleanup-pull-requests.yml @@ -54,7 +54,9 @@ jobs: let prNumbers = []; for (const ticket of fixedList) { - const query = 'is:pr is:open repo:' + context.repo.owner + '/' + context.repo.repo + ' in:body https://core.trac.wordpress.org/ticket/' + ticket; + const tracTicketUrl = `https://core.trac.wordpress.org/ticket/${ ticket }`; + const corePrefix = `Core-${ ticket }`; + const query = `is:pr is:open repo:${ context.repo.owner }/${ context.repo.repo } in:body ${ tracTicketUrl } OR ${ corePrefix }`; const result = await github.rest.search.issuesAndPullRequests({ q: query }); prNumbers = prNumbers.concat(result.data.items.map(pr => pr.number)); -- cgit v1.2.3