Skip to content

Commit

Permalink
hotfix: enable to call Enterprise from octo buffer
Browse files Browse the repository at this point in the history
The current build uses github.com always in octo buffers, so it cannot
get candidates from GitHub Enterprise. To solve this, this fix gets the
hostname from `octo.config` module.
  • Loading branch information
delphinus authored and petertriho committed May 26, 2023
1 parent 3b58a59 commit 7b292e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cmp_git/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ M.get_git_info = function(remotes, opts)
local host, owner, repo = nil, nil, nil

if vim.bo.filetype == "octo" then
host = "github.com"
host = require("octo.config").get_config().github_hostname
local filename = vim.fn.expand("%:p:h")
owner, repo = string.match(filename, "^octo://(.+)/(.+)/.+$")
else
Expand Down

0 comments on commit 7b292e1

Please sign in to comment.