Skip to content

Commit e9a2d6f

Browse files
committed
Add feature for ignoring not marked job
1 parent 05a4997 commit e9a2d6f

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ author: yaito3014
33
description: Notifies about C++ warnings in GitHub Actions
44

55
inputs:
6+
IGNORE_NO_MARKER:
7+
default: false
68
RUN_ID:
79
requird: true
810
JOB_ID:

dist/index.js

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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const current_job_id = parseInt(requireEnv("INPUT_JOB_ID"));
2020
const [owner, repo] = githubRepository.split("/");
2121
const pull_request_number = parseInt(githubRef.split("/")[2]);
2222

23+
const ignore_no_marker = requireEnv("INPUT_IGNORE_NO_MARKER") === 'true';
24+
2325
const job_regex = requireEnv("INPUT_JOB_REGEX");
2426
const step_regex = requireEnv("INPUT_STEP_REGEX");
2527

@@ -73,7 +75,13 @@ for (const job of jobList.jobs) {
7375

7476
let offset = 0;
7577
const offsetIdx = lines.findIndex((line) => line.match("CPPWARNINGNOTIFIER_LOG_MARKER"));
76-
if (offsetIdx !== -1) offset = offsetIdx;
78+
if (offsetIdx !== -1) {
79+
offset = offsetIdx;
80+
} else {
81+
if (ignore_no_marker) {
82+
continue;
83+
}
84+
}
7785

7886
let compileResult = "✅success";
7987
let firstIssueLine = 1;

0 commit comments

Comments
 (0)