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
refactor: implement terraform module dependency parser and enhance type system (#220)
* refactor: reorganize type system into dedicated files
- Move types from index.ts to dedicated type files for better organization
- Create common.types.ts for shared interfaces like ModuleInfo and ChangeInfo
- Create config.types.ts for configuration-related types
- Create context.types.ts for workspace context types
- Create github.types.ts for GitHub API related types
- Create wiki.types.ts for wiki-specific types
- Create node-child-process.types.ts for Node.js process types
- Update index.ts to re-export all types from dedicated files
This refactoring improves code organization and makes types easier to maintain.
* feat: add dedicated terraform module parser and enhance module class
- Add new parser.ts with comprehensive Terraform module parsing capabilities
- Implement buildModuleDependencyGraph() for tracking local module dependencies
- Add getModulesToRelease() to determine release propagation based on dependencies
- Enhance TerraformModule class with better change detection and release logic
- Add comprehensive test coverage for parser functionality
- Add test helpers for terraform module testing
- Improve module name normalization and path handling
This establishes a solid foundation for dependency-aware module releases and
better change detection across the Terraform module ecosystem.
* refactor: enhance core functionality and remove deprecated utilities
- Update main.ts to use new parser and enhanced module handling
- Improve configuration handling with better type safety
- Enhance changelog generation with dependency-aware logic
- Update pull request commenting with better module information
- Improve release and tag management with new module system
- Update terraform-docs integration to work with enhanced modules
- Enhance wiki functionality with better module organization
- Remove deprecated semver utilities in favor of built-in logic
- Add new constants and improve file utility functions
These changes integrate the new parser system throughout the codebase and
improve the overall reliability and maintainability of the action.
* test: comprehensive test suite updates and improvements
- Update changelog tests to work with new module system and dependency tracking
- Enhance main.ts tests with better coverage of module parsing and release logic
- Improve pull request tests with dependency-aware scenarios
- Update release and tag management tests for new module handling
- Enhance terraform-docs tests with improved module integration
- Significantly expand terraform-module tests with comprehensive coverage
- Update wiki tests for new module organization and dependency features
- Improve utility tests and remove deprecated semver test file
- Add better test fixtures and mocking for complex scenarios
These test updates ensure comprehensive coverage of the refactored codebase
and provide confidence in the new dependency-aware release system.
* chore: update configuration and add development tooling
- Update action.yml with new input parameters and improved documentation
- Update package.json with new development scripts and dependencies
- Enhance TypeScript configuration for better type checking
- Update .gitignore with additional patterns for development files
- Add development scripts for parsing modules and testing workflows
- Add test terraform modules (animal, zoo) for comprehensive testing scenarios
- Update package-lock.json with new dependency versions
These changes improve the development experience and provide better tooling
for testing and maintaining the terraform module release system.
* refactor: enhance version tag handling and validation in TerraformModule
* refactor: optimize logging of parsed Terraform modules in parseTerraformModules function
* refactor: make _commits property readonly to prevent unintended modifications
* refactor: improve release and tag deletion comments for clarity and consistency
* refactor: avoid mutating input by creating copies of tags and releases before sorting
* refactor: consolidate import statements for wiki-related constants
* refactor: remove commented-out code for local dependency updates in getReleaseReasons method
* refactor: introduce MODULE_TAG_REGEX for improved tag parsing in TerraformModule
* refactor: update output keys in CI workflow and README for consistency; enhance action output handling in main.ts
| `major-keywords` | Keywords in commit messages that indicate a major release | `major change,breaking change` |
190
-
| `minor-keywords` | Keywords in commit messages that indicate a minor release | `feat,feature` |
191
-
| `patch-keywords` | Keywords in commit messages that indicate a patch release | `fix,chore,docs` |
192
-
| `default-first-tag` | Specifies the default tag version | `v1.0.0` |
193
-
| `terraform-docs-version` | Specifies the terraform-docs version used to generate documentation for the wiki | `v0.19.0` |
194
-
| `delete-legacy-tags` | Specifies a boolean that determines whether tags and releases from Terraform modules that have been deleted should be automatically removed | `true` |
195
-
| `disable-wiki` | Whether to disable wiki generation for Terraform modules | `false` |
196
-
| `wiki-sidebar-changelog-max` | An integer that specifies how many changelog entries are displayed in the sidebar per module | `5` |
197
-
| `disable-branding` | Controls whether a small branding link to the action's repository is added to PR comments. Recommended to leave enabled to support OSS. | `false` |
198
-
| `module-path-ignore` | A comma-separated list of module paths to completely ignore during processing. Paths matching these patterns will not be considered for versioning, releases, or documentation generation. | `` (empty string) |
199
-
| `module-change-exclude-patterns` | A comma-separated list of file patterns to exclude from triggering version changes in Terraform modules. Patterns follow glob syntax (e.g., `.gitignore,_.md`) and are relative to each Terraform module directory. Files matching these patterns will not affect version changes. **WARNING**: Avoid excluding '`_.tf`' files, as they are essential for module detection and versioning processes. | `.gitignore,*.md,*.tftest.hcl,tests/**` |
200
-
| `module-asset-exclude-patterns` | A comma-separated list of file patterns to exclude when bundling a Terraform module for tag/release. Patterns follow glob syntax (e.g., `tests/\*\*`) and are relative to each Terraform module directory. Files matching these patterns will be excluded from the bundled output. | `.gitignore,*.md,*.tftest.hcl,tests/**` |
201
-
| `use-ssh-source-format` | If enabled, all links to source code in generated Wiki documentation will use SSH standard format (e.g., `git::ssh://git@github.com/owner/repo.git`) instead of HTTPS format (`git::https://github.com/owner/repo.git`) | `false` |
| `major-keywords` | Keywords in commit messages that indicate a major release | `major change,breaking change` |
190
+
| `minor-keywords` | Keywords in commit messages that indicate a minor release | `feat,feature` |
191
+
| `patch-keywords` | Keywords in commit messages that indicate a patch release | `fix,chore,docs` |
192
+
| `default-first-tag` | Specifies the default tag version | `v1.0.0` |
193
+
| `terraform-docs-version` | Specifies the terraform-docs version used to generate documentation for the wiki | `v0.19.0` |
194
+
| `delete-legacy-tags` | Specifies a boolean that determines whether tags and releases from Terraform modules that have been deleted should be automatically removed | `true` |
195
+
| `disable-wiki` | Whether to disable wiki generation for Terraform modules | `false` |
196
+
| `wiki-sidebar-changelog-max` | An integer that specifies how many changelog entries are displayed in the sidebar per module | `5` |
197
+
| `disable-branding` | Controls whether a small branding link to the action's repository is added to PR comments. Recommended to leave enabled to support OSS. | `false` |
198
+
| `module-path-ignore` | Comma-separated list of module paths to completely ignore. Modules matching any pattern here are excluded from all versioning, releases, and documentation.<br><sub>[Read more here](#understanding-the-filtering-options)</sub> | `` (empty string) |
199
+
| `module-change-exclude-patterns` | Comma-separated list of file patterns (relative to each module) to exclude from triggering version changes. Lets you release a module but control which files inside it do not force a version bump.<br><sub>[Read more here](#understanding-the-filtering-options)</sub> | `.gitignore,*.md,*.tftest.hcl,tests/**` |
200
+
| `module-asset-exclude-patterns` | A comma-separated list of file patterns to exclude when bundling a Terraform module for tag/release. Patterns follow glob syntax (e.g., `tests/\*\*`) and are relative to each Terraform module directory. Files matching these patterns will be excluded from the bundled output. | `.gitignore,*.md,*.tftest.hcl,tests/**` |
201
+
| `use-ssh-source-format` | If enabled, all links to source code in generated Wiki documentation will use SSH standard format (e.g., `git::ssh://git@github.com/owner/repo.git`) instead of HTTPS format (`git::https://github.com/owner/repo.git`) | `false` |
202
202
203
203
### Understanding the filtering options
204
204
@@ -339,8 +339,8 @@ The following outputs are available from this action:
0 commit comments