2

Using the Gitlab API I can retrieve a single project by it's path.

Once I moved a project Gitab is so nice, to redirect users accessing the old URL to new projects and tell them to change their bookmarks:

Gitlab Screenshot showing the note that an project was moved.

Unfortunately trying to access the old path via the API simply fails. Is there a way to extract the new project path if I only got the old path using the Gitlab API?

Background is that we have some tooling that extracts the projects path from the git remote host and performs some actions. After moving some projects we would like to perform some update actions using the tooling.

Kound
  • 1,835
  • 1
  • 17
  • 30
  • Based on the Gitlab documentation (https://docs.gitlab.com/ee/user/project/repository/#what-happens-when-a-repository-path-changes) it should work, without extra effort, unless the tool is not able to handle redirects. – SBI Nov 01 '22 at 13:46
  • I tested it with `curl`, the API endpoint behaves differently. It returns `{"error":"404 Not Found"}` – Kound Nov 01 '22 at 15:01

0 Answers0