summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-10-23 09:43:25 +1100
committerGitHub <noreply@github.com>2018-10-23 09:43:25 +1100
commit467775fc1ca1630ca5c1b4bdb2bc87d53c4e72c6 (patch)
treef0af2140c32532d23a84d4adcd79217ccca1bd6b /pkg/gui/branches_panel.go
parent3a23cb87b70ebb3c7c82be77a264a0b3499d76c0 (diff)
parent3b6b68a2a1541fe26b39cba676b039f72142a28b (diff)
Merge branch 'master' into master
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go11
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")