Skip to contents

Get Short GitLab Project Path

Usage

gitlab_repo(repo)

Arguments

repo

The URL of the project (in the format "namespace/project" or "https://gitlab.com/namespace/project")

Value

character string of the "namespace/project" path, or NULL if the project does not exist / is not reachable

Examples

gitlab_repo("gitlab-org/gitlab")
#> [1] "gitlab-org/gitlab"
gitlab_repo("https://gitlab.com/gitlab-org/gitlab/")
#> [1] "gitlab-org/gitlab"
gitlab_repo("https://gitlab.com/gitlab-org/gitlab.git")
#> [1] "gitlab-org/gitlab"