Skip to content

Commit

Permalink
remove old table, align center new table
Browse files Browse the repository at this point in the history
  • Loading branch information
lcampos committed Jul 25, 2024
1 parent 900154d commit 7effdee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 74 deletions.
38 changes: 2 additions & 36 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

41 changes: 4 additions & 37 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,16 @@ export async function run(): Promise<void> {
`<img src="https://api.ratemyopenapi.com/svg-generator?score=${report.results.simpleReport.score}" width="150px" style="width:150px;" alt="Overall score is ${report.results.simpleReport.score}"/>`
)
.addRaw('</p>')
.addRaw(`<p style="margin-top:20px;">`)
.addRaw(`<p style="margin-top:20px;margin-bottom:20px;">`)
.addRaw(
`The overall score is <strong>${report.results.simpleReport.score}</strong>. The following table provides a breakdown of the lint results per category for <strong>${openApiFilePath}</strong>.\n`
)
.addRaw('</p>')

summary
.addRaw('<table style="border-collapse: collapse; border: none;">')
.addRaw(
'<table align="center" style="border-collapse: collapse; border: none;">'
)
.addRaw(
`<tr style="border:none">
<td style="border:none">
Expand Down Expand Up @@ -162,41 +164,6 @@ export async function run(): Promise<void> {
)
.addRaw('</table>')

summary
.addRaw('<p>')
.addTable([
[
{ data: 'Category', header: true },
{ data: 'Score', header: true },
{ data: 'Issues', header: true }
],
[
{ data: 'Docs' },
{ data: report.results.simpleReport.docsScore.toString() },
{ data: report.results.fullReport.docsIssues.length.toString() }
],
[
{ data: 'Completeness' },
{ data: report.results.simpleReport.completenessScore.toString() },
{
data: report.results.fullReport.completenessIssues.length.toString()
}
],
[
{ data: 'SDK Generation' },
{ data: report.results.simpleReport.sdkGenerationScore.toString() },
{
data: report.results.fullReport.sdkGenerationIssues.length.toString()
}
],
[
{ data: 'Security' },
{ data: report.results.simpleReport.securityScore.toString() },
{ data: report.results.fullReport.securityIssues.length.toString() }
]
])
.addRaw('</p>')

summary
.addRaw('<p> ')
.addDetails('Summary', report.results.simpleReport.shortSummary)
Expand Down

0 comments on commit 7effdee

Please sign in to comment.