Guest User

Untitled

a guest
Nov 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. remotes::install_github("ropenscilabs/ghrecipes")
  2.  
  3. ghrecipes::get_issue_labels_state("ropensci", "ozunconf18")
  4.  
  5. ozunconf18_issues <- ghrecipes::get_issues_thumbs("ropensci",
  6. "ozunconf18")
  7.  
  8. View(ozunconf18_issues)
  9.  
  10. ozunconf18_issues$title[1]
  11. ozunconf18_issues$author[1]
  12. ozunconf18_issues$number[1]
  13. ozunconf18_issues$body[1]
  14.  
  15. issue_1 <-
  16. ghrecipes::get_issue_thread(owner = "ropensci",
  17. repo = "ozunconf18",
  18. issue_id = ozunconf18_issues$number[1])
  19.  
  20. library(purrr)
  21. all_issues <- map_dfr(ozunconf18_issues$number,
  22. ~ghrecipes::get_issue_thread(owner = "ropensci",
  23. repo = "ozunconf18",
  24. issue_id = .),
  25. )
  26.  
  27. View(all_issues)
  28.  
  29. # simplify the issues to the first body text
  30. library(dplyr)
  31. all_issues_first_thread <- all_issues %>%
  32. group_by(title) %>%
  33. slice(1)
  34.  
  35. # output each issue into a markdown thread
  36. issue_threads <-
  37. glue::glue("# {all_issues_first_thread$title}
  38. ### {all_issues_first_thread$author} (Issue # \\
  39. {all_issues_first_thread$issue})
  40.  
  41. {all_issues_first_thread$body}
  42.  
  43. ================================
  44. \n")
  45.  
  46. # create a directory and dump the contents of the issues into it
  47. fs::dir_create("issues")
  48. sink("issues/issue-list.md")
  49. cat(issue_threads)
  50. sink()
  51.  
  52. # next steps
  53. # upload this as a rendered google doc
  54. # manually increase the size of font, trim down issue
Add Comment
Please, Sign In to add comment