Refactor versions fetching
What does this MR do and why?
Gentle refactor of code that fetches info about Docs site versions.
Changes:
- Put
getVersions
andgetArchiveImages
in the same file. Turns out they're more frequently used together than not - Apply code review suggestions from
@oregand
on very similar code from the Archives site (MR)
We'll be utilizing these functions again soon in #1293 (closed), so I wanted to make sure they're consistent with the Archives site and easier to combine.
Screenshots, screen recordings, or links to review app
n/a
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Verify JS tests still pass: yarn test
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.