PaloAltoNetworks / automation-metadata-collector

Gathers information from PANW automation GitHub repos to build documentation for pan.dev
MIT License
0 stars 2 forks source link

External Links for Modules Do Not Work #9

Closed jamesholland-uk closed 11 months ago

jamesholland-uk commented 11 months ago

Describe the bug

Links to external reference sites (GitHub, Terraform Registry) do not work

Expected behavior

Links to external reference sites should work

Current behavior

Links to external reference sites do not work

Possible solution

Links have examples in the URL when they should have modules

Steps to reproduce

Use GitHub and Terraform Registry links on https://pan.dev/terraform/docs/swfw/azure/vmseries/modules/panorama (and any other module)

jamesholland-uk commented 11 months ago

These lines have examples hardcoded: https://github.com/PaloAltoNetworks/automation-metadata-collector/blob/a7c88cc6819797ea70da6632cfbe99cb0740c316/process_modules_readmes.py#L355 https://github.com/PaloAltoNetworks/automation-metadata-collector/blob/a7c88cc6819797ea70da6632cfbe99cb0740c316/process_modules_readmes.py#L359

There needs to be conditional logic to choose the correct path element (examples or modules) based on module_type, which will need to be an extra parameter to the insert_external_links function called here