MatthewJohn / terrareg

Open source Terraform module registry with UI, optional Git integration and deep analysis
https://gitlab.dockstudios.co.uk/pub/terrareg
GNU General Public License v3.0
271 stars 23 forks source link

ADDITIONAL_MODULE_TABS Ignores RELEASE_NOTES.md #60

Closed alexusarov closed 1 month ago

alexusarov commented 2 months ago

Description: I noticed that when using the ADDITIONAL_MODULE_TABS functionality in Terrareg, the content of CHANGELOG.md is correctly displayed in the UI under the Release Notes tab as expected. However, despite RELEASE_NOTES.md being a supported file by default according to the documentation, its content is not presented in the UI. This appears to be an inconsistency in how these files are being handled by the ADDITIONAL_MODULE_TABS feature.

Steps to Reproduce: Add CHANGELOG.md and RELEASE_NOTES.md to the module folder. Observe that only the content of CHANGELOG.md is displayed in the UI.

Expected Behavior: The content of both CHANGELOG.md and RELEASE_NOTES.md should be displayed in the UI.

MatthewJohn commented 2 months ago

Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/538 gitlab-issue-id:538

MatthewJohn commented 2 months ago

Hey @alexusarov ,

This is by-design. Assuming that you aren't using a custom ADDITIONAL_MODULE_TABS config, as per the default config in https://matthewjohn.github.io/terrareg/CONFIG/#additional_module_tabs, it defines one tab "Release Notes" with two files that it will try to get the config from. It's meant to handle inconsistencies in the naming of files in repos, not to extent the content of a tab. If you wish to the markdown down from two files displayed, the only way could be to define two custom tabs, e.g.:

[["Release Notes", ["RELEASE_NOTES.md"]], ["Changelog", ["CHANGELOG.md"]], ["License", ["LICENSE"]]]

Or, would you like a way to have a single tab which does concatenate multiple files?

Matt

alexusarov commented 2 months ago

Hi @MatthewJohn, It was not clear from the documentation that this handled inconsistencies in file naming. Thanks for the two tabs solution, it works great for me!

MatthewJohn commented 1 month ago

@alexusarov Sorry for the delay - I'm going to close this and open a ticket to improve the documentation around this - does that sound okay?

Matt

MatthewJohn commented 1 month ago

Opened https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/542 to fix the docs :)

MatthewJohn commented 1 month ago

I've now merged the docs changes