You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi :) Let's say we have a repository name within a directory in GitLab, such as xxx/dir/website-1#master. The regular expression you are using here is not working for this type of repository name.
We're using groups in gitlab and are experiencing the same issue. I've been able to (albeit nasty, by copying some code) to provide for our own specific use case, it may be crude but it works for now. The original idea I had was to call the provided gitlab TemplateProvider and override properties on the object where necessary, but as they are not exported I had to resort to copying it. I've also tried naming it as an other provider entirely but that didn't seem to get picked up.
/** * Handles the parsing of gitlab repo's with groups, * does not work with nested branches in return as it assumes any slash after # is going to be the sub dir * * Copied from built-in giget gitlab TemplateProvider * @see node_modules/giget/dist/index.cjs * @see node_modules/giget/dist/index.mjs * */constgroupedGitlab: TemplateProvider=async(input,options)=>{constgitlab=process.env.GIGET_GITLAB_URL||"https://gitlab.com";const[repo,refWithPath='main']=input.split('#');const[ref,subDir='/']=refWithPath.split('/');return{name: repo.replace("/","-"),version: ref,subdir: subDir,headers: {authorization: options.auth ? `Bearer ${options.auth}` : void0,// https://gitlab.com/gitlab-org/gitlab/-/commit/50c11f278d18fe1f3fb12eb595067216bb58ade2"sec-fetch-mode": "same-origin"},url: `${gitlab}/${repo}/tree/${ref}${subDir}`,tar: `${gitlab}/${repo}/-/archive/${ref}.tar.gz`};};
Hi :) Let's say we have a repository name within a directory in GitLab, such as
xxx/dir/website-1#master
. The regular expression you are using here is not working for this type of repository name.giget/src/_utils.ts
Line 49 in 83eb734
resulting:
"url": "https://git.xxx.com/xxx/dir/tree/master/website-1",
and should be
"url": "https://git.xxx.com/xxx/dir/website-1/tree/master/website-1-master.tar.bz"
The text was updated successfully, but these errors were encountered: