Skip to content

Commit 8bf05e3

Browse files
committed
add readr library
1 parent 3fafa71 commit 8bf05e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: scripts/announcements.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ library(lubridate)
2727
library(glue)
2828
library(assertr)
2929
library(yaml)
30+
library(readr)
3031

3132
# Importing and Filtering the Event Data ----------------------------------
3233

@@ -198,7 +199,7 @@ create_new_posts_with_content <- function(events) {
198199
gh_issue_number <- gh::gh("GET /repos/:owner/:repo/issues",
199200
owner = "uoftcoders",
200201
repo = "Events") %>%
201-
map_dfr(~ data_frame(by_title = .x$title, url = .x$html_url))
202+
map_dfr(~ tibble(by_title = .x$title, url = .x$html_url))
202203

203204
new_post_content <- events %>%
204205
mutate(by_title = str_c(title, " - ", day_month(date, add_name = FALSE))) %>%
@@ -219,7 +220,7 @@ create_new_posts_with_content <- function(events) {
219220

220221
# Save post content to file
221222
fs::dir_create(here::here("_posts"))
222-
map2(new_post_content, new_post_filenames, ~ write_lines(x = .x, path = .y))
223+
map2(new_post_content, new_post_filenames, ~ readr::write_lines(x = .x, path = .y))
223224
usethis:::done("Markdown posts created in _posts/ folder.")
224225
return(invisible())
225226
}

0 commit comments

Comments
 (0)