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
major: Add support for tag-directory-separator and use-version-prefix inputs, with workflow, config, and mock/test improvements (#227)
* feat: add centralized action metadata system with proper array parsing
- Add ACTION_INPUTS mapping for all GitHub Action inputs
- Add createConfigFromInputs() function for dynamic config creation
- Implement proper array parsing that distinguishes required vs optional
- Required array inputs throw error on empty string
- Optional array inputs return empty array on empty string
- Add comprehensive type definitions for action metadata
* refactor: update config system to use centralized action metadata
- Replace manual input processing with createConfigFromInputs()
- Add comprehensive validation for tag directory separator
- Add validation for default first tag format
- Simplify config initialization using metadata-driven approach
- Update config mock to use real action metadata system
- Improve error messages with more specific validation details
* test: improve test infrastructure and input helpers
- Refactor input helpers to use centralized ACTION_INPUTS metadata
- Add getActionDefaults() to load defaults from action.yml
- Generate input type arrays dynamically from metadata
- Add getConfigKey() helper for type-safe config access
- Simplify setupTestInputs() to use action.yml defaults
- Remove hardcoded input arrays in favor of metadata-driven approach
* test: add comprehensive config validation test coverage
- Add tests for tag directory separator validation (length and character)
- Add tests for default first tag format validation
- Add tests for required vs optional array input handling
- Add tests for array parsing edge cases and deduplication
- Improve test organization with metadata-driven approach
- Achieve 100% test coverage for config.ts validation logic
* fix: resolve context test environment variable issues
- Set up required GitHub environment variables in context tests
- Fix test isolation by properly clearing context between tests
- Ensure environment variables are set before context initialization
- Resolve test failures caused by missing GitHub Action environment
* fix: correct import paths and type inconsistencies
* chore: update dependencies and action.yml defaults
* chore: update package dependencies to latest versions
* fix: remove unnecessary SSH agent forwarding and update prettier feature
* fix: update super-linter action to specific version for consistency
Fixes: https://app.aikido.dev/repositories/462873?sidebarIssue=3135661
* fix: update create-pull-request action to specific version for stability
https://app.aikido.dev/repositories/462873?sidebarIssue=3135661
* fix: update SonarQube scan action to specific commit SHA for stability
* fix: update package dependencies to latest versions for improved stability
* feat: support optional v prefix with directory separator config
- Removed deprecated action-metadata types and utility functions.
- Introduced new metadata structure for action inputs in `metadata.ts`.
- Updated configuration handling to support dynamic input mapping.
- Enhanced tag processing to accommodate various directory separators.
- Added tests for metadata input handling and error scenarios.
- Improved regex patterns for module tag validation.
- Updated action.yml to include new input parameters for tag directory separator and version prefix usage.
- Refactored TerraformModule class to utilize new configuration settings for versioning.
* fix: update rollup packages to version 4.44.0 for improved compatibility
* feat: enhance tag generation configuration with detailed descriptions and examples for directory separator and version prefix options
* fix: remove eslint directive for throwing literals in metadata tests
* chore: update dependencies
* chore: update dependencies and improve variable naming
- Updated `p-limit` from version 6.2.0 to 7.0.0 in package.json.
- Updated `@biomejs/biome` from version 1.9.4 to 2.2.0 in devDependencies.
- Updated `textlint` from version 14.8.0 to 15.2.1 in devDependencies.
- Refactored variable names in `dev-parse-modules.ts` for clarity: changed `config` to `_config`, `context` to `_context`, and `modules` to `_modules`.
- Improved backward compatibility proxy in `config.ts` and `context.ts` by renaming the target parameter to `_target` for better readability.
* fix: update @types/node to version 22.17.2 for improved compatibility
* fix: update GitHub token reference for CI testing in workflow
* refactor: simplify ACTION_INPUTS metadata definitions using factory functions
* test: enhance ACTION_INPUTS tests for metadata structure and type safety
* fix: formatting
* test: add tests for VALID_TAG_DIRECTORY_SEPARATORS, VERSION_TAG_REGEX, and MODULE_TAG_REGEX
* refactor: remove redundant SonarQube job steps from workflow
* feat: refactor render -> renderTemplate function and update wiki usage template handling
* fix: update changelog script import path in release workflow
refactor: remove redundant release content structure validation from tests
chore: update biome configuration to include all scripts
chore: add new changelog script and remove deprecated action.yml
test: add parse-modules-test script for local testing of parseTerraformModules function
feat: implement changelog generation with GitHub API integration
delete: remove unused development script for parsing modules
* fix: update documentation links and remove test comment in main.tf
Copy file name to clipboardExpand all lines: README.md
+38-33Lines changed: 38 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,25 +194,25 @@ configuring the following optional input parameters as needed.
194
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
195
| `disable-wiki` | Whether to disable wiki generation for Terraform modules | `false` |
196
196
| `wiki-sidebar-changelog-max` | An integer that specifies how many changelog entries are displayed in the sidebar per module | `5` |
197
+
| `wiki-usage-template` | A raw, multi-line string to override the default 'Usage' section in the generated wiki. Allows using variables like {{module_name}}, {{latest_tag}}, {{latest_tag_version_number}} and more.<br><sub>[Read more here](#configuring-the-wiki-usage-template)</sub> | [See action.yml](https://github.com/polleuretan/terraform-module-releaser/blob/main/action.yml#L108) |
197
198
| `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
199
| `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
200
| `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
201
| `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://[email protected]/owner/repo.git`) instead of HTTPS format (`git::https://github.com/owner/repo.git`) | `false` |
202
-
| `wiki-usage-template` | A raw, multi-line string to override the default 'Usage' section in the generated wiki. Allows using variables like {{module_name}}, {{latest_tag}}, {{latest_tag_version_number}} and more.<br><sub>[Read more here](#configuring-the-usage-template)</sub> | [See action.yml](https://github.com/polleuretan/terraform-module-releaser/blob/main/action.yml#L108) |
202
+
| `use-ssh-source-format` | If enabled, all links to source code in generated Wiki documentation will use SSH format (e.g., `git::ssh://[email protected]/owner/repo.git`) instead of HTTPS format (`git::https://github.com/owner/repo.git`) | `false` |
203
+
| `tag-directory-separator` | Character used to separate directory path components in Git tags. Supports `/`, `-`, `_`, or `.` | `/` |
204
+
| `use-version-prefix` | Whether to include the 'v' prefix on version tags (e.g., v1.2.3 vs 1.2.3) | `true` |
203
205
204
206
### Understanding the filtering options
205
207
206
208
- **`module-path-ignore`**: Completely ignores specified module paths. Any module whose path matches any pattern in this
207
209
list will not be processed at all by the action. This is useful for:
208
-
209
210
- Excluding example modules (e.g., `**/examples/**`)
| `{{module_name}}` | The name of the module. | `aws/s3-bucket` |
289
+
| `{{latest_tag}}` | The latest Git tag for the module. | `aws/s3-bucket/v1.2.3` |
290
+
| `{{latest_tag_version_number}}` | The version number of the latest tag (Always excludes any `v` prefix)| `1.2.3` |
291
+
| `{{module_source}}` | The Git source URL for the module with `git::` prefix, respecting the `use-ssh-source-format` input. | `git::ssh://github.com/techpivot/terraform-module-releaser.git` |
292
+
| `{{module_name_terraform}}` | A Terraform-safe version of the module name (e.g., special characters replaced with underscores). | `aws_s3_bucket` |
0 commit comments