Commit graph

8 commits

Author SHA1 Message Date
Mislav Marohnić
f0e6c98bf0 Fix auto-forking scenario in pr create
When an existing `headRepo` couldn't be detected, it's time to auto-fork
one. Unfortunately, an obscure Go behavior made it seem like `headRepo`
was a non-nil value, where in fact it did contain a nil pointer which
would crash the process.

This avoids ever assigning nil pointers to `var headRepo ghrepo.Interface`.
2020-04-01 19:37:56 +02:00
Mislav Marohnić
219e3ecc5b Stop querying base branch commit hash from API
This code was put in place in preparation for a feature that never
shipped. Namely, we wanted to use the commit hash for the base branch so
we can get an accurate `git log` involving the changes in a pull
request. However, getting the commit hash from API is not the way to go
because the latest commit might not be available in the person's local
repository, and using a local tracking branch for base such as
`origin/master` works quite well in most cases without dereferencing it.
2020-03-31 13:36:48 +02:00
Mike Rogers
50e886c5f8 sequental > sequential 2020-03-07 20:44:39 +00:00
Nate Smith
3d7733870e
Merge branch 'master' into repo-fork 2020-03-03 15:40:54 -06:00
Mislav Marohnić
201217d88a Fix detecting PR for current branch pushed to fork
Now passing base repo as reference to `prSelectorForCurrentBranch()` so
that it doesn't have to (inexactly) determine the base repo itself and
risk it being different than the base repo determined during `pr
status/view`.
2020-03-02 11:35:20 +01:00
vilmibm
99ac0cb87d add StubWithFixture helper 2020-02-25 16:26:51 -06:00
vilmibm
dd57b891d3 add helper for stubbing repo resolve response 2020-02-12 08:48:04 -06:00
Mislav Marohnić
862db45587 Add mising files 2019-10-29 21:19:34 +01:00