Skip to content

Commit 772c8c7

Browse files
committed
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
1 parent c530101 commit 772c8c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/reusable-cleanup-pull-requests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
let prNumbers = [];
5555
5656
for (const ticket of fixedList) {
57-
const query = 'is:pr is:open repo:' + context.repo.owner + '/' + context.repo.repo + ' in:body https://core.trac.wordpress.org/ticket/' + ticket;
57+
const tracTicketUrl = `https://core.trac.wordpress.org/ticket/${ ticket }`;
58+
const corePrefix = `Core-${ ticket }`;
59+
const query = `is:pr is:open repo:${ context.repo.owner }/${ context.repo.repo } in:body ${ tracTicketUrl } OR ${ corePrefix }`;
5860
const result = await github.rest.search.issuesAndPullRequests({ q: query });
5961
6062
prNumbers = prNumbers.concat(result.data.items.map(pr => pr.number));

0 commit comments

Comments
 (0)