Compare commits

...
Author SHA1 Message Date
jiantw83 73edbfcc17 feat(CI 工作流程): 新增 AI 程式碼審查步驟
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Successful in 36s
CI / 3. RESULT (pull_request) Has been skipped
2026-07-11 06:27:06 +00:00
admin 91f012e7a1 Merge pull request 'fix(calculate-version): 統一輸出訊息格式與 README 說明' (#5) from ai-review-resolve/develop-20260711-141530 into develop
Reviewed-on: #5
2026-07-11 06:24:50 +00:00
jiantw83 84ea25ef11 fix(CI 工作流程): 修正結果 job 的條件判斷
CI / 1. BUILD (pull_request) Successful in 1s
CI / 2. TEST (pull_request) Successful in 3s
CI / 3. RESULT (pull_request) Has been skipped
2026-07-11 06:24:24 +00:00
jiantw83 7a71cddc80 docs(README): 重建專案說明
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Successful in 3s
CI / 3. RESULT (pull_request) Successful in 2s
2026-07-11 06:21:24 +00:00
jiantw83 9127f26fd8 fix(calculate-version): 統一輸出訊息格式 2026-07-11 06:21:24 +00:00
jiantw83 34b0699e2b fix(CD 工作流程): 改為以 refname 排序選取 tag
CI / 1. BUILD (pull_request) Successful in 1s
CI / 2. TEST (pull_request) Successful in 1s
CI / 3. RESULT (pull_request) Successful in 1s
2026-07-11 06:00:09 +00:00
jiantw83 8d6672e5a3 fix(CD 工作流程): 改為選取包含 commit 的最新 tag
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Successful in 1s
CI / 3. RESULT (pull_request) Successful in 1s
2026-07-11 05:54:50 +00:00
4 changed files with 57 additions and 3 deletions
+11
View File
@@ -38,10 +38,21 @@ jobs:
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v${{ env.VERSION }} uses: https://gitea.jsc.idv.tw/actions/calculate-version@v${{ env.VERSION }}
with: with:
is_beta: ${{ env.IS_BETA == "true" }} is_beta: ${{ env.IS_BETA == "true" }}
- name: Setup LLM CLI
uses: https://gitea.jsc.idv.tw/actions/setup-${{ vars.ACTION_SETUP_LLM_CLI }}
with:
oauth: ${{ secrets.LLM_OAUTH }}
- name: Run AI Code Review
id: ai-code-review
uses: https://gitea.jsc.idv.tw/actions/ai-code-review@${{ vars.ACTION_AI_CODE_REVIEW_VERSION }}
with:
token: ${{ secrets.TOKEN }}
model: ${{ vars.LLM_NAME }}
result: result:
name: 3. RESULT name: 3. RESULT
runs-on: ubuntu runs-on: ubuntu
needs: [build,test] needs: [build,test]
if: ${{ needs.build.outputs.is_beta == 'false' }}
env: env:
VERSION: ${{ needs.test.outputs.version }} VERSION: ${{ needs.test.outputs.version }}
IS_BETA: ${{ needs.build.outputs.is_beta }} IS_BETA: ${{ needs.build.outputs.is_beta }}
+1 -1
View File
@@ -16,6 +16,6 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Get Commit Tag - name: Get Commit Tag
id: commit id: commit
run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT run: echo "tag=$(git for-each-ref --sort=-refname --format='%(refname:strip=2)' refs/tags --contains ${{ env.COMMIT_SHA }} | head -n 1)" >> $GITEA_OUTPUT
- name: Show Tag - name: Show Tag
run: echo "${{ steps.commit.outputs.tag }}" run: echo "${{ steps.commit.outputs.tag }}"
+37
View File
@@ -0,0 +1,37 @@
# calculate-version
更新時間:2026/07/11 14:03:52Asia/Taipei
這個專案是一個 Gitea Docker action,會讀取 repository 的 release 清單,計算下一個正式版或 beta 版本號,並將結果輸出成 action output。
## 專案列表
### 專案描述表
| 專案名稱 | 專案描述 |
| --- | --- |
| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 這是一個用來計算 Gitea release 下一版版本號的 Node.js action,支援正式版與 beta 版推算。 |
### 參考專案表
| 專案名稱 | 參考專案列表 |
| --- | --- |
| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 無 |
### NuGet 套件表
| 專案名稱 | NuGet 套件列表 |
| --- | --- |
| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 無 |
## 功能列表
### calculate-version
| 功能名稱 | 功能描述 |
| --- | --- |
| 無 | 此專案未公開可列入 README 的功能。 |
## 使用範例
此專案目前沒有可對外列入 README 的公開方法,因此沒有對應的使用範例。
+8 -2
View File
@@ -4,13 +4,19 @@ const https = require('https');
const { URL } = require('url'); const { URL } = require('url');
const RELEASES_PER_PAGE = 10; const RELEASES_PER_PAGE = 10;
let currentStage = null;
function section(title) { function section(title) {
process.stdout.write(`\n==================================================\n${title}\n--------------------------------------------------\n`); currentStage = title;
} }
function info(message) { function info(message) {
process.stdout.write(`[info] ${message}\n`); const timestamp = new Date()
.toLocaleString('sv-SE', { timeZone: 'Asia/Taipei', hour12: false })
.replace(/-/g, '/');
const stagePrefix = currentStage ? `[${currentStage}]` : '';
process.stdout.write(`${stagePrefix}[INF][${timestamp}]: ${message}\n`);
} }
function fail(message) { function fail(message) {