-
Notifications
You must be signed in to change notification settings - Fork 11
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
Create GitHub comment summary report from Testing Farm results #211
Conversation
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@@ -0,0 +1,92 @@ | |||
import { getInput } from '@actions/core'; | |||
import { context } from '@actions/github'; | |||
import MetadataController from 'issue-metadata'; |
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.
You have to add issue-metadata
to the list of dependencies - yarn add issue-metadata
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.
You can look at this action for inspiration. It does exactly what we would like to achieve.
|
||
set dateTimeInfo(value: MetadataObject['TFDatetime']) { | ||
this._TFDatetime = 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.
I would personally avoid using setters and getters. They make code unreadable.
) { | ||
this._TFcommentID = metadata?.TFCommentID ?? undefined; | ||
this._TFDatetime = metadata?.TFDatetime ?? undefined; | ||
this._TFSummaryInfo = metadata?._TFSummaryInfo ?? []; |
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.
You are missing the declarations for _TFDatetime
and _TFSummaryInfo
.
}, | ||
}); | ||
|
||
const parsedCommentID = z |
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.
Please move the validation scheme into schema/
dir.
@@ -14,12 +15,33 @@ export class PullRequest { | |||
* @param sha - The head sha of the Pull Request | |||
* @param octokit - The Octokit instance to use for interacting with the GitHub API | |||
*/ | |||
private _metadata: Metadata | undefined; |
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.
Please move metadata property into constructor and make it readonly instead of private
Thanks for the great work. I took over in PR: |
This pull request implements showing all statuses as comment.