Skip to content

Link corresponding currently live docs page for changed doc files

Manuel Grabowski requested to merge mg-adddocsurl-20221020 into master

What does this MR do and why?

This would add a "(Link to current live version)" after every changed docs file line in the Dangerbot message to allow reviewers to more quickly view those pages in their currently rendered state. This is often useful to judge smaller changes against the existing bigger picture in a way that simply seeing the Markdown diff doesn't allow. Not to be confused with Review Apps that actually render the changes themselves, but take longer to deploy and are often not needed for smaller changes.

The doc_path_to_url() implementation is rather dirty – might not cover all cases very well and is probably not Ruby-ish at all. Maybe something better already exists? But I wanted to hack together a fully working prototype first, and this would probably cover most cases already.

Screenshots or screen recordings

(Screenshot was made before I changed "Link" to "Link to current live version" based on Feedback from this Slack conversation.)

image

How to set up and validate locally

Not sure if/how we can test Dangerbot modifications locally.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Manuel Grabowski

Merge request reports