From 1411af031e39dabd9eb67ff0f998a95d16fef61c Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 01:53:42 +0900 Subject: [PATCH 01/25] add warning --- source.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source.cpp b/source.cpp index 12b9916..51a567f 100644 --- a/source.cpp +++ b/source.cpp @@ -1,5 +1,7 @@ #include +#warning "WARNNING: This is a warning message" + [[nodiscard]] int func() { return 42; } int main() { From c7dd36e9e0b35bfa32650c6d8adb904da5ff013f Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:10:34 +0900 Subject: [PATCH 02/25] debug --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 761b7bf..2aa2e55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,11 @@ import { readFileSync } from "fs"; import { parseString } from "gcc-output-parser"; +const compilation_output = readFileSync("compilation.log"); +const outputs = parseString(compilation_output); + +console.log("Parsed compilation output:", outputs); + // if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { console.log("Not a pull request, exiting."); @@ -13,9 +18,6 @@ const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!); -const compilation_output = readFileSync("compilation.log"); - -const outputs = parseString(compilation_output); octokit.rest.issues.createComment({ owner, From 55165ab4a1d65183b57176ec745d0d83d2499f9d Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:14:32 +0900 Subject: [PATCH 03/25] make object --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2aa2e55..a64a586 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,10 @@ import { Octokit } from "@octokit/action"; import { readFileSync } from "fs"; -import { parseString } from "gcc-output-parser"; +import parser from "gcc-output-parser"; const compilation_output = readFileSync("compilation.log"); -const outputs = parseString(compilation_output); +const outputs = parser.parseString(compilation_output); console.log("Parsed compilation output:", outputs); From d94cf2e7bd9faf17c7b27532cbe0d7622f5891de Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:14:39 +0900 Subject: [PATCH 04/25] refine type def --- src/types.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types.d.ts b/src/types.d.ts index 9a4c585..e86b322 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -5,7 +5,11 @@ declare module "gcc-output-parser" { column: number; type: string; text: string; + codeWhitespace: string; code: string; adjustedColumn: number; + startIndex: number; + endIndex: number; + parentFunction: string | undefined; }>; } From fb20eaa0fc05da2b0464051897ce2868f84de4a9 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:20:19 +0900 Subject: [PATCH 05/25] comment json --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index a64a586..2c0ef89 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,9 +19,11 @@ const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!); +const body = JSON.stringify(outputs); + octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is:\n\n\`\`\`\n${outputs}\n\`\`\``, + body: `compilation output is: \n\n\`\`\`json\n${body}\n\`\`\``, }); From c372f46c232a5807aad8bcb8241405042eae48f9 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:35:50 +0900 Subject: [PATCH 06/25] update --- src/index.ts | 39 ++++++++++++++++++++++++++++++++++----- src/types.d.ts | 5 +++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2c0ef89..3527245 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,41 @@ import { Octokit } from "@octokit/action"; import { readFileSync } from "fs"; -import parser from "gcc-output-parser"; +import parser, { type OutputEntry } from "gcc-output-parser"; const compilation_output = readFileSync("compilation.log"); const outputs = parser.parseString(compilation_output); -console.log("Parsed compilation output:", outputs); +let error_or_warnings: Array<{ + error_or_warning: OutputEntry; + notes: Array; +}> = []; + +let cursor = 0; +while (cursor < outputs.length) { + if (outputs[cursor].type === "error" || outputs[cursor].type === "warning") { + let notes_cursor = cursor + 1; + while ( + notes_cursor < outputs.length && + outputs[notes_cursor].type === "note" + ) { + notes_cursor++; + } + const error_or_warning = outputs[cursor]; + const notes = outputs.slice(cursor, notes_cursor); + + error_or_warnings.push({ + error_or_warning, + notes, + }); + + cursor = notes_cursor; + } else { + cursor++; + } +} + +console.log("Parsed compilation output:", error_or_warnings); // if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { @@ -19,11 +48,11 @@ const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!); -const body = JSON.stringify(outputs); - octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is: \n\n\`\`\`json\n${body}\n\`\`\``, + body: `compilation output is: \n\n\`\`\`json\n${ + (JSON.stringify(error_or_warnings), null, "\t") + }\n\`\`\``, }); diff --git a/src/types.d.ts b/src/types.d.ts index e86b322..48f2425 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,5 +1,5 @@ declare module "gcc-output-parser" { - export function parseString(input: string | Buffer): Array<{ + export type OutputEntry = { filename: string; line: number; column: number; @@ -11,5 +11,6 @@ declare module "gcc-output-parser" { startIndex: number; endIndex: number; parentFunction: string | undefined; - }>; + }; + export function parseString(input: string | Buffer): Array; } From 67ad07a1ae7363943404afad388b7cb21500ea5d Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:37:48 +0900 Subject: [PATCH 07/25] fix --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3527245..64c5a02 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,7 +52,9 @@ octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is: \n\n\`\`\`json\n${ - (JSON.stringify(error_or_warnings), null, "\t") - }\n\`\`\``, + body: `compilation output is: \n\n\`\`\`json\n${JSON.stringify( + error_or_warnings, + null, + "\t" + )}\n\`\`\``, }); From 5d88b3ec297b0ee8546f001cd2f7421a901132ae Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:38:47 +0900 Subject: [PATCH 08/25] update whitespace --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 64c5a02..efb2590 100644 --- a/src/index.ts +++ b/src/index.ts @@ -55,6 +55,6 @@ octokit.rest.issues.createComment({ body: `compilation output is: \n\n\`\`\`json\n${JSON.stringify( error_or_warnings, null, - "\t" + " " )}\n\`\`\``, }); From b71971b98c740a5932e253fb005489b8335754a7 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:39:48 +0900 Subject: [PATCH 09/25] don't include warnings itself --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index efb2590..d8d87bc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,7 +22,7 @@ while (cursor < outputs.length) { notes_cursor++; } const error_or_warning = outputs[cursor]; - const notes = outputs.slice(cursor, notes_cursor); + const notes = outputs.slice(cursor + 1, notes_cursor); error_or_warnings.push({ error_or_warning, From e405788f17307d2516829222f8b3b5f6a3de95e8 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:45:32 +0900 Subject: [PATCH 10/25] exit when no error or warning --- src/index.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index d8d87bc..435d3a1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,6 +43,13 @@ if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { process.exit(0); } +if (error_or_warnings.length === 0) { + console.log("No errors or warnings, exiting."); + process.exit(0); +} + +let body = JSON.stringify(error_or_warnings, null, " "); + const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; @@ -52,9 +59,5 @@ octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is: \n\n\`\`\`json\n${JSON.stringify( - error_or_warnings, - null, - " " - )}\n\`\`\``, + body: `compilation output is: \n\n\`\`\`\n${body}\n\`\`\``, }); From 56955ff94e3a37766900ebc4bb4b5881c74f9af8 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:53:38 +0900 Subject: [PATCH 11/25] eliminate gcc-output-parser --- package-lock.json | 9 +-------- package.json | 5 ++--- src/index.ts | 45 +++------------------------------------------ src/types.d.ts | 16 ---------------- 4 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 src/types.d.ts diff --git a/package-lock.json b/package-lock.json index 8cb90d9..70dd7f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,8 +6,7 @@ "": { "name": "cpp-warning-notifier", "dependencies": { - "@octokit/action": "^7.0.2", - "gcc-output-parser": "^0.0.5" + "@octokit/action": "^7.0.2" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", @@ -211,12 +210,6 @@ ], "license": "MIT" }, - "node_modules/gcc-output-parser": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/gcc-output-parser/-/gcc-output-parser-0.0.5.tgz", - "integrity": "sha512-mNxr8otOo19gl61Snn4YkX+zBOwJGjckB+aAJZSVHZdWvTRcdUXBzu+5DWVQA/yFCrJviIeSrxYG+4FcV1tFkw==", - "license": "ISC" - }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", diff --git a/package.json b/package.json index f534668..8835e40 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,11 @@ "build": "tsc" }, "dependencies": { - "@octokit/action": "^7.0.2", - "gcc-output-parser": "^0.0.5" + "@octokit/action": "^7.0.2" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.15.2", "typescript": "^5.8.3" } -} +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 435d3a1..98f56a7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,41 +1,9 @@ import { Octokit } from "@octokit/action"; import { readFileSync } from "fs"; -import parser, { type OutputEntry } from "gcc-output-parser"; +const compilation_output = readFileSync("compilation.log").toString; -const compilation_output = readFileSync("compilation.log"); -const outputs = parser.parseString(compilation_output); - -let error_or_warnings: Array<{ - error_or_warning: OutputEntry; - notes: Array; -}> = []; - -let cursor = 0; -while (cursor < outputs.length) { - if (outputs[cursor].type === "error" || outputs[cursor].type === "warning") { - let notes_cursor = cursor + 1; - while ( - notes_cursor < outputs.length && - outputs[notes_cursor].type === "note" - ) { - notes_cursor++; - } - const error_or_warning = outputs[cursor]; - const notes = outputs.slice(cursor + 1, notes_cursor); - - error_or_warnings.push({ - error_or_warning, - notes, - }); - - cursor = notes_cursor; - } else { - cursor++; - } -} - -console.log("Parsed compilation output:", error_or_warnings); +console.log("Parsed compilation output:", compilation_output); // if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { @@ -43,13 +11,6 @@ if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { process.exit(0); } -if (error_or_warnings.length === 0) { - console.log("No errors or warnings, exiting."); - process.exit(0); -} - -let body = JSON.stringify(error_or_warnings, null, " "); - const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; @@ -59,5 +20,5 @@ octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is: \n\n\`\`\`\n${body}\n\`\`\``, + body: `compilation output is: \n\n\`\`\`\n${compilation_output}\n\`\`\``, }); diff --git a/src/types.d.ts b/src/types.d.ts deleted file mode 100644 index 48f2425..0000000 --- a/src/types.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare module "gcc-output-parser" { - export type OutputEntry = { - filename: string; - line: number; - column: number; - type: string; - text: string; - codeWhitespace: string; - code: string; - adjustedColumn: number; - startIndex: number; - endIndex: number; - parentFunction: string | undefined; - }; - export function parseString(input: string | Buffer): Array; -} From 0b8eb1e2005b1003879f1a500e42fedfe7c66e14 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:54:41 +0900 Subject: [PATCH 12/25] invoke --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 98f56a7..50f6074 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { Octokit } from "@octokit/action"; import { readFileSync } from "fs"; -const compilation_output = readFileSync("compilation.log").toString; +const compilation_output = readFileSync("compilation.log").toString(); console.log("Parsed compilation output:", compilation_output); From 0ecc9210777b90eed4d21f3443816e13b66eedf8 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 02:59:38 +0900 Subject: [PATCH 13/25] detect warning --- src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 50f6074..eb8692a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,6 +5,10 @@ const compilation_output = readFileSync("compilation.log").toString(); console.log("Parsed compilation output:", compilation_output); +if (compilation_output.match(/warning( C\d+)?:/).length > 0) { + console.log("Compilation output contains warnings."); +} + // if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { console.log("Not a pull request, exiting."); @@ -20,5 +24,5 @@ octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `compilation output is: \n\n\`\`\`\n${compilation_output}\n\`\`\``, + body: `detected warnings in the compilation output:
compilation output\n\n\`\`\`\n${compilation_output}\n\`\`\`\n
`, }); From 3f9ca1d48e25cd38a614cbd80d9e37f99af61495 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:02:43 +0900 Subject: [PATCH 14/25] fix --- src/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index eb8692a..862839d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,15 +3,17 @@ import { readFileSync } from "fs"; const compilation_output = readFileSync("compilation.log").toString(); -console.log("Parsed compilation output:", compilation_output); +const regex = /warning( .\d+)?:/; -if (compilation_output.match(/warning( C\d+)?:/).length > 0) { - console.log("Compilation output contains warnings."); +const match_result = compilation_output.match(regex); + +if (match_result && match_result.length > 0) { + console.log("compilation output contains warnings."); } // if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { - console.log("Not a pull request, exiting."); + console.log("not a pull request, exiting."); process.exit(0); } From e4809134af4602a1e3789bca4c13fbd5507ac583 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:09:00 +0900 Subject: [PATCH 15/25] cmake --- .github/workflows/test.yml | 5 +++-- .gitignore | 2 ++ CMakeLists.txt | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6b8c77..5b35cf8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,13 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - g++ -Wall -Wextra -o test source.cpp > compilation.log 2>&1 + cmake -S . -B build + cmake --build build > compilation.log 2>&1 - uses: actions/upload-artifact@v4 with: name: compilation_log path: compilation.log - - run: ./test + - run: ./build/hello_world run-notifier: needs: diff --git a/.gitignore b/.gitignore index 49fd833..0baf835 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules dist/* + +build/* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3677318 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.28) + +project(HelloWorld) + +set(WARNING_OPTIONS + $<$:/W4 + /WX> + $<$:-Wall + -Wextra + -pedantic> +) + +add_executable(hello_world source.cpp) +target_compile_options(hello_world PRIVATE ${WARNING_OPTIONS}) From 15b327aaf166e0e46464cab58d55760d5bb0233d Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:26:45 +0900 Subject: [PATCH 16/25] add pragma --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b35cf8..88f4571 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,8 @@ jobs: - uses: actions/checkout@v4 - run: | cmake -S . -B build - cmake --build build > compilation.log 2>&1 + echo "#cppwarningnotifier commit=${{ github.sha }}\n" >> compilation.log + cmake --build build >> compilation.log 2>&1 - uses: actions/upload-artifact@v4 with: name: compilation_log From 999013285a937d2d7eabcacb7b2a2042cf95cbf7 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:28:31 +0900 Subject: [PATCH 17/25] add -e option --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88f4571..654751b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - run: | cmake -S . -B build - echo "#cppwarningnotifier commit=${{ github.sha }}\n" >> compilation.log + echo -e "#cppwarningnotifier commit=${{ github.sha }}\n" >> compilation.log cmake --build build >> compilation.log 2>&1 - uses: actions/upload-artifact@v4 with: From 4078574920c9176a4431f78aa9747ff9f5899cee Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:31:26 +0900 Subject: [PATCH 18/25] remove newline --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 654751b..2dc7195 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - run: | cmake -S . -B build - echo -e "#cppwarningnotifier commit=${{ github.sha }}\n" >> compilation.log + echo "#cppwarningnotifier commit=${{ github.sha }}" >> compilation.log cmake --build build >> compilation.log 2>&1 - uses: actions/upload-artifact@v4 with: From bc16809de8da13719f860e62ff18b27305f18de2 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 03:49:36 +0900 Subject: [PATCH 19/25] traverse --- src/index.ts | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index 862839d..65d991d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,6 @@ import { Octokit } from "@octokit/action"; -import { readFileSync } from "fs"; +import { readdirSync, readFileSync } from "fs"; -const compilation_output = readFileSync("compilation.log").toString(); - -const regex = /warning( .\d+)?:/; - -const match_result = compilation_output.match(regex); - -if (match_result && match_result.length > 0) { - console.log("compilation output contains warnings."); -} - -// if the action is triggered by not a pull request, exit if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { console.log("not a pull request, exiting."); process.exit(0); @@ -22,9 +11,28 @@ const octokit = new Octokit(); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!); +let body = ""; + +for (const file of readdirSync(".")) { + if (!file.startsWith("compilation") || !file.endsWith(".log")) { + console.log(`skipping ${file}`); + continue; + } + + const compilation_output = readFileSync(file).toString(); + + const regex = /warning( .\d+)?:/; + + const match_result = compilation_output.match(regex); + + if (match_result && match_result.length > 0) { + body += `detected warnings in the compilation output:
compilation output\n\n\`\`\`\n${compilation_output}\n\`\`\`\n
\n`; + } +} + octokit.rest.issues.createComment({ owner, repo, issue_number: pull_request_number, - body: `detected warnings in the compilation output:
compilation output\n\n\`\`\`\n${compilation_output}\n\`\`\`\n
`, + body, }); From 6d8f629dbeff25803c9678c1cb664d6058644cab Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:32:29 +0900 Subject: [PATCH 20/25] test app --- .github/workflows/test.yml | 4 + package-lock.json | 269 +++++++++++++++++++++++++++++++++---- package.json | 2 +- src/index.ts | 12 +- 4 files changed, 260 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2dc7195..8ba0662 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,3 +40,7 @@ jobs: - run: node dist/index.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APP_ID: ${{ secrets.APP_ID }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + CLIENT_ID: ${{ env.CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} diff --git a/package-lock.json b/package-lock.json index 70dd7f8..83ecbee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "cpp-warning-notifier", "dependencies": { - "@octokit/action": "^7.0.2" + "octokit": "^4.1.3" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", @@ -14,31 +14,85 @@ "typescript": "^5.8.3" } }, - "node_modules/@octokit/action": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@octokit/action/-/action-7.0.2.tgz", - "integrity": "sha512-mM/NxCh5oviEhNB7NOwFR9SeGMx32TYR0N4lt+SdNsrQmm+ozKgHXZddQixrDzg0b4tWAsMi85nHLeIs5bM5jg==", + "node_modules/@octokit/app": { + "version": "15.1.6", + "resolved": "https://registry.npmjs.org/@octokit/app/-/app-15.1.6.tgz", + "integrity": "sha512-WELCamoCJo9SN0lf3SWZccf68CF0sBNPQuLYmZ/n87p5qvBJDe9aBtr5dHkh7T9nxWZ608pizwsUbypSzZAiUw==", "license": "MIT", "dependencies": { - "@octokit/auth-action": "^5.1.2", + "@octokit/auth-app": "^7.2.1", + "@octokit/auth-unauthenticated": "^6.1.3", "@octokit/core": "^6.1.5", + "@octokit/oauth-app": "^7.1.6", "@octokit/plugin-paginate-rest": "^12.0.0", - "@octokit/plugin-rest-endpoint-methods": "^14.0.0", "@octokit/types": "^14.0.0", - "undici": "^6.19.8" + "@octokit/webhooks": "^13.6.1" }, "engines": { "node": ">= 18" } }, - "node_modules/@octokit/auth-action": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-5.1.2.tgz", - "integrity": "sha512-KgR3hIHz1iHytBrWdsVRN7elYtF6TP2fKIlnpjagT1rGY2WnALckO6aOUjwxGOyrnXd44j/QSKQilCnAswJg3A==", + "node_modules/@octokit/auth-app": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.2.1.tgz", + "integrity": "sha512-4jaopCVOtWN0V8qCx/1s2pkRqC6tcvIQM3kFB99eIpsP53GfsoIKO08D94b83n/V3iGihHmxWR2lXzE0NicUGg==", "license": "MIT", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/types": "^14.0.0" + "@octokit/auth-oauth-app": "^8.1.4", + "@octokit/auth-oauth-user": "^5.1.4", + "@octokit/request": "^9.2.3", + "@octokit/request-error": "^6.1.8", + "@octokit/types": "^14.0.0", + "toad-cache": "^3.7.0", + "universal-github-app-jwt": "^2.2.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-app": { + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.4.tgz", + "integrity": "sha512-71iBa5SflSXcclk/OL3lJzdt4iFs56OJdpBGEBl1wULp7C58uiswZLV6TdRaiAzHP1LT8ezpbHlKuxADb+4NkQ==", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-device": "^7.1.5", + "@octokit/auth-oauth-user": "^5.1.4", + "@octokit/request": "^9.2.3", + "@octokit/types": "^14.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-device": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.5.tgz", + "integrity": "sha512-lR00+k7+N6xeECj0JuXeULQ2TSBB/zjTAmNF2+vyGPDEFx1dgk1hTDmL13MjbSmzusuAmuJD8Pu39rjp9jH6yw==", + "license": "MIT", + "dependencies": { + "@octokit/oauth-methods": "^5.1.5", + "@octokit/request": "^9.2.3", + "@octokit/types": "^14.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-user": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.4.tgz", + "integrity": "sha512-4tJRofMHm6ZCd3O2PVgboBbQ/lNtacREeaihet0+wCATZmvPK+jjg2K6NjBfY69An3yzQdmkcMeiaOOoxOPr7Q==", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-device": "^7.1.5", + "@octokit/oauth-methods": "^5.1.5", + "@octokit/request": "^9.2.3", + "@octokit/types": "^14.0.0", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" @@ -53,6 +107,19 @@ "node": ">= 18" } }, + "node_modules/@octokit/auth-unauthenticated": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-6.1.3.tgz", + "integrity": "sha512-d5gWJla3WdSl1yjbfMpET+hUSFCE15qM0KVSB0H1shyuJihf/RL1KqWoZMIaonHvlNojkL9XtLFp8QeLe+1iwA==", + "license": "MIT", + "dependencies": { + "@octokit/request-error": "^6.1.8", + "@octokit/types": "^14.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/@octokit/core": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.5.tgz", @@ -98,12 +165,73 @@ "node": ">= 18" } }, + "node_modules/@octokit/oauth-app": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-7.1.6.tgz", + "integrity": "sha512-OMcMzY2WFARg80oJNFwWbY51TBUfLH4JGTy119cqiDawSFXSIBujxmpXiKbGWQlvfn0CxE6f7/+c6+Kr5hI2YA==", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-app": "^8.1.3", + "@octokit/auth-oauth-user": "^5.1.3", + "@octokit/auth-unauthenticated": "^6.1.2", + "@octokit/core": "^6.1.4", + "@octokit/oauth-authorization-url": "^7.1.1", + "@octokit/oauth-methods": "^5.1.4", + "@types/aws-lambda": "^8.10.83", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-authorization-url": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.1.1.tgz", + "integrity": "sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==", + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-methods": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.5.tgz", + "integrity": "sha512-Ev7K8bkYrYLhoOSZGVAGsLEscZQyq7XQONCBBAl2JdMg7IT3PQn/y8P0KjloPoYpI5UylqYrLeUcScaYWXwDvw==", + "license": "MIT", + "dependencies": { + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/request": "^9.2.3", + "@octokit/request-error": "^6.1.8", + "@octokit/types": "^14.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/@octokit/openapi-types": { "version": "25.0.0", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.0.0.tgz", "integrity": "sha512-FZvktFu7HfOIJf2BScLKIEYjDsw6RKc7rBJCdvCTfKsVnx2GEB/Nbzjr29DUdb7vQhlzS/j8qDzdditP0OC6aw==", "license": "MIT" }, + "node_modules/@octokit/openapi-webhooks-types": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-10.4.0.tgz", + "integrity": "sha512-HMiF7FUiVBYfp8pPijMTkWuPELQB6XkPftrnSuK1C1YXaaq2+0ganiQkorEQfXTmhtwlgHJwXT6P8miVhIyjQA==", + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-graphql": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-5.2.4.tgz", + "integrity": "sha512-pLZES1jWaOynXKHOqdnwZ5ULeVR6tVVCMm+AUbp0htdcyXDU95WbkYdU4R2ej1wKj5Tu94Mee2Ne0PjPO9cCyA==", + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, "node_modules/@octokit/plugin-paginate-rest": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-12.0.0.tgz", @@ -134,6 +262,39 @@ "@octokit/core": ">=6" } }, + "node_modules/@octokit/plugin-retry": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.2.1.tgz", + "integrity": "sha512-wUc3gv0D6vNHpGxSaR3FlqJpTXGWgqmk607N9L3LvPL4QjaxDgX/1nY2mGpT37Khn+nlIXdljczkRnNdTTV3/A==", + "license": "MIT", + "dependencies": { + "@octokit/request-error": "^6.1.8", + "@octokit/types": "^14.0.0", + "bottleneck": "^2.15.3" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-throttling": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-10.0.0.tgz", + "integrity": "sha512-Kuq5/qs0DVYTHZuBAzCZStCzo2nKvVRo/TDNhCcpC2TKiOGz/DisXMCvjt3/b5kr6SCI1Y8eeeJTHBxxpFvZEg==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^14.0.0", + "bottleneck": "^2.15.3" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": "^6.1.3" + } + }, "node_modules/@octokit/request": { "version": "9.2.3", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.3.tgz", @@ -178,6 +339,35 @@ "@octokit/openapi-types": "^25.0.0" } }, + "node_modules/@octokit/webhooks": { + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-13.8.0.tgz", + "integrity": "sha512-3PCWyFBNbW2+Ox36VAkSqlPoIb96NZiPcICRYySHZrDTM2NuNxvrjPeaQDj2egqILs9EZFObRTHVMe4XxXJV7w==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-webhooks-types": "10.4.0", + "@octokit/request-error": "^6.1.7", + "@octokit/webhooks-methods": "^5.1.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/webhooks-methods": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-5.1.1.tgz", + "integrity": "sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg==", + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@types/aws-lambda": { + "version": "8.10.149", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.149.tgz", + "integrity": "sha512-NXSZIhfJjnXqJgtS7IwutqIF/SOy1Wz5Px4gUY1RWITp3AYTyuJS4xaXr/bIJY1v15XMzrJ5soGnPM+7uigZjA==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "22.15.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.2.tgz", @@ -194,6 +384,12 @@ "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==", "license": "Apache-2.0" }, + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "license": "MIT" + }, "node_modules/fast-content-type-parse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", @@ -210,6 +406,36 @@ ], "license": "MIT" }, + "node_modules/octokit": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/octokit/-/octokit-4.1.3.tgz", + "integrity": "sha512-PP+EL8h4xPCE9NBo6jXq6I2/EiTXsn1cg9F0IZehHBv/qhuQpyGMFElEB17miWKciuT6vRHiFFiG9+FoXOmg6A==", + "license": "MIT", + "dependencies": { + "@octokit/app": "^15.1.6", + "@octokit/core": "^6.1.5", + "@octokit/oauth-app": "^7.1.6", + "@octokit/plugin-paginate-graphql": "^5.2.4", + "@octokit/plugin-paginate-rest": "^12.0.0", + "@octokit/plugin-rest-endpoint-methods": "^14.0.0", + "@octokit/plugin-retry": "^7.2.1", + "@octokit/plugin-throttling": "^10.0.0", + "@octokit/request-error": "^6.1.8", + "@octokit/types": "^14.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/toad-cache": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.0.tgz", + "integrity": "sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -224,15 +450,6 @@ "node": ">=14.17" } }, - "node_modules/undici": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", - "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", @@ -240,6 +457,12 @@ "dev": true, "license": "MIT" }, + "node_modules/universal-github-app-jwt": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-2.2.2.tgz", + "integrity": "sha512-dcmbeSrOdTnsjGjUfAlqNDJrhxXizjAz94ija9Qw8YkZ1uu0d+GoZzyH+Jb9tIIqvGsadUfwg+22k5aDqqwzbw==", + "license": "MIT" + }, "node_modules/universal-user-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", diff --git a/package.json b/package.json index 8835e40..9b21391 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "tsc" }, "dependencies": { - "@octokit/action": "^7.0.2" + "octokit": "^4.1.3" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", diff --git a/src/index.ts b/src/index.ts index 65d991d..f531900 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,19 @@ -import { Octokit } from "@octokit/action"; import { readdirSync, readFileSync } from "fs"; +import { App } from "octokit"; if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { console.log("not a pull request, exiting."); process.exit(0); } -const octokit = new Octokit(); +const appId = parseInt(process.env.APP_ID!); +const privateKey = process.env.PRIVATE_KEY!; +const installationId = appId; +const clientId = process.env.CLIENT_ID!; +const clientSecret = process.env.CLIENT_SECRET!; + +const app = new App({ appId, privateKey, oauth: { clientId, clientSecret } }); +const octokit = await app.getInstallationOctokit(installationId); const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!; const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!); @@ -15,7 +22,6 @@ let body = ""; for (const file of readdirSync(".")) { if (!file.startsWith("compilation") || !file.endsWith(".log")) { - console.log(`skipping ${file}`); continue; } From 2ec44f173d995cf6ad4f1f35d1b99f292ca07c81 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:36:01 +0900 Subject: [PATCH 21/25] wrong context --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ba0662..f72aefb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: - run: node dist/index.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - APP_ID: ${{ secrets.APP_ID }} + APP_ID: ${{ env.APP_ID }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} CLIENT_ID: ${{ env.CLIENT_ID }} CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} From 0afda66274dbcbcecbb1ba9725116db16e90514a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:37:39 +0900 Subject: [PATCH 22/25] add installation id --- .github/workflows/test.yml | 1 + src/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f72aefb..da28220 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,5 +42,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APP_ID: ${{ env.APP_ID }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + INSTALLATION_ID: ${{ env.INSTALLATION_ID }} CLIENT_ID: ${{ env.CLIENT_ID }} CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} diff --git a/src/index.ts b/src/index.ts index f531900..a9babf4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) { const appId = parseInt(process.env.APP_ID!); const privateKey = process.env.PRIVATE_KEY!; -const installationId = appId; +const installationId = parseInt(process.env.INSTALLATION_ID!); const clientId = process.env.CLIENT_ID!; const clientSecret = process.env.CLIENT_SECRET!; From 54a2bde2e664cfb453bac42f9d772f99ca5cd99c Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:39:06 +0900 Subject: [PATCH 23/25] debug --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index a9babf4..15af2f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,8 @@ const installationId = parseInt(process.env.INSTALLATION_ID!); const clientId = process.env.CLIENT_ID!; const clientSecret = process.env.CLIENT_SECRET!; +console.log(appId, installationId, clientId); + const app = new App({ appId, privateKey, oauth: { clientId, clientSecret } }); const octokit = await app.getInstallationOctokit(installationId); From 95ffd25b85e4c24711358ff858d5acfcd995deae Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:42:06 +0900 Subject: [PATCH 24/25] specify environment --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da28220..66c4d15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,8 @@ jobs: needs: - compile runs-on: ubuntu-latest + environment: + name: MyEnvironment steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 From 8b17762033b58735759c9d0fe7cc698f93a8643a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sat, 26 Apr 2025 04:44:42 +0900 Subject: [PATCH 25/25] fix --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 66c4d15..87b6c45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,8 +42,8 @@ jobs: - run: node dist/index.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - APP_ID: ${{ env.APP_ID }} + APP_ID: ${{ vars.APP_ID }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - INSTALLATION_ID: ${{ env.INSTALLATION_ID }} - CLIENT_ID: ${{ env.CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + INSTALLATION_ID: ${{ vars.INSTALLATION_ID }} + CLIENT_ID: ${{ vars.CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET}}