File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 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',
You can’t perform that action at this time.
0 commit comments