I expected pr_push() to be able to push a new pull request to a repo with no previous pr (e.g. https://github.com/maurolepore/with-no-pr). But instead I get "Error in prs[[1]]: subscript out of bounds".
The problem seems to be in pr_find(). It correctly returns character() with a new pr to a repo with some pr (e.g. https://github.com/maurolepore/with-some-pr). But errors if the new pr is to a repo with no previous pr.
# Ok
usethis:::pr_find("maurolepore", repo = "with-some-pr", pr_branch = "new")
#> character(0)
# Fails
usethis:::pr_find("maurolepore", repo = "with-no-pr", pr_branch = "new")
#> Error in prs[[1]]: subscript out of bounds
Created on 2020-01-29 by the reprex package (v0.3.0.9001)
cc' @uni-sabia
I expected
pr_push()to be able to push a new pull request to a repo with no previous pr (e.g. https://github.com/maurolepore/with-no-pr). But instead I get "Error in prs[[1]]: subscript out of bounds".The problem seems to be in
pr_find(). It correctly returnscharacter()with a new pr to a repo with some pr (e.g. https://github.com/maurolepore/with-some-pr). But errors if the new pr is to a repo with no previous pr.Created on 2020-01-29 by the reprex package (v0.3.0.9001)
cc' @uni-sabia