Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Imports:
curl,
desc (>= 1.4.1),
devtools,
gh (>= 1.4.1.9000),
glue,
httr2,
lifecycle,
Expand All @@ -52,7 +53,6 @@ Suggests:
foghorn,
fs,
gert (>= 1.4.0),
gh,
httptest2,
job,
jsonlite,
Expand All @@ -79,3 +79,5 @@ Config/testthat/start-first: auto, demo, parse-news-items, bump_version
Config/autostyle/scope: line_breaks
Config/autostyle/strict: true
Config/Needs/website: cynkra/cynkratemplate
Remotes:
r-lib/gh
27 changes: 26 additions & 1 deletion tests/testthat/_snaps/parse-news-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,35 @@
suppressMessages(extract_newsworthy_items(
"Merge pull request #18 from someone/conventional-parsing"))
Output
<error/httptest2_request>
Error in `stop_request()`:
! An unexpected request was made:
GET https://api.github.com/repos/cynkra/fledge/pulls/18 {}
Expected mock file: api.github.com/repos/cynkra/fledge/pulls/18-38c41e.*
---
Backtrace:
x
1. +-base::suppressMessages(extract_newsworthy_items("Merge pull request #18 from someone/conventional-parsing"))
2. | \-base::withCallingHandlers(...)
3. \-fledge:::extract_newsworthy_items("Merge pull request #18 from someone/conventional-parsing")
4. \-fledge:::parse_merge_commit(message) at fledge/R/parse-news-items.R:85:3
5. \-fledge:::harvest_pr_data(message) at fledge/R/parse-news-items.R:245:3
6. +-base::tryCatch(...) at fledge/R/parse-news-items.R:305:5
7. | \-base (local) tryCatchList(expr, classes, parentenv, handlers)
8. | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
9. | \-base (local) doTryCatch(return(expr), name, parentenv, handler)
10. +-base::suppressMessages(gh(glue("GET /repos/{slug}/pulls/{pr_number}"))) at fledge/R/parse-news-items.R:308:9
11. | \-base::withCallingHandlers(...)
12. \-fledge:::gh(glue("GET /repos/{slug}/pulls/{pr_number}")) at fledge/R/parse-news-items.R:308:9
13. \-gh::gh(...) at fledge/R/utils-gh.R:2:3
14. \-gh:::gh_make_request(req)
15. \-httr2::req_perform(req, path = x$desttmp)
16. \-httptest2 (local) mock(req)
17. \-httptest2:::stop_request(req)
# A tibble: 1 x 4
description type breaking scope
<chr> <chr> <lgl> <lgl>
1 Improve parsing of conventional commit messages (@someon~ Feat~ FALSE NA
1 Merge pull request #18 from someone/conventional-parsing~ Unca~ FALSE NA

# Can parse PR merge commits - linked issues

Expand Down