Skip to content

Commit

Permalink
feat: Better entry if PR info could not be extracted
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 11, 2024
1 parent 23799e6 commit 7c54e41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion R/parse-news-items.R
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ harvest_pr_data <- function(message) {
)

tibble::tibble(
title = pr_info$title %||% NA_character_,
# FIXME: Better default message without PR info
# if the message is already in Conventional Commit format
title = pr_info$title %||% paste0("- ", message),
pr_number = pr_number,
issue_numbers = list(issue_numbers),
external_ctb = external_ctb,
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/parse-news-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# A tibble: 1 x 4
description type breaking scope
<chr> <chr> <lgl> <lgl>
1 PLACEHOLDER https://github.com/cynkra/fledge/pull/332 (#~ Unca~ FALSE NA
1 Merge pull request #332 from cynkra/conventional-parsing~ Unca~ FALSE NA

# Can parse PR merge commits - PAT absence

Expand All @@ -92,7 +92,7 @@

[
{
"title": "NA",
"title": "- Merge pull request #332 from cynkra/conventional-parsing",
"pr_number": "332",
"issue_numbers": "",
"external_ctb": "NA"
Expand Down

0 comments on commit 7c54e41

Please sign in to comment.