fix(action image): 安裝 git 供前置遠端驗證使用 #7

Merged
admin merged 1 commits from develop into master 2026-06-25 15:20:51 +00:00
Member

變更摘要

  • 在 action Docker image 中安裝 git,讓前置驗證可以執行 git ls-remote 檢查遠端認證與連線。
  • 補強 git command runner 的錯誤訊息,當 image 缺少 git 時會明確提示需要安裝 git。
  • 新增測試覆蓋缺少 git 指令時的 verifyRemoteAccess 失敗訊息。

影響範圍

  • Dockerfile:調整 Alpine 套件安裝清單,新增 git
  • app/git.js:改善 spawnSync git 發生 ENOENT 時的錯誤內容。
  • app/git.test.js:新增 remote preflight 在 git 不存在時的測試案例。

驗證

  • npm test 通過:232 tests。
  • Docker build 未在本環境驗證,因為本機沒有 Docker daemon 可用。

風險與注意事項

  • image 會多安裝 git 套件,映像大小會略增。
  • 此修正針對前置驗證在 REST API token 檢查通過後,仍因缺少 git 而中止的情境。
## 變更摘要 - 在 action Docker image 中安裝 `git`,讓前置驗證可以執行 `git ls-remote` 檢查遠端認證與連線。 - 補強 git command runner 的錯誤訊息,當 image 缺少 `git` 時會明確提示需要安裝 git。 - 新增測試覆蓋缺少 git 指令時的 `verifyRemoteAccess` 失敗訊息。 ## 影響範圍 - `Dockerfile`:調整 Alpine 套件安裝清單,新增 `git`。 - `app/git.js`:改善 `spawnSync git` 發生 `ENOENT` 時的錯誤內容。 - `app/git.test.js`:新增 remote preflight 在 git 不存在時的測試案例。 ## 驗證 - `npm test` 通過:232 tests。 - Docker build 未在本環境驗證,因為本機沒有 Docker daemon 可用。 ## 風險與注意事項 - image 會多安裝 git 套件,映像大小會略增。 - 此修正針對前置驗證在 REST API token 檢查通過後,仍因缺少 git 而中止的情境。
jiantw83 added 1 commit 2026-06-25 15:20:13 +00:00
admin approved these changes 2026-06-25 15:20:48 +00:00
admin merged commit 203e74bd90 into master 2026-06-25 15:20:51 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: old-docker-actions/ai-code-review#7