Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Allow custom git domains #80

Closed
koshilki opened this issue Jan 3, 2019 · 1 comment
Closed

Allow custom git domains #80

koshilki opened this issue Jan 3, 2019 · 1 comment

Comments

@koshilki
Copy link
Contributor

koshilki commented Jan 3, 2019

I store my codebase on self-hosted git server, which results in missing code link in README.md.
The reason for it is this code:

private repo(plugin: Config.IPlugin): string | undefined {
const pjson = {...plugin.pjson}
normalize(pjson)
let repo = pjson.repository && pjson.repository.url
if (!repo) return
let url = new URL(repo)
if (!['github.com', 'gitlab.com'].includes(url.hostname)) return
return `https://${url.hostname}${url.pathname.replace(/\.git$/, '')}`
}

What is the intention of this check?

if (!['github.com', 'gitlab.com'].includes(url.hostname)) return 
@aggmoulik
Copy link

I think this issue needed to be closed..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants