fix repo path in clone command

b823f101b8d6130536949eeff7f7f611eeafaf8a

Tucker McKnight <tucker.mcknight@gmail.com> | Sun Sep 14 2025

fix repo path in clone command
main.ts:17
Before
16
17
18


19
20
  // TODO: throw an error if reposConfiguration is undefined

  const reposData = await repos(reposConfiguration)
⁣
⁣
  const reposPath = reposConfiguration.path || "/repos"

  eleventyConfig.addGlobalData("repos", reposData)
After
16
17
18
19
20
21
22
  // TODO: throw an error if reposConfiguration is undefined

  const reposData = await repos(reposConfiguration)
  // TODO: make a better way of making this default to "/repos" so that it doesn't have to
  // be done again in src/repos.ts.
  const reposPath = reposConfiguration.path || "/repos"

  eleventyConfig.addGlobalData("repos", reposData)
src/repos.ts:61
Before
60
61
62
63
64
65
    const repoType = reposConfig.repos[repoName]._type
    reposObject[repoName] = {
      branches: repoTuple[1],
      cloneUrl: repoHelpers[repoType].cloneUrl(reposConfig.baseUrl, repoName)
    }
  }
After
60
61
62
63
64
65
    const repoType = reposConfig.repos[repoName]._type
    reposObject[repoName] = {
      branches: repoTuple[1],
      cloneUrl: repoHelpers[repoType].cloneUrl(reposConfig.baseUrl + (reposConfig.path || "/repos"), repoName)
    }
  }
src/vcses/darcs/helpers.ts:1
Before
0
1
2
3
export default {
    cloneUrl: (baseUrl: string, repoName: string) => {
        return `${baseUrl}/repos/${repoName.toLowerCase().replaceAll(" ", "-")}/branches/`
    }
}
After
0
1
2
3
export default {
    cloneUrl: (baseUrl: string, repoName: string) => {
        return `${baseUrl}/${repoName.toLowerCase().replaceAll(" ", "-")}/branches/`
    }
}
src/vcses/git/helpers.ts:1
Before
0
1
2
3
export default {
    cloneUrl: (baseUrl: string, repoName: string) => {
        return `${baseUrl}/repos/${repoName.toLowerCase().replaceAll(" ", "-")}.git`
    }
}
After
0
1
2
3
export default {
    cloneUrl: (baseUrl: string, repoName: string) => {
        return `${baseUrl}/${repoName.toLowerCase().replaceAll(" ", "-")}.git`
    }
}