This repository was archived by the owner on May 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3232
3333COMMENT=" #### \` terraform fmt\` Failed
3434$FMT_OUTPUT
35+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *
3536"
3637PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
3738COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
Original file line number Diff line number Diff line change 2828COMMENT=" #### \` terraform init\` Failed
2929\`\`\`
3030$OUTPUT
31- \`\`\` "
31+ \`\`\`
32+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
3233PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
3334COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
3435curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ COMMENT=""
5353if [ $SUCCESS -ne 0 ]; then
5454 OUTPUT=$( wrap " $OUTPUT " )
5555 COMMENT=" #### \` terraform plan\` Failed
56- $OUTPUT "
56+ $OUTPUT
57+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
5758else
5859 # Remove "Refreshing state..." lines by only keeping output after the
5960 # delimiter (72 dashes) that represents the end of the refresh stage.
7071 OUTPUT=$( wrap " $OUTPUT " )
7172
7273 COMMENT=" #### \` terraform plan\` Success
73- $OUTPUT "
74+ $OUTPUT
75+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
7476fi
7577
7678# Post the comment.
Original file line number Diff line number Diff line change 2323COMMENT=" #### \` terraform validate\` Failed
2424\`\`\`
2525$OUTPUT
26- \`\`\` "
26+ \`\`\`
27+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
2728PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
2829COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
2930curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
You can’t perform that action at this time.
0 commit comments