Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit c785105

Browse files
zsioclaude
andcommitted
fix: 简化版本管理配置和修复类型错误
- 硬编码 GitHub 仓库信息,无需环境变量配置 - 简化 Dockerfile 构建参数,只保留 APP_VERSION - 简化 CI 流程,移除冗余的仓库信息注入 - 修复 wrapper.tsx 中的 TypeScript 类型推断错误 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d85248a commit c785105

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ jobs:
106106
cache-to: type=gha,mode=max
107107
build-args: |
108108
APP_VERSION=${{ github.ref_name }}
109-
GITHUB_OWNER=${{ github.repository_owner }}
110-
GITHUB_REPO=${{ github.event.repository.name }}
111109
112110
- name: 📦 Image pushed successfully
113111
run: |

deploy/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ COPY . .
1515

1616
# 接收构建参数
1717
ARG APP_VERSION=dev
18-
ARG GITHUB_OWNER
19-
ARG GITHUB_REPO
2018

2119
# 设置为环境变量供 Next.js 使用
2220
ENV NEXT_TELEMETRY_DISABLED=1
2321
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
24-
ENV NEXT_PUBLIC_GITHUB_OWNER=$GITHUB_OWNER
25-
ENV NEXT_PUBLIC_GITHUB_REPO=$GITHUB_REPO
2622

2723
RUN pnpm run build
2824

src/app/dashboard/_components/statistics/wrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ const STATISTICS_REFRESH_INTERVAL = 5000; // 5秒刷新一次
1616

1717
async function fetchStatistics(timeRange: TimeRange): Promise<UserStatisticsData> {
1818
const result = await getUserStatistics(timeRange);
19-
if (result.ok && result.data) {
20-
return result.data;
19+
if (!result.ok) {
20+
throw new Error(result.error || '获取统计数据失败');
2121
}
22-
throw new Error(result.error || '获取统计数据失败');
22+
return result.data;
2323
}
2424

2525
/**

src/lib/version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export const APP_VERSION = process.env.NEXT_PUBLIC_APP_VERSION || `v${packageJso
1111
* 用于获取最新版本
1212
*/
1313
export const GITHUB_REPO = {
14-
owner: process.env.NEXT_PUBLIC_GITHUB_OWNER || 'your-username',
15-
repo: process.env.NEXT_PUBLIC_GITHUB_REPO || 'claude-code-hub',
14+
owner: 'zsio',
15+
repo: 'claude-code-hub',
1616
};
1717

1818
/**

0 commit comments

Comments
 (0)