Skip to content

Commit

Permalink
💄 Move vars after secrets (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
stoe authored May 4, 2024
1 parent a96daf8 commit af50b19
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions utils/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,8 @@ ${dim('(this could take a while...)')}`)
if (getPermissions) header.push('permissions')
if (getRunsOn) header.push('runs-on')
if (getSecrets) header.push('secrets')
if (getUses) header.push('uses')
if (getVars) header.push('vars')
if (getUses) header.push('uses')

// actions report
const csv = stringify(
Expand All @@ -820,8 +820,8 @@ ${dim('(this could take a while...)')}`)
if (getPermissions && i.permissions) csvData.push(i.permissions.join(', '))
if (getRunsOn && i.runsOn) csvData.push(i.runsOn.join(', '))
if (getSecrets && i.secrets) csvData.push(i.secrets.join(', '))
if (getUses && i.uses) csvData.push(i.uses.join(', '))
if (getVars && i.vars) csvData.push(i.vars.join(', '))
if (getUses && i.uses) csvData.push(i.uses.join(', '))

return csvData
}),
Expand Down Expand Up @@ -896,8 +896,8 @@ ${dim('(this could take a while...)')}`)
if (getPermissions) jsonData.permissions = i.permissions
if (getRunsOn) jsonData.runsOn = i.runsOn
if (getSecrets) jsonData.secrets = i.secrets
if (getUses) jsonData.uses = i.uses
if (getVars) jsonData.vars = i.vars
if (getUses) jsonData.uses = i.uses

return jsonData
})
Expand Down Expand Up @@ -975,13 +975,13 @@ ${dim('(this could take a while...)')}`)
headerBreak += ' | ---'
}

if (getUses) {
header += ' | uses'
if (getVars) {
header += ' | vars'
headerBreak += ' | ---'
}

if (getVars) {
header += ' | vars'
if (getUses) {
header += ' | uses'
headerBreak += ' | ---'
}

Expand Down Expand Up @@ -1034,6 +1034,10 @@ ${dim('(this could take a while...)')}`)
mdStr += ` | ${secrets && secrets.length > 0 ? `<ul><li>\`${secrets.join(`\`</li><li>\``)}\`</li></ul>` : ''}`
}

if (getVars) {
mdStr += ` | ${vars && vars.length > 0 ? `<ul><li>\`${vars.join(`\`</li><li>\``)}\`</li></ul>` : ''}`
}

if (getUses && uses) {
// skip if not iterable
if (uses === null || uses === undefined || typeof uses[Symbol.iterator] !== 'function') {
Expand Down Expand Up @@ -1070,10 +1074,6 @@ ${dim('(this could take a while...)')}`)
mdStr += ` | ${usesLinks.length > 0 ? `<ul><li>${usesLinks.join('</li><li>')}</li></ul>` : ''}`
}

if (getVars) {
mdStr += ` | ${vars && vars.length > 0 ? `<ul><li>\`${vars.join(`\`</li><li>\``)}\`</li></ul>` : ''}`
}

mdData.push(mdStr)
}

Expand Down

0 comments on commit af50b19

Please sign in to comment.