Skip to content

Commit 20b3445

Browse files
committed
UPDATE
1 parent f9192d3 commit 20b3445

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
with:
4646
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
4747
RUN_ID: ${{ github.run_id }}
48+
JOB_ID: ${{ job.check_run_id }}
4849
STEP_REGEX: build-.*
4950
JOB_REGEX: compile \((?<osName>.+?), (?<osVersion>.+?), (?<config>.+?), (?<cppVersion>.+?), (?<vendorName>.+?), (?<vendorVersion>.+?)\)
5051
ROW_HEADERS: '["osName","osVersion","vendorName","vendorVersion","config"]'

action.yml

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

55
inputs:
6+
RUN_ID:
7+
requird: true
8+
JOB_ID:
9+
required: true
610
PRIVATE_KEY:
711
required: true
812
JOB_REGEX:
913
required: true
1014
STEP_REGEX:
1115
required: true
12-
RUN_ID:
13-
requird: true
1416
ROW_HEADERS:
1517
required: true
1618
COLUMN_HEADER:

dist/index.js

Lines changed: 6 additions & 4 deletions
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function requireEnv(name: string): string {
1414
const githubRepository = requireEnv("GITHUB_REPOSITORY");
1515
const githubRef = requireEnv("GITHUB_REF");
1616

17-
const run_id = parseInt(requireEnv("INPUT_RUN_ID"));
17+
const current_run_id = parseInt(requireEnv("INPUT_RUN_ID"));
18+
const current_job_id = parseInt(requireEnv("INPUT_JOB_ID"));
1819

1920
const [owner, repo] = githubRepository.split("/");
2021
const pull_request_number = parseInt(githubRef.split("/")[2]);
@@ -42,14 +43,13 @@ const rows: Row[] = [];
4243
const { data: jobList } = await octokit.rest.actions.listJobsForWorkflowRun({
4344
owner,
4445
repo,
45-
run_id
46+
run_id: current_run_id,
4647
});
4748

4849
for (const job of jobList.jobs) {
49-
5050
const job_id = job.id;
5151

52-
console.log(`retreiving job log for ${job_id}`)
52+
if (job_id === current_job_id) continue;
5353

5454
const { url: redirectUrl } = await octokit.rest.actions.downloadJobLogsForWorkflowRun({
5555
owner,
@@ -112,7 +112,7 @@ for (const job of jobList.jobs) {
112112
}
113113

114114
rows.push({
115-
url: `https://github.com/${owner}/${repo}/actions/runs/${run_id}/job/${job_id}#step:${stepId}:${firstIssueLine}`,
115+
url: `https://github.com/${owner}/${repo}/actions/runs/${current_run_id}/job/${job_id}#step:${stepId}:${firstIssueLine}`,
116116
status: compileResult,
117117
...jobMatch.groups,
118118
});

0 commit comments

Comments
 (0)