Skip to content

Commit ecaaed1

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into feat/i18n-lazy-load
2 parents 1b5dce5 + 6db0959 commit ecaaed1

File tree

117 files changed

+9252
-4501
lines changed

Some content is hidden

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

117 files changed

+9252
-4501
lines changed

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
git pull
2+
git status

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@
2121
<!--If merged, your code will serve tens of thousands of users! Please double-check the following items before submitting.-->
2222
<!--如果分支被合并,您的代码将服务于数万名用户!在提交前,请核查一下几点内容。-->
2323

24-
- [ ] 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
25-
- [ ] 👀 我的更改经过了良好的测试,**并已在上方提供了“验证步骤”和“运行截图”**。/ My changes have been well-tested, **and "Verification Steps" and "Screenshots" have been provided above**.
26-
- [ ] 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 `requirements.txt``pyproject.toml` 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in `requirements.txt` and `pyproject.toml`.
27-
- [ ] 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.
24+
- [ ] 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
25+
/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
26+
27+
- [ ] 👀 我的更改经过了良好的测试,**并已在上方提供了“验证步骤”和“运行截图”**
28+
/ My changes have been well-tested, **and "Verification Steps" and "Screenshots" have been provided above**.
29+
30+
- [ ] 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 `requirements.txt``pyproject.toml` 文件相应位置。
31+
/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in `requirements.txt` and `pyproject.toml`.
32+
33+
- [ ] 😮 我的更改没有引入恶意代码。
34+
/ My changes do not introduce malicious code.
35+
36+
- [ ] ⚠️ 我已认真阅读并理解以上所有内容,确保本次提交符合规范。
37+
/ I have read and understood all the above and confirm this PR follows the rules.
38+
39+
- [ ] 🚀 我确保本次开发**基于 dev 分支**,并将代码合并至**开发分支**(除非极其紧急,才允许合并到主分支)。
40+
/ I confirm that this development is **based on the dev branch** and will be merged into the **development branch**, unless it is extremely urgent to merge into the main branch.
41+
42+
- [ ] ⚠️ 我**没有**认真阅读以上内容,直接提交。
43+
/ I **did not** read the above carefully before submitting.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Dashboard to GitHub Pages
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs daily at midnight UTC
6+
workflow_dispatch: # Allow manual triggering
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Only allow one concurrent deployment at a time
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
28+
- name: Install dependencies
29+
working-directory: dashboard
30+
run: bun install
31+
32+
- name: Build dashboard
33+
working-directory: dashboard
34+
run: bun run build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: dashboard/dist
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PR Checklist Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
pull-requests: write
13+
issues: write
14+
15+
steps:
16+
- name: Check checklist
17+
id: check
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const body = context.payload.pull_request.body || "";
22+
const regex = /-\s*\[\s*x\s*\].*没有.*认真阅读/i;
23+
const bad = regex.test(body);
24+
core.setOutput("bad", bad);
25+
26+
- name: Close PR
27+
if: steps.check.outputs.bad == 'true'
28+
uses: actions/github-script@v7
29+
with:
30+
script: |
31+
const pr = context.payload.pull_request;
32+
33+
await github.rest.issues.createComment({
34+
owner: context.repo.owner,
35+
repo: context.repo.repo,
36+
issue_number: pr.number,
37+
body: `检测到你勾选了“我没有认真阅读”,PR 已关闭。`
38+
});
39+
40+
await github.rest.pulls.update({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
pull_number: pr.number,
44+
state: "closed"
45+
});

.github/workflows/smoke_test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
branches:
66
- master
77
paths-ignore:
8-
- 'README*.md'
9-
- 'changelogs/**'
10-
- 'dashboard/**'
8+
- "README*.md"
9+
- "changelogs/**"
10+
- "dashboard/**"
1111
pull_request:
1212
workflow_dispatch:
1313

@@ -16,7 +16,7 @@ jobs:
1616
name: Run smoke tests
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 10
19-
19+
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v6
@@ -26,8 +26,8 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: '3.12'
30-
29+
python-version: "3.12"
30+
3131
- name: Install UV package manager
3232
run: |
3333
pip install uv
@@ -40,6 +40,9 @@ jobs:
4040
- name: Run smoke tests
4141
run: |
4242
uv run main.py &
43+
# uv tool install -e . --force
44+
# astrbot init -y
45+
# astrbot run --backend-only &
4346
APP_PID=$!
4447
4548
echo "Waiting for application to start..."

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ GenieData/
6161
.codex/
6262
.opencode/
6363
.kilocode/
64+
.serena
6465
.worktrees/
65-

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.12

0 commit comments

Comments
 (0)