Skip to content

Commit

Permalink
Merge pull request #2637 from opral/niklasbuchfink/ninja-13-detect-if…
Browse files Browse the repository at this point in the history
…-translation-files-have-changed

fix: NINJA-13 no reports after project fix
  • Loading branch information
NiklasBuchfink authored Apr 23, 2024
2 parents 7f22d82 + 2144228 commit 811f50b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-students-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inlang/github-lint-action": minor
---

fix lint report comment after a project has been fixed
6 changes: 3 additions & 3 deletions inlang/source-code/github-lint-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ ${error?.cause.stack}`
.join("\n")}`
continue
}
// Case: setup of project fixed -> no comment
// Case: setup of project fixed -> comment with new lint reports
if (result.errorsBase.length > 0 && result.errorsHead.length === 0) {
console.debug(`#### ✅ Setup of project \`${result.projectPath}\` fixed`)
console.debug(`✅ Setup of project \`${result.projectPath}\` fixed`)
}
// Case: No lint reports found -> no comment
if (result.errorsBase.length > 0 || result.errorsHead.length > 0) continue
if (result.errorsHead.length > 0) continue
if (result.lintSummary.length === 0) continue
// Case: Lint reports found -> create comment with lint summary
const lintSummary = result.lintSummary
Expand Down

0 comments on commit 811f50b

Please sign in to comment.