diff --git a/.github/workflows/check-url.yml b/.github/workflows/check-url.yml index bef6d669..44d54e8e 100644 --- a/.github/workflows/check-url.yml +++ b/.github/workflows/check-url.yml @@ -99,7 +99,7 @@ jobs: path: session_info.txt - name: If too many URL errors, then make an issue - if: ${{ steps.check-report.outputs.error_num >= 1 && steps.find-issue.outputs.issue_exists == ''}} + if: ${{ steps.check-report.outputs.error_num >= 1 && steps.find-issue.outputs.issue_exists == TRUE}} uses: JasonEtco/create-an-issue@v2 with: filename: .github/ISSUE_TEMPLATE/url-error.md diff --git a/scripts/find_issue.R b/scripts/find_issue.R index cf287a7e..4214162a 100644 --- a/scripts/find_issue.R +++ b/scripts/find_issue.R @@ -37,12 +37,11 @@ if (!is.character(repo)) { repo <- as.character(repo) } -# install.packages('githubr', repos='http://cran.us.r-project.org') -# devtools::install_github("fhdsl/githubr", auth_token = opt$git_pat, dependencies = TRUE) +install.packages('githubr', repos='http://cran.us.r-project.org') -# issue_titles <- githubr::get_issues(opt$repo, git_pat = opt$git_pat)$title +issue_titles <- githubr::get_issues(repo, git_pat = git_pat)$title -#issue_exists <- any(grep('Broken URLs found in the course!', issue_titles)) +issue_exists <- any(grep('Broken URLs found in the course!', issue_titles)) # Print out the result -# write(as.character(issue_exists), stdout()) +write(as.character(issue_exists), stdout())