gitlabr | An R client for the GitLab API | REST library
kandi X-RAY | gitlabr Summary
kandi X-RAY | gitlabr Summary
An R client for the GitLab API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gitlabr
gitlabr Key Features
gitlabr Examples and Code Snippets
library(gitlabr)
# You can verify your token works
# Sys.getenv("GITLAB_COM_TOKEN")
# connect as a fixed user to a GitLab instance for the session
set_gitlab_connection(
gitlab_url = "https://gitlab.com",
private_token = Sys.getenv("GITLAB_COM_
my_project <- 20384533 #repo.rtask",
gitlabr_options_set("gitlabr.main", "master")
gl_list_files(project = my_project)
#> # A tibble: 2 x 5
#> id name type path mode
#>
gitlab(
req = "projects",
verb = httr::POST,
name = "toto",
default_branch = "main"
)
Community Discussions
Trending Discussions on gitlabr
QUESTION
I am trying to get a file in a gitlab repository using gitlabr, an R package with convenience functions for Gitlab's API.
I am able to return that a file exists in a location, but when I try to get the file I pull an error, see below.
Can post a reprex if someone has an open gitlab repo they can refer me to for which to point the first few reference variables.
Thanks!
...ANSWER
Answered 2020-Feb-20 at 19:03I have since been able to request archive or specific files from a repository using httr
and the gitlab API directly.
See download directory from a branch using Gitlab API v4 for more information.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitlabr
R code using {gitlabr} to perform some common GitLab actions can look like this.
Create a TOKEN on your GitLab instance with scopes: api For instance on gitlab.com: https://gitlab.com/-/profile/personal_access_tokens
Store your token in .Renviron as GITLAB_COM_TOKEN with usethis::edit_r_environ() and restart your session
Set a connection to GitLab instance
Find the list of projects available to you Define a limit of pages of projects to search in with max_page, otherwise the entire GitLab.com will be downloaded here… Find all parameters available in the API for projects on this page: https://docs.gitlab.com/ee/api/projects.html For instance, we can set owned = FALSE to retrieve all projects except ours.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page