-
Notifications
You must be signed in to change notification settings - Fork 0
Implement JSON plan parsing and text formatting (Iteration 2) #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@copilot Make sure you update the phase-1.md file with the steps you've completed. |
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements Terraform plan parsing and text formatting capabilities to display infrastructure changes. It completes Phase 1, Iteration 2 of the project roadmap by adding JSON parsing with error handling and formatted output via GitHub Actions summary.
- Parse Terraform JSON plan files and extract resource changes
- Format parsed plans into human-readable summaries with resource counts
- Display formatted summaries in GitHub Actions step summary
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Integrates parsing and formatting use cases into the main action flow |
| src/domain/usecases/ParsePlanUseCase.ts | Adds comprehensive validation and error handling for JSON plan parsing |
| src/domain/usecases/ParsePlanUseCase.test.ts | Adds tests for validation error scenarios |
| src/domain/usecases/TextFormatterUseCase.ts | Implements text formatting for Terraform plan summaries |
| src/domain/usecases/TextFormatterUseCase.test.ts | Comprehensive tests for formatting logic across all change types |
| src/domain/usecases/ITextFormatter.ts | Defines interface for text formatting use case |
| e2e/json-parsing.test.ts | End-to-end tests covering parsing and formatting with fixtures |
| package.json | Adds e2e test script for JSON parsing |
| fixtures/*.json | Test fixtures for various plan scenarios |
| features/phase-1.md | Updates iteration status to completed |
| biome.json | Excludes fixtures from linting |
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: zpratt <5916561+zpratt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
| "files": { | ||
| "ignoreUnknown": false | ||
| "ignoreUnknown": false, | ||
| "includes": ["**/*.ts", "**/*.js", "**/*.json", "!fixtures"] |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'includes' pattern with a negation (!fixtures) may not work as expected. Biome's includes/ignores work differently - the '!fixtures' negation should typically be in an 'ignore' field. Consider using 'ignore': ['fixtures/**'] in the files configuration instead, or verify that this pattern achieves the intended behavior of excluding fixtures from linting.
| "includes": ["**/*.ts", "**/*.js", "**/*.json", "!fixtures"] | |
| "includes": ["**/*.ts", "**/*.js", "**/*.json"], | |
| "ignore": ["fixtures/**"] |
Finish Iteration 2: JSON Plan Parsing & Basic Output ✅
Successfully completed all tasks for Iteration 2 as defined in phase-1.md.
Implementation Summary
Domain Layer:
PlanandResourceChangeentities with complete type definitionsIPlanParserinterface for parsing plan filesITextFormatterinterface for formatting outputParsePlanUseCasewith comprehensive error handling and validationTextFormatterUseCasewith optimized single-pass implementationInfrastructure Layer:
src/index.tswith parser and formatter@actions/core.summaryTesting:
test:e2e:json-parsingscriptQuality Assurance:
Recent Improvements:
Key Features Delivered:
Validation Evidence:
Architecture Compliance
Iteration 2 is complete and ready for production use.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.