forked from r-lib/usethis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* pr_push() now handles repo with no pr (r-lib#990) Fixes r-lib#990 The is the minimal fix, maybe too terse. A more expressive solution comes in a separate commit, to allow reverting it if you prefer the shorter solution. The tests will also come in a separate commit because they test the internal `pr_find()` instead of the exported `pr_push()`. You may want to revert that upcomming commit too. * Test pr_find() handles repo with no pr (r-lib#990) * New is_new_pr() (more expressive version of r-lib#990) * Simplify and record why this is needed * Move into manual tests folder * Rewrite as manual test * Update NEWS bullet * Update wordlist Co-authored-by: Jennifer (Jenny) Bryan <[email protected]>
- Loading branch information
1 parent
92b76a4
commit 1da0ecb
Showing
4 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# key property of maurolepore/with-no-pr is that there are no open PRs | ||
|
||
pkgload::unload("devtools"); devtools::load_all(); attachNamespace("devtools") | ||
|
||
# this should not error | ||
prs <- pr_find("maurolepore", repo = "with-no-pr", pr_branch = "new") | ||
|
||
# for gh >= v1.1.0 | ||
testthat::expect_equal(prs, character()) | ||
|
||
# for gh < v1.1.0 | ||
testthat::expect_equal(prs, "") |