diff --git a/src-tauri/src/commands/cicd.rs b/src-tauri/src/commands/cicd.rs index a804fa0..30a3349 100644 --- a/src-tauri/src/commands/cicd.rs +++ b/src-tauri/src/commands/cicd.rs @@ -357,8 +357,8 @@ jobs: - name: DeepSeek Code Review env: DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} - GITEA_URL: ${{ secrets.GITEA_URL }} + LJ_TOKEN: ${{ secrets.LJ_TOKEN }} + LJ_URL: ${{ secrets.LJ_URL }} PR_NUMBER: ${{ github.event.pull_request.number }} BASE_SHA: ${{ github.event.pull_request.base.sha }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} @@ -368,8 +368,8 @@ jobs: import os, sys, json, urllib.request, subprocess api_key = os.environ["DEEPSEEK_API_KEY"] - token = os.environ["GITEA_TOKEN"] - base_url = os.environ["GITEA_URL"].rstrip("/") + token = os.environ["LJ_TOKEN"] + base_url = os.environ["LJ_URL"].rstrip("/") pr_num = os.environ["PR_NUMBER"] base_sha = os.environ["BASE_SHA"] head_sha = os.environ["HEAD_SHA"] @@ -429,8 +429,8 @@ diff: let secrets = vec![ "DEEPSEEK_API_KEY".to_string(), - "GITEA_TOKEN".to_string(), - "GITEA_URL".to_string(), + "LJ_TOKEN".to_string(), + "LJ_URL".to_string(), ]; (content, "ai-review.yml".to_string(), secrets) } @@ -497,7 +497,7 @@ mod tests { assert!(content.contains("deepseek-chat"), "缺少模型名称"); assert_eq!(filename, "ai-review.yml"); assert!(secrets.contains(&"DEEPSEEK_API_KEY".to_string())); - assert!(secrets.contains(&"GITEA_TOKEN".to_string())); - assert!(secrets.contains(&"GITEA_URL".to_string())); + assert!(secrets.contains(&"LJ_TOKEN".to_string())); + assert!(secrets.contains(&"LJ_URL".to_string())); } } diff --git a/src/components/dashboard/CicdModal.tsx b/src/components/dashboard/CicdModal.tsx index fc68fca..6076c89 100644 --- a/src/components/dashboard/CicdModal.tsx +++ b/src/components/dashboard/CicdModal.tsx @@ -232,8 +232,8 @@ export function CicdModal({
需要在 Gitea 仓库 Settings → Secrets 配置:
DEEPSEEK_API_KEY — DeepSeek API 密钥
GITEA_TOKEN — 有 issue comment 权限的访问令牌
GITEA_URL — 你的 Gitea 实例地址,如 http://192.168.x.x:3000
LJ_TOKEN — Gitea 访问令牌(需 issue 评论权限)
LJ_URL — Gitea 实例地址,如 http://192.168.x.x:3000