File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
lua/telescope/_extensions Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,29 @@ A.gh_web_view = function(type)
115115 end
116116end
117117
118+ A .gh_develop = function ()
119+ return function (prompt_bufnr )
120+ local selection = action_state .get_selected_entry ()
121+ actions .close (prompt_bufnr )
122+ local tmp_table = vim .split (selection .value , " \t " )
123+ if vim .tbl_isempty (tmp_table ) then
124+ return
125+ end
126+ local id = tmp_table [1 ]
127+ -- We can't use os.execute here because it takes a bit
128+ vim .fn .jobstart (
129+ " echo \" Creating a new branch ...\" && gh issue develop " .. id .. " --checkout && echo \" Done!\" " ,
130+ {
131+ on_stdout = function (_channel_id , data , _name )
132+ if data [1 ] ~= " " then
133+ print (data [1 ])
134+ end
135+ end
136+ }
137+ )
138+ end
139+ end
140+
118141A .gh_gist_append = function (prompt_bufnr )
119142 local selection = action_state .get_selected_entry ()
120143 actions .close (prompt_bufnr )
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ B.gh_issues = function(opts)
111111 actions .select_default :replace (gh_a .gh_issue_insert )
112112 map (" i" , " <c-t>" , gh_a .gh_web_view " issue" )
113113 map (" i" , " <c-l>" , gh_a .gh_issue_insert_markdown_link )
114+ map (" i" , " <c-z>" , gh_a .gh_develop " issue" )
114115 return true
115116 end ,
116117 }):find ()
You can’t perform that action at this time.
0 commit comments