Skip to content

Commit e1116d1

Browse files
committed
Make more use of environment variables.
1 parent c71d3a2 commit e1116d1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,18 @@ jobs:
2929
steps:
3030
- name: Find fixed ticket numbers
3131
id: trac-tickets
32+
env:
33+
COMMIT_MSG_RAW: ${{ github.event.head_commit.message }}
3234
run: |
33-
COMMIT_MESSAGE=$(cat <<'EOF' | sed -n '/^Fixes #/,/\./p'
34-
${{ github.event.head_commit.message }}
35-
EOF
36-
)
35+
COMMIT_MESSAGE=$(echo "$COMMIT_MSG_RAW" | sed -n '/^Fixes #/,/\./p')
3736
echo "fixed_list=$(echo \"$COMMIT_MESSAGE\" | sed -n 's/.*Fixes #\([0-9]\+\).*/\1/p' | tr '\n' ' ')" >> $GITHUB_OUTPUT
3837
3938
- name: Get the SVN revision
4039
id: git-svn-id
40+
env:
41+
COMMIT_MSG_RAW: ${{ github.event.head_commit.message }}
4142
run: |
42-
COMMIT_MESSAGE=$(cat <<'EOF' | sed -n '$p'
43-
${{ github.event.head_commit.message }}
44-
EOF
45-
)
43+
COMMIT_MESSAGE=$(echo "$COMMIT_MSG_RAW" | sed -n '$p')
4644
echo "svn_revision_number=$(echo \"$COMMIT_MESSAGE\" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> $GITHUB_OUTPUT
4745
4846
- name: Find pull requests

0 commit comments

Comments
 (0)