Fix review-mr script for renovate MRs
Fix review-mr script for renovate MRs
Merge requests whose source is the main repository are built with frontend/pajamas-adoption-scanner as the base for the dashboard. Renovate MRs use a fork repository as the source, so the base is different for them, making this script not serve them correctly.
This change just reads the compiled base, and serves it accordingly.
Testing
- Check out this branch locally.
- Run
bin/review-mr.sh https://gitlab.com/gitlab-renovate-forks/pajamas-adoption-scanner/-/jobs/3637292863
(a renovate MR) - Observe that the dashboard is served correctly from
localhost:3001/pajamas-adoption-scanner
(it loads and works normally). - Run
bin/review-mr.sh https://gitlab.com/gitlab-org/frontend/pajamas-adoption-scanner/-/jobs/3644508130
(a regular MR - this one, in fact) - Observe that the dashboard is served correctly from
localhost:3001/frontend/pajamas-adoption-scanner
(it loads and works normally).
Edited by Mark Florian