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 32
32
33
33
COMMENT=" #### \` terraform fmt\` Failed
34
34
$FMT_OUTPUT
35
+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *
35
36
"
36
37
PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
37
38
COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
Original file line number Diff line number Diff line change 28
28
COMMENT=" #### \` terraform init\` Failed
29
29
\`\`\`
30
30
$OUTPUT
31
- \`\`\` "
31
+ \`\`\`
32
+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
32
33
PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
33
34
COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
34
35
curl -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=""
53
53
if [ $SUCCESS -ne 0 ]; then
54
54
OUTPUT=$( wrap " $OUTPUT " )
55
55
COMMENT=" #### \` terraform plan\` Failed
56
- $OUTPUT "
56
+ $OUTPUT
57
+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
57
58
else
58
59
# Remove "Refreshing state..." lines by only keeping output after the
59
60
# delimiter (72 dashes) that represents the end of the refresh stage.
70
71
OUTPUT=$( wrap " $OUTPUT " )
71
72
72
73
COMMENT=" #### \` terraform plan\` Success
73
- $OUTPUT "
74
+ $OUTPUT
75
+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
74
76
fi
75
77
76
78
# Post the comment.
Original file line number Diff line number Diff line change 23
23
COMMENT=" #### \` terraform validate\` Failed
24
24
\`\`\`
25
25
$OUTPUT
26
- \`\`\` "
26
+ \`\`\`
27
+ *Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
27
28
PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
28
29
COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
29
30
curl -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