Skip to content

Commit 7dd6f27

Browse files
author
Developer
committed
init
0 parents  commit 7dd6f27

File tree

107 files changed

+21169
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+21169
-0
lines changed

.claude/commands/add-doc.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
给代码加注释 $FILE_NAME
2+
1.每一行代码上方加上注释
3+
2.注释内容需要简洁,使用中文

.claude/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{
5+
"name": "Expo Dev Server",
6+
"runtimeExecutable": "node",
7+
"runtimeArgs": ["C:\\nvm4w\\nodejs\\node_modules\\npm\\bin\\npm-cli.js", "run", "start"],
8+
"port": 8081
9+
}
10+
]
11+
}

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EXPO_PUBLIC_SENTRY_DSN=https://bdb940f3a950ee46ce8ba651dee9b433@o4511094585819136.ingest.de.sentry.io/4511094601810000
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Bug 报告
2+
description: 报告一个 Bug
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
感谢你提交 Bug 报告!请尽量填写完整信息,帮助我们更快定位问题。
9+
10+
- type: dropdown
11+
id: platform
12+
attributes:
13+
label: 运行平台
14+
options:
15+
- Android(Dev Build)
16+
- Android(Expo Go)
17+
- iOS(Dev Build)
18+
- iOS(Expo Go)
19+
- Web
20+
validations:
21+
required: true
22+
23+
- type: dropdown
24+
id: category
25+
attributes:
26+
label: 问题分类
27+
options:
28+
- 视频播放
29+
- 直播
30+
- 弹幕
31+
- 登录 / 账号
32+
- 下载
33+
- UI / 界面
34+
- 其他
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: description
40+
attributes:
41+
label: 问题描述
42+
placeholder: 请描述你遇到的问题...
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: steps
48+
attributes:
49+
label: 复现步骤
50+
placeholder: |
51+
1. 打开 App
52+
2. 点击 ...
53+
3. 发现 ...
54+
validations:
55+
required: true
56+
57+
- type: textarea
58+
id: expected
59+
attributes:
60+
label: 期望行为
61+
placeholder: 你期望发生什么?
62+
63+
- type: textarea
64+
id: logs
65+
attributes:
66+
label: 错误日志 / 截图
67+
description: 如有控制台报错或截图,请粘贴在此
68+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 使用问题 / 求助
4+
url: https://github.com/tiajinsha/JKVideo/discussions
5+
about: 使用上的疑问请到 Discussions 提问
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 功能建议
2+
description: 建议一个新功能或改进
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
感谢你的建议!在提交前请先搜索现有 Issue,避免重复。
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: 需求背景
14+
placeholder: 这个功能解决了什么问题?目前的痛点是什么?
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: 建议方案
22+
placeholder: 你期望的功能是怎样的?
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: 替代方案
30+
placeholder: 你是否考虑过其他方案?
31+
32+
- type: dropdown
33+
id: contribute
34+
attributes:
35+
label: 是否愿意提交 PR?
36+
options:
37+
- 是,我愿意实现这个功能
38+
- 否,希望维护者实现
39+
- 不确定
40+
validations:
41+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## 改动说明
2+
3+
> 简要描述本次 PR 做了什么
4+
5+
## 改动类型
6+
7+
- [ ] Bug 修复
8+
- [ ] 新功能
9+
- [ ] 重构(不改变功能)
10+
- [ ] 文档更新
11+
- [ ] 其他:
12+
13+
## 关联 Issue
14+
15+
> 关闭 #(Issue 编号)
16+
17+
## 测试平台
18+
19+
- [ ] Android(Dev Build)
20+
- [ ] Android(Expo Go)
21+
- [ ] iOS
22+
- [ ] Web
23+
24+
## 截图 / 录屏(如适用)
25+
26+
## 注意事项
27+
28+
- [ ] 代码中无硬编码账号信息(SESSDATA、uid 等)
29+
- [ ] Commit 信息符合 Conventional Commits 规范
30+
- [ ] 已在本地测试通过
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Auto Close Invalid Issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
check-issue:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- uses: actions/github-script@v7
14+
env:
15+
ABUSIVE_WORDS: ${{ secrets.ABUSIVE_WORDS }}
16+
with:
17+
script: |
18+
const { owner, repo } = context.repo;
19+
const issue_number = context.payload.issue.number;
20+
const title = (context.payload.issue.title || '').toLowerCase();
21+
const body = (context.payload.issue.body || '').toLowerCase();
22+
const text = title + ' ' + body;
23+
24+
// --- 第一层:攻击性内容(词库存于 Secret: ABUSIVE_WORDS,逗号分隔)---
25+
const abusiveWords = (process.env.ABUSIVE_WORDS || '').split(',').map(w => w.trim()).filter(Boolean);
26+
const isAbusive = abusiveWords.some(w => w && text.includes(w.toLowerCase()));
27+
28+
if (isAbusive) {
29+
await github.rest.issues.createComment({
30+
owner, repo, issue_number,
31+
body: [
32+
'你好,',
33+
'',
34+
'此 Issue 包含不文明内容,已自动关闭。',
35+
'',
36+
'我们欢迎任何建设性的反馈,但请保持礼貌和尊重。',
37+
'如有 Bug 或功能建议,请使用官方模板重新提交,谢谢。',
38+
].join('\n'),
39+
});
40+
await github.rest.issues.update({
41+
owner, repo, issue_number,
42+
state: 'closed',
43+
state_reason: 'not_planned',
44+
});
45+
await github.rest.issues.addLabels({
46+
owner, repo, issue_number,
47+
labels: ['invalid'],
48+
});
49+
return;
50+
}
51+
52+
// --- 第二层:未走模板 ---
53+
const templateMarkers = [
54+
'### 运行平台',
55+
'### 问题描述',
56+
'### 复现步骤',
57+
'### 需求背景',
58+
'### 建议方案',
59+
];
60+
const isFromTemplate = templateMarkers.some(m => body.includes(m.toLowerCase()));
61+
62+
if (!isFromTemplate) {
63+
await github.rest.issues.createComment({
64+
owner, repo, issue_number,
65+
body: [
66+
'感谢你的反馈!',
67+
'',
68+
'此 Issue 未按照模板填写,已自动关闭。',
69+
'',
70+
'请使用以下方式重新提交:',
71+
'- 🐛 **Bug 报告** → 使用 [Bug 报告模板](../../issues/new?template=bug_report.yml)',
72+
'- 💡 **功能建议** → 使用 [功能建议模板](../../issues/new?template=feature_request.yml)',
73+
'- 💬 **使用咨询** → 前往 [Discussions](../../discussions) 提问',
74+
].join('\n'),
75+
});
76+
await github.rest.issues.update({
77+
owner, repo, issue_number,
78+
state: 'closed',
79+
state_reason: 'not_planned',
80+
});
81+
await github.rest.issues.addLabels({
82+
owner, repo, issue_number,
83+
labels: ['invalid'],
84+
});
85+
}

.github/workflows/release.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Release APK
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Setup Node 20
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Bump version
32+
id: bump
33+
run: |
34+
NEW_VERSION=$(node scripts/bump-version.js)
35+
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
36+
37+
- name: Commit version bump
38+
run: |
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
git add app.json package.json
42+
git commit -m "chore: bump version to v${{ steps.bump.outputs.version }} [skip ci]"
43+
git push
44+
45+
- name: Setup Java 17
46+
uses: actions/setup-java@v4
47+
with:
48+
distribution: 'temurin'
49+
java-version: '17'
50+
51+
- name: Setup Android SDK
52+
uses: android-actions/setup-android@v3
53+
54+
- name: Expo Prebuild
55+
run: npx expo prebuild --platform android --no-install
56+
57+
- name: Grant Gradle execute permission
58+
run: chmod +x android/gradlew
59+
60+
- name: Build Release APK
61+
env:
62+
SENTRY_DISABLE_AUTO_UPLOAD: 'true'
63+
run: |
64+
cd android
65+
./gradlew assembleRelease --no-daemon
66+
67+
- name: Create GitHub Release
68+
env:
69+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
run: |
71+
gh release create "v${{ steps.bump.outputs.version }}" \
72+
--title "JKVideo v${{ steps.bump.outputs.version }}" \
73+
--generate-notes \
74+
android/app/build/outputs/apk/release/app-release.apk

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
.kotlin/
14+
*.orig.*
15+
*.jks
16+
*.p8
17+
*.p12
18+
*.key
19+
*.mobileprovision
20+
21+
# Metro
22+
.metro-health-check*
23+
24+
# debug
25+
npm-debug.*
26+
yarn-debug.*
27+
yarn-error.*
28+
29+
# macOS
30+
.DS_Store
31+
*.pem
32+
33+
# local env files
34+
.env*.local
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
# generated native folders
40+
/ios
41+
/android
42+
43+
# git worktrees
44+
.worktrees/
45+
46+
# Internal AI instructions & planning docs
47+
CLAUDE.md
48+
docs/
49+
feature.md
50+
livePlan.md
51+
Promotion.md
52+
wordsFilter.md
53+
.env.local
54+
reactBilibiliApp.zip

0 commit comments

Comments
 (0)