Merge pull request #25403 from smoogipoo/attempt-fix-diffcalc-quotes

Attempt to support quotes in handling of GH comment body
This commit is contained in:
Dean Herbert 2023-11-10 16:59:17 +09:00 committed by GitHub
commit 74ccb0873e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,9 +185,11 @@ jobs:
- name: Add comment environment
if: ${{ github.event_name == 'issue_comment' }}
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
# Add comment environment
echo '${{ github.event.comment.body }}' | sed -r 's/\r$//' | grep -E '^\w+=' | while read -r line; do
echo $COMMENT_BODY | sed -r 's/\r$//' | grep -E '^\w+=' | while read -r line; do
opt=$(echo ${line} | cut -d '=' -f1)
sed -i "s;^${opt}=.*$;${line};" "${{ needs.directory.outputs.GENERATOR_ENV }}"
done