Show branches in two categories, separating WIPs from merged branches

920e38b7d6cf30d110291c537265fcdd0e0a0be0

Tucker McKnight <tucker@pangolin.lan> | Sun Feb 01 2026

Show branches in two categories, separating WIPs from merged branches
js_templates/branches.ts:9
Before
8
9
10
11



12
13
14
) => {
  const slugify = eleventyConfig.getFilter("slugify")

  return render(
⁣
⁣
⁣
    m('div', {class: "d-flex flex-wrap"}, data.branches.map((branch) => {
      return branch.repoName === data.branchInfo.repoName
        ? m('div', {class: "card bezel-gray m-2 flex-grow-1", style: "flex-basis: 20rem; max-width: 20rem;"}, [
            m('div', {class: "card-header"}, [
After
8
9
10
11
12
13
14
15
16
17
) => {
  const slugify = eleventyConfig.getFilter("slugify")

  const branchesWithWorkInProgress = data.branches.filter(branch => branch.ahead > 0)
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)

  const branchCards = (branches) => {
    return m('div', {class: "d-flex flex-wrap"}, branches.map((branch) => {
      return branch.repoName === data.branchInfo.repoName
        ? m('div', {class: "card bezel-gray m-2 flex-grow-1", style: "flex-basis: 20rem; max-width: 20rem;"}, [
            m('div', {class: "card-header"}, [
js_templates/branches.ts:40
Before
39
40
41



42



        : null
      })
    )
⁣
⁣
⁣
  )
⁣
⁣
⁣
⁣
}
After
39
40
41
42
43
44
45
46
47
48
49
        : null
      })
    )
  }

  return render([
    m('h1', {class: 'fs-2'}, 'Branches with unmerged commits'),
    branchCards(branchesWithWorkInProgress),
    m('h1', {class: 'fs-2'}, 'Branches that are fully merged'),
    branchCards(branchesFullyMerged),
  ])
}