Gitea repositories are also now extracted from description.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-04-13 21:24:11 -05:00
parent 4393c48b96
commit 626cd86175

View File

@ -0,0 +1,24 @@
Extension { #name : #MetacelloPlatform }
{ #category : #'*ExoRepo' }
MetacelloPlatform >> extractTypeFromDescription: description [
description == nil
ifTrue: [ ^ nil ].
((description beginsWith: '/') or: [ description second = $: ])
ifTrue: [ ^ 'directory' ].
(description beginsWith: 'dictionary://')
ifTrue: [ ^ 'dictionary' ].
(description beginsWith: 'filetree://')
ifTrue: [ ^ 'filetree' ].
(description beginsWith: 'tonel://')
ifTrue: [ ^ 'tonel' ].
(description beginsWith: 'github://')
ifTrue: [ ^ 'github' ].
(description beginsWith: 'gitorious://')
ifTrue: [ ^ 'gitorious' ].
(description beginsWith: 'gitea://')
ifTrue: [ ^ 'gitea' ].
(description beginsWith: 'bitbucket://')
ifTrue: [ ^ 'bitbucket' ].
^ 'http'
]