From 511428b158f69d6156f762721e3f2643b7d33b75 Mon Sep 17 00:00:00 2001
From: Mark Johnson <739719+virgofx@users.noreply.github.com>
Date: Sat, 26 Oct 2024 23:01:14 +0000
Subject: [PATCH] feat: add variable for custom wiki directory separator
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Introduces a new variable to allow users to specify a directory
separator character for generating wiki titles. This supports better
representation of module directory structures in GitHub wiki titles.
The default is set to a Unicode mathematical rising diagonal (⟋),
but users can choose from other options like '∕', '⁄', and '-'.
Updated the README to document this new feature and its usage.
Fixes #80
---
README.md | 33 +++++----
src/constants.ts | 38 +++++++++++
src/file-util.ts | 50 ++++++++++++++
src/main.ts | 9 ++-
src/wiki.ts | 172 +++++++++++++++++++++++++++++++++--------------
5 files changed, 236 insertions(+), 66 deletions(-)
diff --git a/README.md b/README.md
index 69b4096..c8c117f 100644
--- a/README.md
+++ b/README.md
@@ -8,11 +8,13 @@ documentation.
![CI](https://github.com/techpivot/terraform-module-releaser/actions/workflows/ci.yml/badge.svg?event=pull_request)
[![Lint](https://github.com/techpivot/terraform-module-releaser/actions/workflows/lint.yml/badge.svg)][3]
[![CodeQL](https://github.com/techpivot/terraform-module-releaser/actions/workflows/codeql-analysis.yml/badge.svg)][4]
+[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=techpivot_terraform-module-releaser&metric=alert_status)][5]
[1]: https://github.com/techpivot/terraform-module-releaser/releases/latest
[2]: https://github.com/marketplace/actions/terraform-module-releaser
[3]: https://github.com/techpivot/terraform-module-releaser/actions/workflows/lint.yml
[4]: https://github.com/techpivot/terraform-module-releaser/actions/workflows/codeql-analysis.yml
+[5]: https://sonarcloud.io/summary/new_code?id=techpivot_terraform-module-releaser
Simplify the management of Terraform modules in your monorepo with this **GitHub Action**, designed to automate
module-specific versioning and releases. By streamlining the Terraform module release process, this action allows you to
@@ -115,6 +117,11 @@ jobs:
uses: techpivot/terraform-module-releaser@v1
```
+This configuration provides an out-of-the-box solution that should work for most projects, as the defaults are
+reasonably configured.
+
+If you need to customize additional parameters, please refer to [Input Parameters](#input-parameters) section below.
+
## Permissions
Before executing the GitHub Actions workflow, ensure that you have the necessary permissions set for accessing pull
@@ -161,19 +168,19 @@ resources.
While the out-of-the-box defaults are suitable for most use cases, you can further customize the action's behavior by
configuring the following optional input parameters as needed.
-| Input | Description | Default |
-| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
-| `major-keywords` | Keywords in commit messages that indicate a major release | `major change,breaking change` |
-| `minor-keywords` | Keywords in commit messages that indicate a minor release | `feat,feature` |
-| `patch-keywords` | Keywords in commit messages that indicate a patch release | `fix,chore,docs` |
-| `default-first-tag` | Specifies the default tag version | `v1.0.0` |
-| `terraform-docs-version` | Specifies the terraform-docs version used to generate documentation for the wiki | `v0.19.0` |
-| `delete-legacy-tags` | Specifies a boolean that determines whether tags and releases from Terraform modules that have been deleted should be automatically removed | `true` |
-| `disable-wiki` | Whether to disable wiki generation for Terraform modules | `false` |
-| `wiki-sidebar-changelog-max` | An integer that specifies how many changelog entries are displayed in the sidebar per module | `5` |
-| `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` |
-| `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/**"` |
-| `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/**"` |
+| Input | Description | Default |
+| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
+| major-keywords
| Keywords in commit messages that indicate a major release | `major change,breaking change` |
+| `minor-keywords` | Keywords in commit messages that indicate a minor release | `feat,feature` |
+| `patch-keywords` | Keywords in commit messages that indicate a patch release | `fix,chore,docs` |
+| `default-first-tag` | Specifies the default tag version | `v1.0.0` |
+| `terraform-docs-version` | Specifies the terraform-docs version used to generate documentation for the wiki | `v0.19.0` |
+| `delete-legacy-tags` | Specifies a boolean that determines whether tags and releases from Terraform modules that have been deleted should be automatically removed | `true` |
+| `disable-wiki` | Whether to disable wiki generation for Terraform modules | `false` |
+| `wiki-sidebar-changelog-max` | An integer that specifies how many changelog entries are displayed in the sidebar per module | `5` |
+| `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` |
+| `module-change-exclude-patterns` |