Assembles the URL to the specified repository path for GitLab's web interface.
Usage
build_url(
id_project = funky::config_val("id_project"),
...,
ref = "HEAD",
force_branch_ref = FALSE,
base_url = funky::config_val("base_url"),
token = funky::config_val("token"),
max_tries = 3L
)Arguments
- id_project
integer(1)
GitLab project identifier.- ...
character()
Optional path components added to the repository base URL.- ref
character(1)
Git revision expression matching the desired Git tree object, e.g. a ref name (branch, tag, etc.), a commit identifier, or another symbolic reference like"HEAD~10". Omitted ifNULL, otherwise set as a URL parameter in the API request. Note that the GitLab API doesn't support every type of revision expression.- force_branch_ref
logical(1)
Whether or not to forcerefto be interpreted as a branch name by adding theref_type=headsURL parameter.- base_url
character(1)
Base URL to the GitLab v4 RESTful API root.- token
character(1)
GitLab access token used for authentication. IfNULL, the API request is made unauthenticated which results in HTTP 404 Not Found and other errors for non-public resources.- max_tries
integer(1)
Maximum number of request attempts in case of an HTTP error. An integerish scalar. Retries are performed using exponential backoff and jitter, seehttr2::req_retry()for details.
See also
Other common functions around GitLab's v4 RESTful API:
api_req()