Skip to content

Commit b10c697

Browse files
committed
Debugging.
Fixes #62811, #62267.
1 parent 3c4c663 commit b10c697

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/close-pulls.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,7 @@ jobs:
2121
${{ github.event.head_commit.message }}
2222
EOF
2323
)
24-
echo "fixed_list=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT
25-
26-
FIXES_LIST=$(echo "$COMMIT_MESSAGE" | grep -oP '(?<=Fixes )#\d+(, #\d+)*' | grep -oP '\d+')
27-
echo "fixed_list=$(echo $FIXES_LIST | tr '\n' ' ')" >> $GITHUB_OUTPUT
28-
29-
- name: Check if fixes list is empty
30-
if: ${{ steps.parse-commit.outputs.fixed_list == '' }}
31-
run: echo "No fixes found in commit message. Stopping workflow." && exit 0
24+
echo "fixed_list=$(echo \"$COMMIT_MESSAGE\" | grep -oP '(?<=Fixes )#\d+(, #\d+)*' | grep -oP '\d+' | tr '\n' ' ')" >> $GITHUB_OUTPUT
3225
3326
- name: Print fixes list for debugging
3427
if: ${{ steps.parse-commit.outputs.fixed_list != '' }}
@@ -41,11 +34,14 @@ jobs:
4134
uses: actions/github-script@v7
4235
with:
4336
script: |
44-
const fixesList = "${{ steps.parse-commit.outputs.fixed_list }}".split('\n');
37+
const fixedList = "${{ steps.parse-commit.outputs.fixed_list }}".split('\n');
38+
39+
console.debug( fixedList );
40+
4541
let relatedPRs = [];
4642
47-
for (const value of fixesList) {
48-
const query = `is:pr is:open repo:WordPress/wordpress-develop in:body https://core.trac.wordpress.org/ticket/${value}`;
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/fixedList`;
4945
const result = await github.rest.search.issuesAndPullRequests({ q: query });
5046
relatedPRs = relatedPRs.concat(result.data.items.map(pr => ({
5147
owner: 'wordpress',

0 commit comments

Comments
 (0)