Skip to content

Commit 6111533

Browse files
authored
Merge pull request #405 from dflook/diff-trunc-compare
2 parents b80e08e + 360a114 commit 6111533

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ The actions are versioned as a suite. Some actions may have no change in behavio
1111

1212
When using an action you can specify the version as:
1313

14-
- `@v2.2.0` to use an exact release
14+
- `@v2.2.1` to use an exact release
1515
- `@v2.2` to use the latest patch release for the specific minor version
1616
- `@v2` to use the latest patch release for the specific major version
1717

18+
## [2.2.1] - 2025-08-02
19+
20+
### Fixed
21+
- Fixed incorrect plan difference reporting when an apply is aborted because the plan changed, with plans that are too large for PR comments.
22+
Previously, when a plan was truncated due to size limits, the diff output would show misleading whitespace-only differences, causing confusion about what had actually changed.
23+
1824
## [2.2.0] - 2025-08-01
1925

2026
### Added
@@ -785,6 +791,7 @@ First release of the GitHub Actions:
785791
- [dflook/terraform-new-workspace](terraform-new-workspace)
786792
- [dflook/terraform-destroy-workspace](terraform-destroy-workspace)
787793

794+
[2.2.1]: https://github.com/dflook/terraform-github-actions/compare/v2.2.0...v2.2.1
788795
[2.2.0]: https://github.com/dflook/terraform-github-actions/compare/v2.1.0...v2.2.0
789796
[2.1.0]: https://github.com/dflook/terraform-github-actions/compare/v2.0.1...v2.1.0
790797
[2.0.1]: https://github.com/dflook/terraform-github-actions/compare/v2.0.0...v2.0.1

image/src/github_pr_comment/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def main() -> int:
639639

640640
proposed_plan_path = os.path.join(os.environ['STEP_TMP_DIR'], 'proposed-plan.txt')
641641
with open(proposed_plan_path, 'w') as f:
642-
format_type = 'diff' if comment.headers.get('plan_text_format', 'text') == 'diff' else 'text'
642+
format_type = 'diff' if comment.headers.get('plan_text_format', 'text').startswith('diff') else 'text'
643643
_, formatted_proposed_plan = format_plan_text(proposed_plan.strip(), format_type)
644644
f.write(formatted_proposed_plan.strip())
645645

0 commit comments

Comments
 (0)