Skip to content

Commit 10034a3

Browse files
authored
Merge pull request #62 from andershagbard/annotations-exitcode
Use exit code 0 if report available
2 parents 434a1ad + f7f0fa6 commit 10034a3

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

dist/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/addAnnotations.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ function getDiffFilter(
7070

7171
export async function addAnnotations(
7272
reports: ThemeCheckReport[],
73-
exitCode: number,
7473
configContent: string,
7574
ghToken: string,
7675
fileDiff: string[] | undefined,
@@ -195,7 +194,7 @@ export async function addAnnotations(
195194
...ctx.repo,
196195
check_run_id: check.data.id,
197196
name: CHECK_NAME,
198-
conclusion: exitCode > 0 ? 'failure' : 'success',
197+
conclusion: errorCount > 0 ? 'failure' : 'success',
199198
output: {
200199
title: CHECK_NAME,
201200
summary: `${errorCount} error(s), ${warningCount} warning(s) found`,

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function run() {
2222
try {
2323
await installCli(version);
2424
if (ghToken) {
25-
const [{ report, exitCode }, configContent, fileDiff] =
25+
const [{ report }, configContent, fileDiff] =
2626
await Promise.all([
2727
runChecksJson(
2828
themeRoot,
@@ -35,12 +35,11 @@ async function run() {
3535
]);
3636
await addAnnotations(
3737
report,
38-
exitCode,
3938
configContent,
4039
ghToken,
4140
fileDiff,
4241
);
43-
process.exit(exitCode);
42+
process.exit(0);
4443
} else {
4544
const { exitCode } = await runChecksText(
4645
themeRoot,

0 commit comments

Comments
 (0)