File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
scripts/dataset/publish/gitlab Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
import fsApi from 'fs' ;
2
2
import path from 'path' ;
3
- import url from 'url' ;
4
3
5
4
import config from 'config' ;
6
5
import dotenv from 'dotenv' ;
@@ -21,10 +20,10 @@ export default async function publish({
21
20
let projectId = null ;
22
21
const gitlabAPIUrl = config . get ( '@opentermsarchive/engine.dataset.apiBaseURL' ) ;
23
22
24
- const [ owner , repo ] = url
25
- . parse ( config . get ( '@opentermsarchive/engine.dataset.versionsRepositoryURLGitLab' ) )
26
- . pathname . split ( '/' )
27
- . filter ( component => component ) ;
23
+ const [ owner , repo ] = new URL ( config . get ( '@opentermsarchive/engine.dataset.versionsRepositoryURLGitLab' ) )
24
+ . pathname
25
+ . split ( '/' )
26
+ . filter ( Boolean ) ;
28
27
const commonParams = { owner, repo } ;
29
28
30
29
try {
You can’t perform that action at this time.
0 commit comments