diff --git a/DESCRIPTION b/DESCRIPTION index 52b1d85..400fce7 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: repometrics Title: Metrics for Your Code Repository -Version: 0.1.1.036 +Version: 0.1.1.037 Authors@R: person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/R/cm-data-gh-contribs.R b/R/cm-data-gh-contribs.R index 7dd8b47..dc95937 100644 --- a/R/cm-data-gh-contribs.R +++ b/R/cm-data-gh-contribs.R @@ -1,11 +1,3 @@ -cm_data_gh_contributors <- function (path) { - - log <- cm_data_gitlog (path) - gh_url <- pkg_gh_url_from_path (path) - - -} - contribs_from_log <- function (log) { gh_handle <- unique (log$aut_name) @@ -39,18 +31,9 @@ contribs_from_gh_api <- function (path, n_per_page = 100) { is_test_env <- Sys.getenv ("REPOMETRICS_TESTS") == "true" - gh_url <- pkg_gh_url_from_path (path) - if (is.null (gh_url)) { - return (NULL) - } - - org_repo <- gsub ("https://github.com/", "", gh_url, fixed = TRUE) - if (!grepl ("\\/$", org_repo)) { - org_repo <- paste0 (org_repo, "/") - } - + or <- org_repo_from_path (path) u_base <- "https://api.github.com/repos/" - u_org_repo <- paste0 (u_base, org_repo) + u_org_repo <- paste0 (u_base, or [1], "/", or [2]) u_endpoint <- paste0 (u_org_repo, "contributors") req <- httr2::request (u_endpoint) |> diff --git a/codemeta.json b/codemeta.json index ff497e3..3c38bab 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/ropensci-review-tools/repometrics", "issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.1.1.036", + "version": "0.1.1.037", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",