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 11import fsApi from 'fs' ;
22import path from 'path' ;
3- import url from 'url' ;
43
54import config from 'config' ;
65import dotenv from 'dotenv' ;
@@ -21,10 +20,10 @@ export default async function publish({
2120 let projectId = null ;
2221 const gitlabAPIUrl = config . get ( '@opentermsarchive/engine.dataset.apiBaseURL' ) ;
2322
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 ) ;
2827 const commonParams = { owner, repo } ;
2928
3029 try {
You can’t perform that action at this time.
0 commit comments