Skip to content

Commit a5a8702

Browse files
committed
Fix parsing.
1 parent ecd7d01 commit a5a8702

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/close-pulls.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@ jobs:
1717
- name: Parse commit message
1818
id: parse-commit
1919
run: |
20-
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
21-
FIXES_LIST=$(echo "$COMMIT_MESSAGE" | grep -oP '(?<=Fixes )#\d+(, #\d+)*' | grep -oP '\d+')
22-
echo "fixes_list=$FIXES_LIST" >> $GITHUB_OUTPUT
20+
COMMIT_MESSAGE=$(cat <<'EOF' | sed -n '/^Fixes #/,/\./p'
21+
${{ github.event.head_commit.message }}
22+
EOF
23+
)
24+
echo "fixed_list=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT
2325
2426
- name: Print fixes list for debugging
2527
run: |
26-
echo "Fixes list: ${{ steps.parse-commit.outputs.fixes_list }}"
28+
echo "Fixes list: ${{ steps.parse-commit.outputs.fixed_list }}"
2729
2830
- name: Find pull requests
2931
id: pr-results
3032
uses: actions/github-script@v7
3133
with:
3234
script: |
33-
const fixesList = "${{ steps.parse-commit.outputs.fixes_list }}".split('\n');
35+
const fixesList = "${{ steps.parse-commit.outputs.fixed_list }}".split('\n');
3436
let relatedPRs = [];
3537
3638
for (const value of fixesList) {

0 commit comments

Comments
 (0)