Skip to content

Commit

Permalink
clean gh-contribs.R for #23
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Nov 20, 2024
1 parent 0d49828 commit 5999f30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
21 changes: 2 additions & 19 deletions R/cm-data-gh-contribs.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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) |>
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5999f30

Please sign in to comment.