From 22bac18241a9eb0ea77de12d1e9236b04c773633 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Wed, 9 Oct 2024 11:05:10 +0200 Subject: [PATCH] Add codeberg.org to known Git providers See https://github.com/r-universe-org/help/issues/507 --- R/cran.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/cran.R b/R/cran.R index d7f3e2f..afff8f0 100644 --- a/R/cran.R +++ b/R/cran.R @@ -27,7 +27,7 @@ find_git_url <- function(packages){ input <- paste(input, replace_rforge_urls(input)) #Prefer GitHub URL over r-forge guess input <- gsub('https://github.com/cran/', '', input, fixed = TRUE) # No mirror URLS here output <- rep(NA_character_, length(input)) - pattern <- 'https?://(github.com|gitlab.com|bitbucket.org)/[A-Za-z0-9_-]+/[A-Za-z0-9_.-]+' + pattern <- 'https?://(github.com|gitlab.com|bitbucket.org|codeberg.org)/[A-Za-z0-9_-]+/[A-Za-z0-9_.-]+' m <- regexpr(pattern, input, ignore.case = TRUE) rows <- !is.na(m) & m > -1 urls <- regmatches(input, m)