mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Ensure we strip the repo of .git
This commit is contained in:
parent
5dec09add0
commit
9e94ca1b6c
@ -22,13 +22,21 @@ const ownerFromRepository = repository => {
|
||||
const repoUrlFromRepository = repository => {
|
||||
if (!repository) return ''
|
||||
|
||||
let repo = repository
|
||||
|
||||
if (typeof repository === 'string') {
|
||||
return repository
|
||||
repo = repository
|
||||
} else if (typeof repository === 'object' && typeof repository.url === 'string') {
|
||||
return repository.url
|
||||
repo = repository.url
|
||||
} else {
|
||||
return ''
|
||||
repo = ''
|
||||
}
|
||||
|
||||
if (repo.endsWith('.git')) {
|
||||
repo = repo.replace('.git', '')
|
||||
}
|
||||
|
||||
return repo
|
||||
}
|
||||
|
||||
const packageComparatorAscending = (left, right) => {
|
||||
|
Loading…
Reference in New Issue
Block a user