Skip to content

Commit

Permalink
escape ` (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix authored Aug 28, 2024
1 parent cee8328 commit 8ccd2a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gh-act
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ function parts_json {
}

function filter_envs {
# shellcheck disable=SC2016
sed -e '/^$/d' \
-e 's/<no value>/null/g' \
-e "s/\\\\'/'/g" \
Expand All @@ -201,7 +202,8 @@ function filter_envs {
-e 's/\\u003D/=/g' \
-e 's/\\u003E/>/g' \
-e 's/\\/\\\\/g' \
-e 's/\\"/\\\\\"/g'
-e 's/\\"/\\\\\"/g' \
-e 's/`/\\`/g'
}

function is_valid_user {
Expand Down Expand Up @@ -447,7 +449,7 @@ function pull_request_event_envs() {

# shellcheck disable=SC2086
BEFORE=$(gh pr view "${PULL_REQUEST_SPEC}" --json commits --jq .commits[].oid | tail -2 | head -1)
# shellcheck disable=SC2046
# shellcheck disable=SC2016,SC2046
read -r HEAD HEAD_USER <<< $(gh pr view "${PULL_REQUEST_SPEC}" --json commits \
--template '{{- $last := 0}}
{{- range $index, $element := .commits}}{{$last = $index}}{{end}}
Expand Down

0 comments on commit 8ccd2a7

Please sign in to comment.