Skip to content

Commit dc22ac7

Browse files
committed
Avoid empty values.
Fixes #62811, #62267.
1 parent 17b748b commit dc22ac7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/close-pulls.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ jobs:
3434
uses: actions/github-script@v7
3535
with:
3636
script: |
37-
const fixedList = "${{ steps.parse-commit.outputs.fixed_list }}".split(' ');
37+
const fixedList = "${{ steps.parse-commit.outputs.fixed_list }}".split(' ').filter(Boolean);
3838
3939
console.debug( fixedList );
4040
4141
let relatedPRs = [];
4242
43-
for (const value of fixedList) {
44-
const query = 'is:pr is:open repo:WordPress/wordpress-develop in:body https://core.trac.wordpress.org/ticket/' + value;
43+
for (const ticket of fixedList) {
44+
console.log( ticket );
45+
const query = 'is:pr is:open repo:WordPress/wordpress-develop in:body https://core.trac.wordpress.org/ticket/' + ticket;
4546
const result = await github.rest.search.issuesAndPullRequests({ q: query });
4647
4748
relatedPRs = relatedPRs.concat(result.data.items.map(pr => ({

0 commit comments

Comments
 (0)