feat: update exclusions.json suggestions and refactor Dockerfile for improved npm installation

This commit is contained in:
2026-05-12 09:40:56 +00:00
parent 1ccc2cd560
commit 81d5e3ff13
3 changed files with 21 additions and 5 deletions
+15
View File
@@ -168,5 +168,20 @@
"role": "Aria",
"location": "entrypoint.sh",
"suggestion": "entrypoint.sh 檔案結尾已有換行符號(0x0a),符合 POSIX 慣例"
},
{
"role": "Maya",
"location": "app/main.js",
"suggestion": "main.js 整合測試需要真實 Gitea API、LLM API、git 操作,不適合單元測試。各模組已有獨立單元測試覆蓋"
},
{
"role": "Maya",
"location": "app/comments.js",
"suggestion": "comments.js 的 buildTable 為簡單字串拼接,postComment 已透過 gitea.js mock 間接測試,補測試效益低"
},
{
"role": "Maya",
"location": "app/roles.js",
"suggestion": "roles.js 依賴容器內固定路徑 /action/app/prompts/roles,單元測試環境無法存取,且邏輯為簡單 YAML 讀取與字串拼接"
}
]
+5 -4
View File
@@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.20
RUN apk add --no-cache bash nodejs npm git \
&& node --version \
@@ -7,10 +7,11 @@ RUN apk add --no-cache bash nodejs npm git \
WORKDIR /action
COPY app/package.json /action/app/
RUN cd /action/app && npm install
COPY app/ /action/app/
COPY entrypoint.sh /entrypoint.sh
RUN cd /action/app && npm install && \
chmod +x /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+1 -1
View File
@@ -3,7 +3,7 @@
"version": "1.0.0",
"type": "module",
"scripts": {
"test": "node --test git.test.js config.test.js llm.test.js"
"test": "node --test *.test.js"
},
"dependencies": {
"axios": "^1.6.7",