fix: opening in repo with same repo branch

This commit is contained in:
Ali Almohaya 2022-09-26 23:02:31 +03:00
parent b712206961
commit 920ce61eb6
No known key found for this signature in database
GPG key ID: 4B80BC43FC6007E0

View file

@ -47,14 +47,9 @@ function M.openRepo()
end
local repo_page_url = M.repo_url
-- check if not the default branch add it to the url
local current_branch_name = utils.get_current_branch()
local default_branch_name = utils.get_defualt_branch()
if current_branch_name ~= default_branch_name then
repo_page_url = M.repo_url .. "/tree/" .. current_branch_name
end
repo_page_url = M.repo_url .. "/tree/" .. current_branch_name
local result = utils.open_url(repo_page_url)