diff options
author | Jonathan Desrosiers <desrosj@git.wordpress.org> | 2025-03-31 12:21:47 +0000 |
---|---|---|
committer | Jonathan Desrosiers <desrosj@git.wordpress.org> | 2025-03-31 12:21:47 +0000 |
commit | 772c8c734573c54797662173f4d2f139bc5c28ec (patch) | |
tree | f8d39d884edfe772bd6996589f7bc403453d8e7e | |
parent | c53010159b60735ffa6ba5fa8a416ff0e86a159c (diff) | |
download | wordpress-772c8c734573c54797662173f4d2f139bc5c28ec.tar.gz wordpress-772c8c734573c54797662173f4d2f139bc5c28ec.zip |
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
-rw-r--r-- | .github/workflows/reusable-cleanup-pull-requests.yml | 4 |
1 files changed, 3 insertions, 1 deletions
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)); |