File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,10 +49,9 @@ setup_from_labeled_event() {
4949# - PR_TITLE
5050setup_from_push_event () {
5151 pull_request=" $( list_pulls | jq " .[] | select(.merge_commit_sha==\" ${GITHUB_SHA} \" )" ) "
52- echo " ${pull_request} " # debug
53- LABELS=$( echo " ${pull_request} " | jq ' .labels | .[].name' )
54- PR_NUMBER=$( echo " ${pull_request} " | jq -r .number)
55- PR_TITLE=$( echo " ${pull_request} " | jq -r .title)
52+ LABELS=$( jq ' .labels | .[].name' <<< " ${pull_request}" )
53+ PR_NUMBER=$( jq -r .number <<< " ${pull_request}" )
54+ PR_TITLE=$( jq -r .title <<< " ${pull_request}" )
5655}
5756
5857list_pulls () {
@@ -100,7 +99,7 @@ post_comment() {
10099 body_text=" $1 "
101100 endpoint=" ${GITHUB_API_URL} /repos/${GITHUB_REPOSITORY} /issues/${PR_NUMBER} /comments"
102101 # Do not quote body_text for multiline comments.
103- body=" $( echo ${body_text} | jq -ncR ' {body: input}' ) "
102+ body=" $( jq -ncR ' {body: input}' <<< ${body_text} ) "
104103 curl -H " Authorization: token ${INPUT_GITHUB_TOKEN} " -d " ${body} " " ${endpoint} "
105104}
106105
You can’t perform that action at this time.
0 commit comments