Tucker McKnight <tucker.mcknight@gmail.com> | Sun Sep 14 2025
fix repo path in clone command
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)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)60 61 62 63 64 65
const repoType = reposConfig.repos[repoName]._type
reposObject[repoName] = {
branches: repoTuple[1],
cloneUrl: repoHelpers[repoType].cloneUrl(reposConfig.baseUrl, repoName)
}
}
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)
}
}
0 1 2 3
export default {
cloneUrl: (baseUrl: string, repoName: string) => {
return `${baseUrl}/repos/${repoName.toLowerCase().replaceAll(" ", "-")}/branches/`
}
}0 1 2 3
export default {
cloneUrl: (baseUrl: string, repoName: string) => {
return `${baseUrl}/${repoName.toLowerCase().replaceAll(" ", "-")}/branches/`
}
}0 1 2 3
export default {
cloneUrl: (baseUrl: string, repoName: string) => {
return `${baseUrl}/repos/${repoName.toLowerCase().replaceAll(" ", "-")}.git`
}
}0 1 2 3
export default {
cloneUrl: (baseUrl: string, repoName: string) => {
return `${baseUrl}/${repoName.toLowerCase().replaceAll(" ", "-")}.git`
}
}