chore: Only use plan summary in comment #14
3 changed files with 9 additions and 3 deletions
|
|
@ -87,11 +87,13 @@ jobs:
|
||||||
<details><summary>Show Apply</summary>
|
<details><summary>Show Apply</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
${{ steps.apply.outputs.stdout }}
|
APPLY_PLACEHOLDER
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
run: |
|
run: |
|
||||||
|
filtered_apply=$(echo "${{ steps.apply.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d')
|
||||||
|
COMMENT_BODY="${COMMENT_BODY//'APPLY_PLACEHOLDER'/$filtered_apply}"
|
||||||
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
||||||
|
|
||||||
existing_comment=$(curl -s \
|
existing_comment=$(curl -s \
|
||||||
|
|
|
||||||
|
|
@ -88,11 +88,13 @@ jobs:
|
||||||
<details><summary>Show Apply</summary>
|
<details><summary>Show Apply</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
${{ steps.apply.outputs.stdout }}
|
APPLY_PLACEHOLDER
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
run: |
|
run: |
|
||||||
|
filtered_apply=$(echo "${{ steps.apply.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d')
|
||||||
|
COMMENT_BODY="${COMMENT_BODY//'APPLY_PLACEHOLDER'/$filtered_apply}"
|
||||||
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
||||||
|
|
||||||
existing_comment=$(curl -s \
|
existing_comment=$(curl -s \
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,13 @@ jobs:
|
||||||
<details><summary>Show Plan</summary>
|
<details><summary>Show Plan</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
${{ steps.plan.outputs.stdout }}
|
PLAN_PLACEHOLDER
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
run: |
|
run: |
|
||||||
|
filtered_plan=$(echo "${{ steps.plan.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d')
|
||||||
|
COMMENT_BODY="${COMMENT_BODY//'PLAN_PLACEHOLDER'/$filtered_plan}"
|
||||||
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
|
||||||
|
|
||||||
existing_comment=$(curl -s \
|
existing_comment=$(curl -s \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue