diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-10-23 09:43:25 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 09:43:25 +1100 |
commit | 467775fc1ca1630ca5c1b4bdb2bc87d53c4e72c6 (patch) | |
tree | f0af2140c32532d23a84d4adcd79217ccca1bd6b /pkg/gui/branches_panel.go | |
parent | 3a23cb87b70ebb3c7c82be77a264a0b3499d76c0 (diff) | |
parent | 3b6b68a2a1541fe26b39cba676b039f72142a28b (diff) |
Merge branch 'master' into master
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r-- | pkg/gui/branches_panel.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 5c33156be..dbf4b007a 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -22,6 +22,17 @@ func (gui *Gui) handleBranchPress(g *gocui.Gui, v *gocui.View) error { return gui.refreshSidePanels(g) } +func (gui *Gui) handleCreatePullRequestPress(g *gocui.Gui, v *gocui.View) error { + branch := gui.getSelectedBranch(gui.getBranchesView(g)) + pullRequest := commands.NewPullRequest(gui.GitCommand) + + if err := pullRequest.Create(branch); err != nil { + return gui.createErrorPanel(g, err.Error()) + } + + return nil +} + func (gui *Gui) handleForceCheckout(g *gocui.Gui, v *gocui.View) error { branch := gui.getSelectedBranch(v) message := gui.Tr.SLocalize("SureForceCheckout") |