Skip to content

Commit

Permalink
[DO NOT MERGE] Test
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed Aug 3, 2023
1 parent 1a78268 commit fa28279
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/scripts/comments.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFile } from 'node:fs/promises'

import { filesize } from 'filesize'
// import { filesize } from 'filesize'
import { getFileSizes, getStats, modulePaths } from 'govuk-frontend-stats'

/**
Expand Down Expand Up @@ -93,15 +93,15 @@ export async function commentStats (
const reviewAppURL = getReviewAppUrl(issueNumber)

// File sizes
const fileSizeTitle = '### File sizes'
// const fileSizeTitle = '### File sizes'
const fileSizes = await getFileSizes()
const fileSizeRows = Object.entries(fileSizes)
/* const fileSizeRows = Object.entries(fileSizes)
.map(([key, value]) => {
return [`[${key}](https://github.com/alphagov/govuk-frontend/blob/${githubActionContext.commit}/${key})`, filesize(value.size, { base: 2 })]
})
const fileSizeHeaders = ['File', 'Size']
const fileSizeTable = renderTable(fileSizeHeaders, fileSizeRows)
const fileSizeText = [fileSizeTitle, fileSizeTable].join('\n')
const fileSizeText = [fileSizeTitle, fileSizeTable].join('\n') */

// Modules
const modulesTitle = '### Modules'
Expand Down Expand Up @@ -129,7 +129,7 @@ export async function commentStats (
{
markerText,
titleText,
bodyText: [fileSizeText, modulesText].join('\n')
bodyText: [JSON.stringify(fileSizes), modulesText].join('\n')
}
)
}
Expand Down

0 comments on commit fa28279

Please sign in to comment.