Harry
Harry

Reputation: 54959

Gitlab perma-link by projectId

I would like to save only the project id of a gitlab project and link to it via that. The expectation is that the project name and namespace will change. Is there a way to link to a gitlab project via only its id and have gitlab automatically redirect to the correct url?

Upvotes: 1

Views: 126

Answers (1)

Misantorp
Misantorp

Reputation: 2821

According to this closed issue, you are now able to access a project using only project ID via https://gitlab.com/projects/:id

https://gitlab.com/projects/13083 redirects to https://gitlab.com/gitlab-org/gitlab-ce

$ curl -v 'https://gitlab.com/projects/13083'
< HTTP/1.1 302 Found
< Location: https://gitlab.com/gitlab-org/gitlab-ce

I removed a lot of the curl output, but left the interesting parts

As pointed out by VonC, this change was included in GitLab 11.8

Upvotes: 3

Related Questions