Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

phracek
Copy link
Member

@phracek phracek commented Jul 22, 2024

This pull request implements showing all statuses as comment.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek phracek marked this pull request as draft July 22, 2024 12:51
@@ -0,0 +1,92 @@
import { getInput } from '@actions/core';
import { context } from '@actions/github';
import MetadataController from 'issue-metadata';
Copy link
Member

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

@jamacku jamacku added the type: feature New feature or request label Jul 22, 2024
@jamacku jamacku linked an issue Jul 22, 2024 that may be closed by this pull request
Copy link
Member

@jamacku jamacku left a 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;
}
Copy link
Member

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 ?? [];
Copy link
Member

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
Copy link
Member

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;
Copy link
Member

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

@jamacku jamacku changed the title Create GitHub summary report from Testing Farm results Create GitHub comment summary report from Testing Farm results Jul 23, 2024
@jamacku
Copy link
Member

jamacku commented Sep 20, 2024

Thanks for the great work. I took over in PR:

@jamacku jamacku closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to create comment with results
2 participants