Skip to content

Improve grammar on Comment body #289

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

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/getBodyComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ export function getBodyComment({ errorsInProjectBefore, errorsInProjectAfter, er
if (areStillErrors) {
if (delta < 0) {
s += BLANK_LINE
s += `Yeah, you have remove ${-delta} errors with this PR 👏 \n`
s += `Yeah, you have removed ${-delta} errors with this PR 👏 \n`
s += BLANK_LINE
} else if (delta > 0) {
s += BLANK_LINE
s += `Ohhh you have added ${delta} errors whith this PR 😥 \n`
s += BLANK_LINE
}
s += `**${errorsInProjectAfter.length} ts error${errorsInProjectAfter.length > 1 ? 's' : 's'} detected in all the codebase 😟.** \n`
s += `**${errorsInProjectAfter.length} ts error${errorsInProjectAfter.length === 1 ? '' : 's'} detected in all the codebase 😟.** \n`
s += getNbOfErrorsByFile(`Details`, errorsInProjectAfter)
s += BLANK_LINE
s += BLANK_LINE

}

if (!areStillErrors) {
s += `No ts error in the codebase ! 🎉 \n`
s += `No ts errors in the codebase ! 🎉 \n`
s += BLANK_LINE
if (delta < 0) {
s += `Congrats, you have remove ${-delta} ts error${-delta === 1 ? '' : 's'} with this PR 💪 \n`
s += `Congrats, you have removed ${-delta} ts error${-delta === 1 ? '' : 's'} with this PR 💪 \n`
s += BLANK_LINE
}
return s
}

if (!errorsInModifiedFiles.length) {
s += `Well done: no ts error in files changed in this PR! 🎉 \n`
s += `Well done: no ts errors in files changed in this PR! 🎉 \n`
s += BLANK_LINE
} else {
s += `**${errorsInModifiedFiles.length} ts error${errorsInModifiedFiles.length > 1 ? 's' : 's'} detected in the modified files.** \n`
s += `**${errorsInModifiedFiles.length} ts error${errorsInModifiedFiles.length === 1 ? '' : 's'} detected in the modified files.** \n`
s += BLANK_LINE
s += getListOfErrors(`Details`, errorsInModifiedFiles)
s += BLANK_LINE
Expand All @@ -57,7 +57,7 @@ export function getBodyComment({ errorsInProjectBefore, errorsInProjectAfter, er
if (newErrorsInProject.length > 0) {
s += BLANK_LINE
s += `**${newErrorsInProject.length} new error${newErrorsInProject.length > 1 ? 's' : ''} added** \n`
s += `*Note : in some rare cases, new errors can be just same errors but with different locations*`
s += `*Note : in some rare cases, new errors can be existing errors but with different locations*`
s += BLANK_LINE
s += getListOfErrors(`Details`, newErrorsInProject)
s += BLANK_LINE
Expand Down Expand Up @@ -153,4 +153,4 @@ function getNbOfErrorsByFile(title: string, errors: ErrorTs[], thresholdCollapse

return s

}
}