Skip to content

Commit f9899d2

Browse files
committed
Merge remote-tracking branch 'origin/master' into leonforcode/master
2 parents 0f309c8 + e286da7 commit f9899d2

File tree

155 files changed

+6625
-1722
lines changed

Some content is hidden

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

155 files changed

+6625
-1722
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
### Modifications / 改动点
55

6-
<!--请总结你的改动:哪些核心文件被修改了?实现了什么功能?-->
76
<!--Please summarize your changes: What core files were modified? What functionality was implemented?-->
7+
<!--请总结你的改动:哪些核心文件被修改了?实现了什么功能?-->
88

99
- [x] This is NOT a breaking change. / 这不是一个破坏性变更。
1010
<!-- If your changes is a breaking change, please uncheck the checkbox above -->
@@ -21,7 +21,14 @@
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+
- [ ] 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
25+
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
26+
27+
- [ ] 👀 My changes have been well-tested, **and "Verification Steps" and "Screenshots" have been provided above**.
28+
/ 我的更改经过了良好的测试,**并已在上方提供了“验证步骤”和“运行截图”**
29+
30+
- [ ] 🤓 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`.
31+
/ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 `requirements.txt``pyproject.toml` 文件相应位置。
32+
33+
- [ ] 😮 My changes do not introduce malicious code.
34+
/ 我的更改没有引入恶意代码。

.github/workflows/coverage_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
pytest --cov=astrbot -v -o log_cli=true -o log_level=DEBUG
4141
4242
- name: Upload results to Codecov
43+
if: github.repository == 'AstrBotDevs/AstrBot'
4344
uses: codecov/codecov-action@v5
4445
with:
4546
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/dashboard_ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
build:
11+
if: github.repository == 'AstrBotDevs/AstrBot'
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout repository
@@ -45,7 +46,7 @@ jobs:
4546
4647
- name: Create GitHub Release
4748
if: github.event_name == 'push'
48-
uses: ncipollo/release-action@v1.20.0
49+
uses: ncipollo/release-action@v1.21.0
4950
with:
5051
tag: release-${{ github.sha }}
5152
owner: AstrBotDevs

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build-nightly-image:
14-
if: github.event_name == 'schedule'
14+
if: github.repository == 'AstrBotDevs/AstrBot' && github.event_name == 'schedule'
1515
runs-on: ubuntu-latest
1616
env:
1717
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -109,7 +109,7 @@ jobs:
109109
run: echo "Test Docker image has been built and pushed successfully"
110110

111111
build-release-image:
112-
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
112+
if: github.repository == 'AstrBotDevs/AstrBot' && (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')))
113113
runs-on: ubuntu-latest
114114
env:
115115
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: PR Title Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
title-format:
9+
if: github.repository == 'AstrBotDevs/AstrBot'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
issues: write
14+
15+
steps:
16+
- name: Validate PR title
17+
uses: actions/github-script@v8
18+
with:
19+
script: |
20+
const title = (context.payload.pull_request.title || "").trim();
21+
// allow only:
22+
// feat: xxx
23+
// feat(scope): xxx
24+
const pattern = /^(feat)(\([a-z0-9-]+\))?:\s.+$/i;
25+
const isValid = pattern.test(title);
26+
const isSameRepo =
27+
context.payload.pull_request.head.repo.full_name === context.payload.repository.full_name;
28+
29+
if (!isValid) {
30+
if (isSameRepo) {
31+
try {
32+
await github.rest.issues.createComment({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
issue_number: context.payload.pull_request.number,
36+
body: [
37+
"⚠️ PR title format check failed.",
38+
"Required formats:",
39+
"- `feat: xxx`",
40+
"- `feat(scope): xxx`",
41+
"Please update your PR title and push again."
42+
].join("\n")
43+
});
44+
} catch (e) {
45+
core.warning(`Failed to post PR title comment: ${e.message}`);
46+
}
47+
} else {
48+
core.warning("Fork PR: comment permission is restricted; skip posting review comment.");
49+
}
50+
}
51+
52+
if (!isValid) {
53+
core.setFailed("Invalid PR title. Expected format: feat: xxx or feat(scope): xxx.");
54+
}

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ permissions:
2020
jobs:
2121
build-dashboard:
2222
name: Build Dashboard
23+
if: github.repository == 'AstrBotDevs/AstrBot'
2324
runs-on: ubuntu-24.04
2425
env:
2526
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
@@ -50,7 +51,7 @@ jobs:
5051
echo "tag=$tag" >> "$GITHUB_OUTPUT"
5152
5253
- name: Setup pnpm
53-
uses: pnpm/action-setup@v4.3.0
54+
uses: pnpm/action-setup@v4.4.0
5455
with:
5556
version: 10.28.2
5657

@@ -104,6 +105,7 @@ jobs:
104105
105106
publish-release:
106107
name: Publish GitHub Release
108+
if: github.repository == 'AstrBotDevs/AstrBot'
107109
runs-on: ubuntu-24.04
108110
needs:
109111
- build-dashboard
@@ -183,6 +185,7 @@ jobs:
183185
184186
publish-pypi:
185187
name: Publish PyPI
188+
if: github.repository == 'AstrBotDevs/AstrBot'
186189
runs-on: ubuntu-24.04
187190
needs:
188191
- publish-release

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818

1919
jobs:
2020
stale:
21+
if: github.repository == 'AstrBotDevs/AstrBot'
2122
runs-on: ubuntu-latest
2223
permissions:
2324
issues: write

.github/workflows/sync-wiki.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818

1919
jobs:
2020
sync:
21+
if: github.repository == 'AstrBotDevs/AstrBot'
2122
runs-on: ubuntu-latest
2223
permissions:
2324
contents: read

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For users who want to quickly experience AstrBot, are familiar with command-line
7878
```bash
7979
uv tool install astrbot
8080
astrbot init # Only execute this command for the first time to initialize the environment
81-
astrbot
81+
astrbot run
8282
```
8383

8484
> Requires [uv](https://docs.astral.sh/uv/) to be installed.

README_fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Pour les utilisateurs qui veulent découvrir AstrBot rapidement, qui sont famili
7878
```bash
7979
uv tool install astrbot
8080
astrbot init # Exécutez cette commande uniquement la première fois pour initialiser l'environnement
81-
astrbot
81+
astrbot run
8282
```
8383

8484
> [uv](https://docs.astral.sh/uv/) doit être installé.

0 commit comments

Comments
 (0)