Skip to content

Commit

Permalink
simplify query for #5
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 6, 2024
1 parent 97840af commit 21d1426
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.017
Version: 0.0.0.018
Authors@R:
person(given = "First",
family = "Last",
Expand Down
14 changes: 7 additions & 7 deletions R/editors.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@ editor_gh_data <- function () {
has_next_page <- dat$data$repository$issues$pageInfo$hasNextPage
end_cursor <- dat$data$repository$issues$pageInfo$endCursor

edges <- dat$data$repository$issues$edges
nodes <- dat$data$repository$issues$nodes

number <- c (
number,
vapply (edges, function (i) i$node$number, integer (1L))
vapply (nodes, function (i) i$number, integer (1L))
)
state <- c (
state,
vapply (edges, function (i) i$node$state, character (1L))
vapply (nodes, function (i) i$state, character (1L))
)
assignees <- c (
assignees,
lapply (edges, function (i) {
vapply (i$node$assignees$nodes, function (j) j$login, character (1L))
lapply (nodes, function (i) {
vapply (i$assignees$nodes, function (j) j$login, character (1L))
})
)
updated_at <- c (
updated_at,
vapply (edges, function (i) i$node$updatedAt, character (1L))
vapply (nodes, function (i) i$updatedAt, character (1L))
)
titles <- c (
titles,
vapply (edges, function (i) i$node$title, character (1L))
vapply (nodes, function (i) i$title, character (1L))
)

page_count <- page_count + 1L
Expand Down
24 changes: 10 additions & 14 deletions R/gh-queries.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,18 @@ gh_issue_assignees_qry <- function (org = "ropensci",
hasNextPage
endCursor
}
edges {
node {
... on Issue {
number
state
updatedAt
assignees (first: 100) {
nodes {
name
login
}
}
title
url
nodes {
number
state
updatedAt
assignees (first: 100) {
nodes {
name
login
}
}
title
url
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.017",
"version": "0.0.0.018",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit 21d1426

Please sign in to comment.