Skip to content

Commit

Permalink
draft: Wipe news column
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 22, 2024
1 parent 21d1831 commit dd2dd79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 33 deletions.
2 changes: 2 additions & 0 deletions R/fledgling.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ read_news <- function(news_lines = NULL) {
}
section_df$news <- map(section_df$news, fix_name_and_level)

section_df$news <- NA_character_

# create, update or re-use preamble
is_preamble_absent <- (section_df[["start"]][[1]] == 1)
if (is_preamble_absent) {
Expand Down
40 changes: 10 additions & 30 deletions tests/testthat/_snaps/fledgling.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"end": 8,
"h2": false,
"raw": "# fledge v2.0.0\n\n* blop\n\n* lala\n",
"news": {
"Uncategorized": ["- blop", "", "- lala"]
},
"news": "NA",
"section_state": "keep",
"title": "fledge v2.0.0",
"version": "2.0.0",
Expand All @@ -21,9 +19,7 @@
"end": 14,
"h2": false,
"raw": "# fledge v1.0.0\n\n* blip\n\n* lili\n",
"news": {
"Uncategorized": ["- blip", "", "- lili"]
},
"news": "NA",
"section_state": "keep",
"title": "fledge v1.0.0",
"version": "1.0.0",
Expand All @@ -44,9 +40,7 @@
"end": 9,
"h2": false,
"raw": "# Changes in v2.0.0\n\n* blop\n\n* lala\n\n",
"news": {
"Uncategorized": ["- blop", "", "- lala"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v2.0.0",
"version": "2.0.0",
Expand All @@ -58,9 +52,7 @@
"end": 15,
"h2": false,
"raw": "# Changes in v1.0.0\n\n* blip\n\n* lili\n",
"news": {
"Uncategorized": ["- blip", "", "- lili"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v1.0.0",
"version": "1.0.0",
Expand All @@ -81,9 +73,7 @@
"end": 8,
"h2": false,
"raw": "# Changes in v2.0.0 \"Vigorous Calisthenics\"\n\n* blop\n\n* lala\n",
"news": {
"Uncategorized": ["- blop", "", "- lala"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v2.0.0 \"Vigorous Calisthenics\"",
"version": "2.0.0",
Expand All @@ -95,9 +85,7 @@
"end": 14,
"h2": false,
"raw": "# Changes in v1.0.0 \"Pumpkin Helmet\"\n\n* blip\n\n* lili\n",
"news": {
"Uncategorized": ["- blip", "", "- lili"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v1.0.0 \"Pumpkin Helmet\"",
"version": "1.0.0",
Expand All @@ -118,9 +106,7 @@
"end": 8,
"h2": true,
"raw": "## Changes in v2.0.0 \"Vigorous Calisthenics\"\n\n* blop\n\n* lala\n",
"news": {
"Uncategorized": ["- blop", "", "- lala"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v2.0.0 \"Vigorous Calisthenics\"",
"version": "2.0.0",
Expand All @@ -132,9 +118,7 @@
"end": 14,
"h2": true,
"raw": "## Changes in v1.0.0 \"Pumpkin Helmet\"\n\n* blip\n\n* lili\n",
"news": {
"Uncategorized": ["- blip", "", "- lili"]
},
"news": "NA",
"section_state": "keep",
"title": "Changes in v1.0.0 \"Pumpkin Helmet\"",
"version": "1.0.0",
Expand All @@ -155,9 +139,7 @@
"end": 7,
"h2": false,
"raw": "fledge v2.0.0\n=============\n\n* blop\n\n* lala\n",
"news": {
"Uncategorized": ["- blop", "", "- lala"]
},
"news": "NA",
"section_state": "keep",
"title": "fledge v2.0.0",
"version": "2.0.0",
Expand All @@ -169,9 +151,7 @@
"end": 13,
"h2": false,
"raw": "# fledge v1.0.0\n\n* blip\n\n* lili\n",
"news": {
"Uncategorized": ["- blip", "", "- lili"]
},
"news": "NA",
"section_state": "keep",
"title": "fledge v1.0.0",
"version": "1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/update-news.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
raw
<chr>
1 "# tea 0.0.1 (2023-01-23)\n\n- Added a `NEWS.md` file to track changes to the~
news section_state title version date nickname
<list> <chr> <chr> <chr> <chr> <chr>
1 <named list [1]> keep tea 0.0.1 (2023-01-23) 0.0.1 (2023-~ <NA>
news section_state title version date nickname
<chr> <chr> <chr> <chr> <chr> <chr>
1 <NA> keep tea 0.0.1 (2023-01-23) 0.0.1 (2023-01-23) <NA>
$preamble_in_file
[1] TRUE
Expand Down

0 comments on commit dd2dd79

Please sign in to comment.