diff --git a/R/create_issue_table.R b/R/create_issue_table.R index bc875a0..7824239 100644 --- a/R/create_issue_table.R +++ b/R/create_issue_table.R @@ -11,7 +11,7 @@ create_issue_table <- function(json_input) { sub <- json_input |> dplyr::select( "number", "title", "labels", - "milestone", "pull_request", "assignee" + "milestone", "assignee" ) issue_table <- data.frame( @@ -20,7 +20,6 @@ create_issue_table <- function(json_input) { ) k <- j <- 1 for (i in seq_len(nrow(sub))) { - if (is.null(sub[i, ]$pull_request$url[[1]])) { issue_table[k, ]$number <- sub[i, "number"][[1]] issue_table[k, ]$title <- sub[i, "title"][[1]] issue_table[k, ]$milestone <- sub[i, ]$milestone$number[[1]] @@ -31,7 +30,6 @@ create_issue_table <- function(json_input) { issue_table[k, ]$label_col <- paste(unlist(sub[i, ]$labels[[1]]$color), collapse = ", ") k <- k + 1 - } } issue_table <- issue_table[order(issue_table$milestone), ] diff --git a/R/get_issues.R b/R/get_issues.R index f7acde3..389dae6 100644 --- a/R/get_issues.R +++ b/R/get_issues.R @@ -18,7 +18,7 @@ #' repo_name = "r-lib/httr") #' } #' @export -get_issues <- function(appname_, key_, secret_, repo_name) { +get_issues <- function(appname_, key_, secret_, repo_name, type = "issues") { # Change based on what you myapp <- httr::oauth_app( @@ -35,7 +35,7 @@ get_issues <- function(appname_, key_, secret_, repo_name) { gtoken <- httr::config(token = github_token) req <- httr::GET(file.path( "https://api.github.com/repos", - repo_name, "issues" + repo_name, type ), gtoken)