Merge pull request #3714 from cli/pr-checkout-push
Fix `pr checkout` setting up git push configuration
This commit is contained in:
commit
ebf2bb9f4b
2 changed files with 4 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ func NewCmdCheckout(f *cmdutil.Factory, runF func(*CheckoutOptions) error) *cobr
|
|||
func checkoutRun(opts *CheckoutOptions) error {
|
||||
findOptions := shared.FindOptions{
|
||||
Selector: opts.SelectorArg,
|
||||
Fields: []string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository"},
|
||||
Fields: []string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository", "maintainerCanModify"},
|
||||
}
|
||||
pr, baseRepo, err := opts.Finder.Find(findOptions)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ func TestPRCheckout_sameRepo(t *testing.T) {
|
|||
|
||||
baseRepo, pr := stubPR("OWNER/REPO", "OWNER/REPO:feature")
|
||||
finder := shared.RunCommandFinder("123", pr, baseRepo)
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository"})
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository", "maintainerCanModify"})
|
||||
|
||||
cs, cmdTeardown := run.Stub()
|
||||
defer cmdTeardown(t)
|
||||
|
|
@ -260,7 +260,7 @@ func TestPRCheckout_differentRepo_remoteExists(t *testing.T) {
|
|||
|
||||
baseRepo, pr := stubPR("OWNER/REPO", "hubot/REPO:feature")
|
||||
finder := shared.RunCommandFinder("123", pr, baseRepo)
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository"})
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository", "maintainerCanModify"})
|
||||
|
||||
cs, cmdTeardown := run.Stub()
|
||||
defer cmdTeardown(t)
|
||||
|
|
@ -283,7 +283,7 @@ func TestPRCheckout_differentRepo(t *testing.T) {
|
|||
|
||||
baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature")
|
||||
finder := shared.RunCommandFinder("123", pr, baseRepo)
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository"})
|
||||
finder.ExpectFields([]string{"number", "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository", "maintainerCanModify"})
|
||||
|
||||
cs, cmdTeardown := run.Stub()
|
||||
defer cmdTeardown(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue