From 56147c60b5c972b5a482b33ff040ef46f72a9d6a Mon Sep 17 00:00:00 2001 From: Daniel Flook Date: Sat, 2 Aug 2025 16:33:05 +0100 Subject: [PATCH 1/2] Fix incorrect plan changed report with truncated plans --- image/src/github_pr_comment/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/src/github_pr_comment/__main__.py b/image/src/github_pr_comment/__main__.py index 865a18e7..de4be08b 100644 --- a/image/src/github_pr_comment/__main__.py +++ b/image/src/github_pr_comment/__main__.py @@ -639,7 +639,7 @@ def main() -> int: proposed_plan_path = os.path.join(os.environ['STEP_TMP_DIR'], 'proposed-plan.txt') with open(proposed_plan_path, 'w') as f: - format_type = 'diff' if comment.headers.get('plan_text_format', 'text') == 'diff' else 'text' + format_type = 'diff' if comment.headers.get('plan_text_format', 'text').startswith('diff') else 'text' _, formatted_proposed_plan = format_plan_text(proposed_plan.strip(), format_type) f.write(formatted_proposed_plan.strip()) From 360a1148921f182d5eb3dbba6b1a058ecdf0d95d Mon Sep 17 00:00:00 2001 From: Daniel Flook Date: Sat, 2 Aug 2025 16:54:44 +0100 Subject: [PATCH 2/2] :bookmark: v2.2.1 --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d104c6a2..c5d2f936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,16 @@ The actions are versioned as a suite. Some actions may have no change in behavio When using an action you can specify the version as: -- `@v2.2.0` to use an exact release +- `@v2.2.1` to use an exact release - `@v2.2` to use the latest patch release for the specific minor version - `@v2` to use the latest patch release for the specific major version +## [2.2.1] - 2025-08-02 + +### Fixed +- Fixed incorrect plan difference reporting when an apply is aborted because the plan changed, with plans that are too large for PR comments. + 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. + ## [2.2.0] - 2025-08-01 ### Added @@ -785,6 +791,7 @@ First release of the GitHub Actions: - [dflook/terraform-new-workspace](terraform-new-workspace) - [dflook/terraform-destroy-workspace](terraform-destroy-workspace) +[2.2.1]: https://github.com/dflook/terraform-github-actions/compare/v2.2.0...v2.2.1 [2.2.0]: https://github.com/dflook/terraform-github-actions/compare/v2.1.0...v2.2.0 [2.1.0]: https://github.com/dflook/terraform-github-actions/compare/v2.0.1...v2.1.0 [2.0.1]: https://github.com/dflook/terraform-github-actions/compare/v2.0.0...v2.0.1