Investigate other sources for @mentions
https://github.com/suggestions?mention_suggester=1&repository=cmp-git&user_id=petertriho
Investigate if it is possible to use github's (undocumented?) suggestions api
Another good one would be users under the current org, achievable with https://api.github.com/orgs/<org>/members?per_page=100
Yet another approach would be to use gh like gh api repos/{owner}/{repo}/contributors. This would allow accessing private repos.
OK. I see my PR does not fix the problem but I still think that it is better than current solution. Somehow mentionableUsers does not even return contributors of repo to me (when I am in big org).
Still need to add suggestion above (members)
using api does not work very well with ghe hosts, you need to set GH_HOST env variable
gh repo view allows you to use also a full url for ghe hosts like
gh repo view https://<ghe host>/org/repo --json mentionableUsers which also work for github.com
edit.
gh api also allows to set --hostname which would solve this for ghe hosts
im curious why this does not to be changed:
https://github.com/petertriho/cmp-git/blob/main/lua/cmp_git/sources/github.lua#L267
the output from api is a bit different then from repo view