Created
June 7, 2018 15:26
-
-
Save hrbrmstr/725342cf2bcb83a03427df3cd0e8ad53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkpub <- function(who = "hrbrmstr", prj_name) { | |
httr::PUT( | |
url = sprintf("https://gitlab.com/api/v4/projects/%s%%2F%s", who, prj_name), | |
query = list( | |
visibility = "public", | |
private_token = Sys.getenv("GITLAB_PAT") | |
) | |
) -> res | |
httr::content(res, as="parsed") | |
} | |
lsprj <- function(who = "hrbrmstr", pg = 1) { | |
httr::GET( | |
url = sprintf("https://gitlab.com/api/v4/users/%s/projects", who), | |
query = list( | |
visibility = "private", | |
private_token = Sys.getenv("GITLAB_PAT"), | |
per_page = 100, | |
page = pg | |
) | |
) -> res | |
httr::content(res, as="parsed") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment