@@ -23,7 +23,7 @@ editor_gh_data <- function () {
23
23
has_next_page <- TRUE
24
24
end_cursor <- NULL
25
25
26
- number <- state <- assignees <- updated_at <- titles <- NULL
26
+ number <- state <- assignees <- updated_at <- closed_at <- titles <- NULL
27
27
28
28
page_count <- 0L
29
29
@@ -59,6 +59,13 @@ editor_gh_data <- function () {
59
59
updated_at ,
60
60
vapply (nodes , function (i ) i $ updatedAt , character (1L ))
61
61
)
62
+ # closedAt is 'null' for open issues:
63
+ closed_at <- c (
64
+ closed_at ,
65
+ vapply (nodes , function (i ) {
66
+ ifelse (is.null (i $ closedAt ), " " , i $ closedAt )
67
+ }, character (1L ))
68
+ )
62
69
titles <- c (
63
70
titles ,
64
71
vapply (nodes , function (i ) i $ title , character (1L ))
@@ -77,8 +84,13 @@ editor_gh_data <- function () {
77
84
state <- state [index ]
78
85
assignees <- assignees [index ]
79
86
updated_at <- updated_at [index ]
87
+ closed_at <- closed_at [index ]
80
88
titles <- titles [index ]
81
89
90
+ # Prefer closedAt over updatedAt for closed issues:
91
+ index <- which (nzchar (closed_at ))
92
+ updated_at [index ] <- closed_at [index ]
93
+
82
94
# Then find latest issue for each editor:
83
95
ed_index <- vapply (editors $ login , function (i ) {
84
96
index <- which (vapply (assignees , function (j ) any (j == i ), logical (1L )))
0 commit comments