[WIP] add tags to the Repository object

9aaaea2a8eadd4715acbcd2b261b1dc3114f0293

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.
js_templates/common/htmlPage.ts:22
Before
22
    })
After
22
    }).concat(repo.tags.map((tag) => {
      return {
        name: tag.name,
        href: "tbd",
        date: repo.commits.get(tag.sha).date.toISOString(),
      }
    }))

    console.log(branchesWithHrefs)
main.ts:78
Before
78
  const reposData = await repos(reposConfiguration, eleventyConfig.dir.output)
After
78
  const slugify = eleventyConfig.getFilter("slugify")
  const reposData = await repos(reposConfiguration, eleventyConfig.dir.output, slugify)
main.ts:265
Before
265
    const location = getLocation(reposConfiguration, eleventyConfig.dir.output, repoName)
After
265
    const slugify = eleventyConfig.getFilter("slugify")
    const location = getLocation(reposConfiguration, eleventyConfig.dir.output, repoName, slugify)
schemas/ReposConfiguration.json:135
Before
135
        "branches"
After
135
        "branches",
        "tags"
src/helpers.ts:68
Before
68
69
const getLocation = (reposConfig: ReposConfiguration, outputDir: string, repoName: string): string => {
  return outputDir + (reposConfig.path || "") + "/" + repoName + ".git"
After
68
69
const getLocation = (reposConfig: ReposConfiguration, outputDir: string, repoName: string, slugify: Function): string => {
  return outputDir + (reposConfig.path || "") + "/" + slugify(repoName) + ".git"
src/repos.ts:27
Before
27
After
27
    console.log({branches: cachedBranchNames, tags: cachedTagNames})
src/repos.ts:127
Before
127
After
127
  console.log(tags)
src/repos.ts:138
Before
138
139
const repos: (reposConfig: ReposConfiguration, outputDir: string) => Promise<Array<Repository>> = async (reposConfig, outputDir) => {
    const repoLocation = getLocation(reposConfig, outputDir, repoName)
After
138
139
const repos: (reposConfig: ReposConfiguration, outputDir: string, slugify: Function) => Promise<Array<Repository>> = async (reposConfig, outputDir, slugify) => {
    const repoLocation = getLocation(reposConfig, outputDir, repoName, slugify)
src/repos.ts:154
Before
154
      const repoLocation = getLocation(reposConfig, outputDir, repoName)
After
154
      const repoLocation = getLocation(reposConfig, outputDir, repoName, slugify)
src/repos.ts:168
Before
168
After
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
    }))
src/repos.ts:211
Before
211
      tags: [], // todo fill in tags, similar to branches
After
211
      tags: tags,