-
Notifications
You must be signed in to change notification settings - Fork 69
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
feature: Add descriptive check title & pull request comment summary #65
base: master
Are you sure you want to change the base?
Conversation
@@ -72,13 +75,20 @@ async function action(payload) { | |||
const belowThreshold = reports.some( | |||
(report) => Math.floor(report.total) < minimumCoverage | |||
); | |||
|
|||
let reportTitle = reportName; | |||
// TODO: Figure out a good title for more than one report |
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.
ideas/suggestions welcome 🙂
await client.rest.checks.create({ | ||
name: checkName, | ||
head_sha: sha, | ||
status: "completed", | ||
conclusion: conclusion, | ||
output: { | ||
title: checkName, | ||
title: checkTitle, |
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.
} | ||
const minimumCoverageText = `_Minimum allowed coverage is \`${minimumCoverage}%\`_`; | ||
const footerText = `<p align="right">${credits} against ${commit} </p>`; | ||
output += `${minimumCoverageText}\n\n${footerText}`; | ||
return output; | ||
return [output, structuredOutput]; |
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.
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 could see this being an additional input
parameter for the action, possibly called collapse_pr_comment: bool
(or something like that)
Any update here? Changing to make the file coverage list would be great, as for large projects, the number of files shown is too long and unwieldly. |
Side note: I use |
@jarojasm95 Thanks for the PR 🙏 sorry for the late reply. I could see us merging this if the PR becomes a bit more focused. That means only focusing on the check titles. So no extraneous settings added (pull_request_comment and check_name). I would at least like to see an issue with a discussion about that, to see that there is a need before we add it. |
This PR adds a descriptive check title when there is only a single report being analyzed. Additionally it changes the pull request comment body to use a
<summary/>
block