Skip to content

Commit

Permalink
change API for fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Feb 19, 2025
1 parent 706e1d1 commit 272bbbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion lua/octo/pickers/fzf-lua/pickers/assigned_labels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ local graphql = require "octo.gh.graphql"
local picker_utils = require "octo.pickers.fzf-lua.pickers.utils"
local utils = require "octo.utils"

return function(cb)
return function(opts)
opts = opts or {}
local cb = opts.cb

local bufnr = vim.api.nvim_get_current_buf()
local buffer = octo_buffers[bufnr]

Expand Down
14 changes: 7 additions & 7 deletions lua/octo/pickers/fzf-lua/pickers/labels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ local graphql = require "octo.gh.graphql"
local picker_utils = require "octo.pickers.fzf-lua.pickers.utils"
local utils = require "octo.utils"

return function(cb)
local bufnr = vim.api.nvim_get_current_buf()
local buffer = octo_buffers[bufnr]
return function(opts)
opts = opts or {}

if not buffer then
return
end
local cb = opts.cb

opts.repo = opts.repo or utils.get_remote_name()
local owner, name = utils.split_repo(opts.repo)

local query = graphql("labels_query", buffer.owner, buffer.name)
local query = graphql("labels_query", owner, name)

local get_contents = function(fzf_cb)
gh.run {
Expand Down

0 comments on commit 272bbbf

Please sign in to comment.