File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -511,10 +511,12 @@ class Gitlab extends BaseScmAdapter {
511511 parents : { sha : string } [ ] ;
512512 files : CommonChange [ ] ;
513513 } > {
514+ const namespace = encodeURIComponent (
515+ `${ commitInfo . owner } /${ commitInfo . repo } ` ,
516+ ) ;
517+
514518 // get project id
515- const commitUrl = `${ this . getApiUrl ( ) } /projects/${ commitInfo . owner } %2F${
516- commitInfo . repo
517- } /repository/commits/${ commitInfo . commitHash } `;
519+ const commitUrl = `${ this . getApiUrl ( ) } /projects/${ namespace } /repository/commits/${ commitInfo . commitHash } ` ;
518520
519521 let response = await fetch ( commitUrl , {
520522 headers : this . createHeaders ( token ) ,
@@ -527,9 +529,7 @@ class Gitlab extends BaseScmAdapter {
527529 }
528530 const commitData = await response . json ( ) ;
529531
530- const diffUrl = `${ this . getApiUrl ( ) } /projects/${ commitInfo . owner } %2F${
531- commitInfo . repo
532- } /repository/commits/${ commitInfo . commitHash } /diff`;
532+ const diffUrl = `${ this . getApiUrl ( ) } /projects/${ namespace } /repository/commits/${ commitInfo . commitHash } /diff` ;
533533
534534 response = await fetch ( diffUrl , {
535535 headers : this . createHeaders ( token ) ,
You can’t perform that action at this time.
0 commit comments