Skip to content

Commit

Permalink
gh api repos/owner/repo/contributors returns better results
Browse files Browse the repository at this point in the history
  • Loading branch information
daliusd committed Feb 9, 2023
1 parent 6bcb61c commit d22d3bb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lua/cmp_git/sources/github.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ function GitHub:get_mentions(callback, git_info, trigger_char)
if git_info.host == nil or git_info.host ~= "github.com" or git_info.owner == nil or git_info.repo == nil then
return false
end
vim.pretty_print(git_info)

local config = self.config.mentions
local bufnr = vim.api.nvim_get_current_buf()
Expand All @@ -251,11 +252,8 @@ function GitHub:get_mentions(callback, git_info, trigger_char)
self.cache.mentions[bufnr] = args.items
end,
{
"repo",
"view",
string.format("%s/%s", git_info.owner, git_info.repo),
"--json",
"mentionableUsers",
"api",
string.format("repos/%s/%s/contributors", git_info.owner, git_info.repo),
},
string.format(
"https://api.github.com/repos/%s/%s/contributors?per_page=%d&page=%d",
Expand Down

0 comments on commit d22d3bb

Please sign in to comment.