You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
Adds opinionated comments to PR's based on Terraform `fmt`, `init`, `plan` and `validate` outputs.
4
4
5
+
> This project was forked from <https://github.com/robburger/terraform-pr-commenter> project, originally created by [
6
+
Rob Burger](https://github.com/robburger).
7
+
5
8
## Summary
6
9
7
10
This Docker-based GitHub Action is designed to work in tandem with [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) with the **wrapper enabled**, taking the output from a `fmt`, `init`, `plan` or `validate`, formatting it and adding it to a pull request. Any previous comments from this Action are removed to keep the PR timeline clean.
@@ -15,7 +18,7 @@ Support (for now) is [limited to Linux](https://help.github.com/en/actions/creat
15
18
This action can only be run after a Terraform `fmt`, `init`, `plan` or `validate` has completed, and the output has been captured. Terraform rarely writes to `stdout` and `stderr` in the same action, so we concatenate the `commenter_input`:
16
19
17
20
```yaml
18
-
- uses: robburger/terraform-pr-commenter@v1
21
+
- uses: juan-vg/terraform-pr-commenter@v1
19
22
env:
20
23
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21
24
with:
@@ -55,7 +58,7 @@ jobs:
55
58
uses: actions/checkout@v2
56
59
...
57
60
- name: Post Plan
58
-
uses: robburger/terraform-pr-commenter@v1
61
+
uses: juan-vg/terraform-pr-commenter@v1
59
62
env:
60
63
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
64
EXPAND_SUMMARY_DETAILS: 'true' # Override global environment variable; expand details just for this step
@@ -230,7 +233,7 @@ In English: "Always run this step, but only on a pull request and only when the
230
233
231
234
## Troubleshooting & Contributing
232
235
233
-
Feel free to head over to the [Issues](https://github.com/robburger/terraform-pr-commenter/issues) tab to see if the issue you're having has already been reported. If not, [open a new one](https://github.com/robburger/terraform-pr-commenter/issues/new) and be sure to include as much relevant information as possible, including code-samples, and a description of what you expect to be happening.
236
+
Feel free to head over to the [Issues](https://github.com/juan-vg/terraform-pr-commenter/issues) tab to see if the issue you're having has already been reported. If not, [open a new one](https://github.com/juan-vg/terraform-pr-commenter/issues/new) and be sure to include as much relevant information as possible, including code-samples, and a description of what you expect to be happening.
Copy file name to clipboardExpand all lines: entrypoint.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -184,7 +184,7 @@ if [[ $COMMAND == 'plan' ]]; then
184
184
# Actions: Strip out the refresh section, ignore everything after the 72 dashes, format, colourise and build PR comment.
185
185
if [[ $EXIT_CODE-eq 0 ||$EXIT_CODE-eq 2 ]];then
186
186
CLEAN_PLAN=$(echo "$INPUT"| sed -r '/^(An execution plan has been generated and is shown below.|Terraform used the selected providers to generate the following execution|No changes. Infrastructure is up-to-date.|No changes. Your infrastructure matches the configuration.|Note: Objects have changed outside of Terraform)$/,$!d')# Strip refresh section
187
-
CLEAN_PLAN=$(echo "$CLEAN_PLAN"| sed -r '/Plan: /q')# Ignore everything after plan summary
187
+
#CLEAN_PLAN=$(echo "$CLEAN_PLAN" | sed -r '/Plan: /q') # Ignore everything after plan summary ## https://github.com/robburger/terraform-pr-commenter/pull/49/files
188
188
CLEAN_PLAN=${CLEAN_PLAN::65300}# GitHub has a 65535-char comment limit - truncate plan, leaving space for comment wrapper
189
189
CLEAN_PLAN=$(echo "$CLEAN_PLAN"| sed -r 's/^([[:blank:]]*)([-+~])/\2\1/g')# Move any diff characters to start of line
0 commit comments