chore: run fmt, and lint
This commit is contained in:
parent
f660c7b2b1
commit
cec20701ae
2 changed files with 5 additions and 3 deletions
|
|
@ -3,8 +3,8 @@ local M = {}
|
|||
|
||||
function M.setup()
|
||||
-- get the current working directory and set the url
|
||||
local current_buffer = vim.fn.expand('%:p:h')
|
||||
local repo_url = vim.fn.system("git -C " ..current_buffer.. " config --get remote.origin.url" )
|
||||
local current_buffer = vim.fn.expand("%:p:h")
|
||||
local repo_url = vim.fn.system("git -C " .. current_buffer .. " config --get remote.origin.url")
|
||||
|
||||
if repo_url:len() == 0 then
|
||||
M.is_no_git_origin = true
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ function M.parse_gh_remote(url)
|
|||
local ssh = { string.find(url, ".*git@(.*)[:/]([^/]*)/([^%s/]*)") }
|
||||
|
||||
local matches = http[1] == nil and ssh or http
|
||||
if matches[1] == nil then return nil end
|
||||
if matches[1] == nil then
|
||||
return nil
|
||||
end
|
||||
|
||||
local _, _, host, user_or_org, reponame = unpack(matches)
|
||||
return { host = host, user_or_org = user_or_org, reponame = string.gsub(reponame, ".git", "") }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue