Skip to content

Commit

Permalink
Let's try this
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Feb 29, 2024
1 parent dc6c371 commit b85042a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/find_issue.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ option_list <- list(
)
)

# Print out the result
write(unlist(sessionInfo()), "session_info.txt")

# Read the arguments passed
opt_parser <- optparse::OptionParser(option_list = option_list)
opt <- optparse::parse_args(opt_parser)
Expand All @@ -37,9 +34,11 @@ if (!is.character(repo)) {
repo <- as.character(repo)
}

install.packages('githubr', repos='http://cran.us.r-project.org')
install.packages('gh', repos='http://cran.us.r-project.org')

issue_titles <- githubr::get_issues(repo, git_pat = git_pat)$title
my_issues <- gh::gh("GET https://api.github.com/repos/{repo}/issues", repo = repo_name, .token = git_pat, per_page = "max")
my_issues <- unlist(my_issues)
issue_titles <- my_issues[which(names(my_issues) == "title")]

issue_exists <- any(grep('Broken URLs found in the course!', issue_titles))

Expand Down

0 comments on commit b85042a

Please sign in to comment.