bug report: Username for comments do not match local repo config
Describe what happened (or what feature you want)
While writing a comment i recognized that it uses the username i have on github.com instead the one i have for the GHE instance on which the local repo is hosted.
As far as i can tell the username is derived from here:
Issue Description
bug report: Username for comments do not match local repo config
Describe what happened (or what feature you want)
While writing a comment i recognized that it uses the username i have on github.com instead the one i have for the GHE instance on which the local repo is hosted.
As far as i can tell the username is derived from here:
https://github.com/pwntester/octo.nvim/blob/master/lua/octo/gh/init.lua#L45 which takes only the first occurrence in consideration.
Describe what you expected to happen
The username for comments etc should be local to the repo, eg if a github.com repo a github.com username, on GHE repo my GHE username.
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
Ubuntu 22.04 neovim nightly
Anything else we need to know?
in https://github.com/pwntester/octo.nvim/blob/master/lua/octo/gh/init.lua#L45
gh auth status
is used to derive the username.Even if github.com is second in ~/.config/gh/hosts.yml it will appear first in the list, from which then the username is derived
gh auth status
also takes a--hostname
flag which could be used to get the username for the local repo.