From 55907d9acb0e0c34de5066a93f8635ca2bec5852 Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 20 Mar 2024 15:29:40 +0100 Subject: [PATCH] fix editors list to include members from ed-stats only --- DESCRIPTION | 2 +- R/editors.R | 6 ++---- codemeta.json | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 28e7f87..0b20f98 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dashboard Title: What the Package Does (One Line, Title Case) -Version: 0.0.11.003 +Version: 0.1.0 Authors@R: person(given = "First", family = "Last", diff --git a/R/editors.R b/R/editors.R index 1069df9..1b49f70 100644 --- a/R/editors.R +++ b/R/editors.R @@ -7,24 +7,22 @@ editor_gh_data <- function (quiet = FALSE) { q <- gh_editors_team_qry (stats = FALSE) - stopifnot (nchar (q) == 267L) editors <- gh::gh_gql (query = q) editors <- editors$data$organization$team$members$nodes - stopifnot (length (editors) > 0L) editors <- vapply (editors, function (i) i$login, character (1L)) - stopifnot (length (editors) > 0L) q <- gh_editors_team_qry (stats = TRUE) editors_stats <- gh::gh_gql (query = q) editors_stats <- editors_stats$data$organization$team$members$nodes editors_stats <- vapply (editors_stats, function (i) i$login, character (1L)) - stopifnot (length (editors_stats) > 0L) editors <- data.frame ( login = editors, stats = editors %in% editors_stats ) + editors_stats <- editors_stats [which (!editors_stats %in% editors$login)] + editors <- rbind (editors, data.frame (login = editors_stats, stats = TRUE)) has_next_page <- TRUE end_cursor <- NULL diff --git a/codemeta.json b/codemeta.json index 732a8aa..324e59b 100644 --- a/codemeta.json +++ b/codemeta.json @@ -6,7 +6,7 @@ "name": "dashboard: What the Package Does (One Line, Title Case)", "codeRepository": "https://github.com/ropensci-review-tools/dashboard", "license": "https://spdx.org/licenses/MIT", - "version": "0.0.11.003", + "version": "0.1.0", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",