-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report output #9
Conversation
theztefan
commented
Dec 28, 2022
- Fix: report in JSON format to be uploaded as artifact.
- Options to configure the report format: JSON, PDF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have two comments/questions
These changes will conflict a lot with the changes I am making cause I am changing a little bit the way we are handling types. But leave it to me, I can merge it together after this gets merged.
@@ -8,16 +8,20 @@ inputs: | |||
default: srdemo-demo | |||
org: | |||
description: "The organisation to generate the report for" | |||
required: false | |||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why you changed these fields to required: true
but still kept the default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I thought of you when I changed this. 😄
@@ -127,6 +129,197 @@ export function prepareSummary(report: Report): void { | |||
]); | |||
} | |||
|
|||
export function preparePdf(report: Report): jsPDF { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you considered making it a bit more generic to generate the reports? It is repeating a lot of data between JSON and PDF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well one function was preparing and writing markdown using core.summary
and the other one is preprating a jsPDF()
object. The object is then passed to be written to a file.
That is the only difference. The data is very much the same. There should be a more generic way to do this but didn't get to it in this iteration.