1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-27 22:38:09 +02:00

Add option to create pull request form branches panel.

This commit is contained in:
Kristijan Husak
2018-10-12 14:06:03 +02:00
parent d5f64602a8
commit df0e3e52fe
8 changed files with 293 additions and 0 deletions

View File

@@ -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")