feat: add automated available modules table generation in README.md and related tests#89
Open
nhs-oliverslater wants to merge 5 commits into
Open
feat: add automated available modules table generation in README.md and related tests#89nhs-oliverslater wants to merge 5 commits into
nhs-oliverslater wants to merge 5 commits into
Conversation
10 tasks
7a22e43 to
49c0f61
Compare
dave4420
reviewed
Jun 23, 2026
dave4420
left a comment
Contributor
There was a problem hiding this comment.
This is as far as I got with looking at this PR before I got interrupted with meetings.
Comment on lines
+157
to
+158
| # Extract description and wraps from metadata using simple grep/sed | ||
| # This approach works without requiring yq/jq |
Contributor
There was a problem hiding this comment.
But we have yq (and jq) listed in .tool-versions, so why not use yq?
Eventually someone will try to use multiline syntax or something for one of these fields and be quite justifiably upset when it doesn't work.
| fi | ||
|
|
||
| # Write table row | ||
| printf "| \`%s\`${legacy_indicator} | %s | %s |\n" "${module_name}" "${wraps}" "${description}" >> "${temp_table}" |
Contributor
There was a problem hiding this comment.
As a matter of hygiene, we shouldn't interpolate into the format string.
Suggested change
| printf "| \`%s\`${legacy_indicator} | %s | %s |\n" "${module_name}" "${wraps}" "${description}" >> "${temp_table}" | |
| printf "| \`%s\`%s | %s | %s |\n" "${module_name}" "${legacy_indicator}" "${wraps}" "${description}" >> "${temp_table}" |
Comment on lines
+208
to
+209
| temp_readme=$(mktemp) | ||
| trap 'rm -f "${temp_table}" "${temp_modules}" "${temp_readme}"' EXIT |
Contributor
There was a problem hiding this comment.
I'm being picky, but it would be less confusing if we only set the trap once.
dave4420
reviewed
Jun 23, 2026
| printf "${green}✓${nc} Script executes successfully\n" | ||
| ((passed++)) | ||
|
|
||
| # Verify output has expected content |
Contributor
There was a problem hiding this comment.
Add test cases that the content before/after the table is still present?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This update introduces automation for generating the "Available modules" section in
README.md, ensuring it remains in sync with the actual Terraform modules. Tests for the automated generation have been included to verify functionality.Additional - for checks to pass - It also enhances the Vale configuration and adds an ACM module to the Dependabot configuration (though these also exist on other branches).
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.