unjs / giget

โœจ Download templates and git repositories with pleasure!
MIT License
425 stars 37 forks source link

fix: correct gitlab repository path #141

Open sl0wik opened 6 months ago

sl0wik commented 6 months ago

๐Ÿ”— Linked issue

107

โ“ Type of change

๐Ÿ“š Description

Gitlab supports nested subgroups, like https://gitlab.com/{groupName}/{subgroupName}/{repoName}. Attempting to pull any subgroup would result in a 403 error. This pull request resolves the issue.

๐Ÿ“ Checklist

codecov[bot] commented 6 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (81c9429) 54.63% compared to head (14561ec) 54.63%.

Files Patch % Lines
src/providers.ts 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #141 +/- ## ======================================= Coverage 54.63% 54.63% ======================================= Files 7 7 Lines 615 615 Branches 47 47 ======================================= Hits 336 336 Misses 278 278 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pi0 commented 4 months ago

Hi. Sorry for delay on this. I mainly wanted to double check if both with and without subgroups it works and didn't had a chance to make a testing gitlab structure yet. If you have some it can be helpful to speedup landing this ๐Ÿ™๐Ÿผ

kovaletsyurii-hue commented 2 months ago

Hi @sl0wik . Thanks for that fix. It helps me a lot. To be compatible with the latest giget version v1.2.3 your fix need to be updated a little: url: `${gitlab2}/${parsed.repo}${parsed.subdir}/tree/${parsed.ref}`, tar: `${gitlab2}/${parsed.repo}${parsed.subdir}/-/archive/${parsed.ref}.tar.gz`,