docs(doc-funcs): 補齊 action 與 workflow 文件
node-actions/template: CI / BUILD (pull_request) Successful in 5s
CI / TEST (Codex) (pull_request) Failing after 28s
CI / TEST (Claude) (pull_request) Failing after 27s
CI / TEST (Antigravity) (pull_request) Failing after 34s

This commit is contained in:
Jeffery
2026-07-17 18:54:00 +08:00
parent 3fea48472f
commit 3fe643c003
5 changed files with 178 additions and 80 deletions
+25 -25
View File
@@ -1,53 +1,53 @@
# =====================================================
# 用途 : AI 多角色 code review:攻擊方找問題、防守方裁決誤報,結果留言到 PR 並保存 findings
# 更新時間: 2026/07/17 16:49:21
# =====================================================
# ============================================================================
# 用途:定義 AI Code Review Node action 的名稱、輸入參數與 Node.js 24 進入點,供 Gitea / GitHub workflow 以 uses 引用。
# 更新時間2026/07/17 18:49:58
# ============================================================================
# Gitea / GitHub node action 的 manifestaction.yml):
# 定義本 action 的名稱、說明、輸入參數(inputs)與執行方式(runs),
# 供呼叫端 workflow 以 `uses:` 引用;runner 讀取此檔後以 node24 執行 src/index.js。
# action 顯示名稱:呼叫端 workflow log 與 marketplace 列表上看到的名稱
# action 顯示名稱:呼叫端 workflow log 與 marketplace 列表上看到的名稱
name: 'AI Code Review'
# action 用途說明:多角色 AI code review 流程(攻擊方找問題、防守方裁決誤報),
# 審查結果會留言到 PR 並保存 findings.gitea/ai-review/findings/
# 審查結果會留言到 PR 並保存 findings.gitea/ai-review/findings/
description: 'AI 多角色 code review:攻擊方找問題、防守方裁決誤報,結果留言到 PR 並保存 findings'
# action 作者資訊(僅供辨識,不影響執行)
# action 作者資訊(僅供辨識,不影響執行)
author: 'Jeffery'
# 輸入參數區塊:呼叫端 workflow 以 `with:` 傳入,
# runner 會自動注入為 INPUT_* 環境變數(例如 INPUT_TOKEN、INPUT_MODEL、INPUT_CREATE-ISSUE)供主程式讀取
# runner 會自動注入為 INPUT_* 環境變數(例如 INPUT_TOKEN、INPUT_MODEL、INPUT_CREATE-ISSUE)供主程式讀取
inputs:
# Gitea API token:用於對 PR 留言審查結果、以及 push 審查結果檔回 repo
# Gitea API token:用於對 PR 留言審查結果、以及 push 審查結果檔回 repo
token:
# 參數用途說明:secrets/vars context 在 action 內不可用,
# 故由呼叫端 workflow 以 secrets.GITHUB_TOKEN 傳入
# 故由呼叫端 workflow 以 secrets.GITHUB_TOKEN 傳入
description: 'Gitea API tokenPR 留言與 push findings 用;呼叫端以 secrets.GITHUB_TOKEN 傳入)'
# 必填:缺少 token 無法呼叫 Gitea APIaction 無法運作
# 必填:缺少 token 無法呼叫 Gitea APIaction 無法運作
required: true
# 指定 AI 工具使用的模型名稱
# 指定 AI 工具使用的模型名稱
model:
# 參數用途說明:留空表示使用各 AI 工具自身的預設模型
# 參數用途說明:留空表示使用各 AI 工具自身的預設模型
description: '指定 AI 工具使用的模型(空值=各工具預設)'
# 選填:未指定時採用預設值
# 選填:未指定時採用預設值
required: false
# 預設為空字串,代表不覆寫各工具的預設模型
# 預設為空字串,代表不覆寫各工具的預設模型
default: ''
# 建問題模式開關:是否把審查保留的問題另建 issue 追蹤
# 建問題模式開關:是否把審查保留的問題另建 issue 追蹤
create-issue:
# 參數用途說明:字串 'true' 時建立 issue(標題=PR 標題、描述=PR 描述、AI 挑標籤)
# 參數用途說明:字串 'true' 時建立 issue(標題=PR 標題、描述=PR 描述、AI 挑標籤)
# 並逐條留言問題明細,findings 檔不進版控、收尾只 commit exclusions.json
# 預設 'false' 走原流程(findings 檔與 exclusions.json 一併 commit 回 PR 來源分支)
# 預設 'false' 走原流程(findings 檔與 exclusions.json 一併 commit 回 PR 來源分支)
description: '是否將問題建到存取庫的問題追蹤(true 時建立 issue 逐條留言問題明細,最後只 commit exclusions.json;預設 false 走原流程)'
# 選填:未指定時採用預設值
# 選填:未指定時採用預設值
required: false
# 預設為字串 'false',代表不啟用建問題模式(主程式只認字串 'true' 才啟用)
# 預設為字串 'false',代表不啟用建問題模式(主程式只認字串 'true' 才啟用)
default: 'false'
# 執行方式區塊:宣告本 action 為 node action 及其進入點
# 執行方式區塊:宣告本 action 為 node action 及其進入點
runs:
# 以 Node.js 24 runtime 直接在 runner 上執行(非 Docker 容器、非 composite
# 以 Node.js 24 runtime 直接在 runner 上執行(非 Docker 容器、非 composite
using: 'node24'
# 主程式進入點:直接指向 src/index.jsentry point
# 主程式進入點:直接指向 src/index.jsentry point
# 主程式為零外部相依(package.json 無 dependenciessrc 僅 require Node 內建模組與本地 lib),
# runner 不會自動 npm install,零相依時依 node action 慣例 main 直接指向 src/index.js 即正確;
# 日後若新增外部相依,需改以 @vercel/ncc 打包(package.json 已備有 build script
# 並將 main 改指 dist/index.js、把 dist/ commit 進 repo
# 日後若新增外部相依,需改以 @vercel/ncc 打包(package.json 已備有 build script
# 並將 main 改指 dist/index.js、把 dist/ commit 進 repo
main: 'src/index.js'