Tucker McKnight <tmcknight@instructure.com> | Mon Feb 23 2026
[WIP] add tags to the Repository object Currently I'm just concatenating the tag results in the branchesWithHrefs object so that they show up in the branch list dropdown menu. Need to come up with something better here for showing them. Still needs code cleanup to DRY things up.
22
})22
}).concat(repo.tags.map((tag) => {
return {
name: tag.name,
href: "tbd",
date: repo.commits.get(tag.sha).date.toISOString(),
}
}))
console.log(branchesWithHrefs)78
const reposData = await repos(reposConfiguration, eleventyConfig.dir.output)78
const slugify = eleventyConfig.getFilter("slugify")
const reposData = await repos(reposConfiguration, eleventyConfig.dir.output, slugify)265
const location = getLocation(reposConfiguration, eleventyConfig.dir.output, repoName)265
const slugify = eleventyConfig.getFilter("slugify")
const location = getLocation(reposConfiguration, eleventyConfig.dir.output, repoName, slugify)135
"branches"135
"branches",
"tags"68 69
const getLocation = (reposConfig: ReposConfiguration, outputDir: string, repoName: string): string => {
return outputDir + (reposConfig.path || "") + "/" + repoName + ".git"68 69
const getLocation = (reposConfig: ReposConfiguration, outputDir: string, repoName: string, slugify: Function): string => {
return outputDir + (reposConfig.path || "") + "/" + slugify(repoName) + ".git"27
27
console.log({branches: cachedBranchNames, tags: cachedTagNames})127
127
console.log(tags)
138 139
const repos: (reposConfig: ReposConfiguration, outputDir: string) => Promise<Array<Repository>> = async (reposConfig, outputDir) => {
const repoLocation = getLocation(reposConfig, outputDir, repoName)138 139
const repos: (reposConfig: ReposConfiguration, outputDir: string, slugify: Function) => Promise<Array<Repository>> = async (reposConfig, outputDir, slugify) => {
const repoLocation = getLocation(reposConfig, outputDir, repoName, slugify)154
const repoLocation = getLocation(reposConfig, outputDir, repoName)154
const repoLocation = getLocation(reposConfig, outputDir, repoName, slugify)168
168
const tags = await Promise.all(branchesAndTags.tags.map(async (tag) => {
const repoLocation = getLocation(reposConfig, outputDir, repoName, slugify)
const tagHeadRes = await exec(`git -C ${repoLocation} show-ref refs/tags/${tag.name}`)
const tagHead = tagHeadRes.stdout.split(" ")[0]
const result = {
name: tag.name,
sha: tagHead,
fileList: await getFileList(tagHead, repoLocation)
}
return result
}))
211
tags: [], // todo fill in tags, similar to branches211
tags: tags,