[x] No - this PR is backwards compatible with ALL of the following feature flags in this doc
Features:
A new endpoint /v2/sites/:siteName/admin/resetRepo has been added to allow for e2e test repos to be easily reset to the specified commit.
If the repository is GGS-whitelisted, it will execute the Git commands on the local file system (git reset --hard and git push -f origin). It also checks beforehand that the commit exists, otherwise a 400 error is returned.
If the repository is not GGS-whitelisted, it will call an existing GitHub endpoint to update the repo state, which is an existing functionality used on the frontend to reset repos. GitHub automatically checks if the commit exists and will reject if it does not, but we return a 502 error as we cannot differentiate between this issue vs GitHub-related issues.
Further notes
This endpoint is located in a new admin/ folder to lay the foundations for future admin-related endpoints and hopefully we can move towards having an admin dashboard.
Problem
Part of IS-446.
Solution
Breaking Changes
Features:
/v2/sites/:siteName/admin/resetRepo
has been added to allow for e2e test repos to be easily reset to the specified commit.git reset --hard
andgit push -f origin
). It also checks beforehand that the commit exists, otherwise a 400 error is returned.Further notes
This endpoint is located in a new
admin/
folder to lay the foundations for future admin-related endpoints and hopefully we can move towards having an admin dashboard.Tests
Unit tests.
Deploy Notes
None