Skip to content

Commit

Permalink
update to not include pull_request column
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineStawitz-NOAA committed Jan 3, 2023
1 parent c3facbf commit fc311c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions R/create_issue_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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]]
Expand All @@ -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), ]
Expand Down
4 changes: 2 additions & 2 deletions R/get_issues.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)


Expand Down

0 comments on commit fc311c0

Please sign in to comment.