Skip to content

Commit 70ae7aa

Browse files
committed
2 parents 7b67c9f + 37a5a8f commit 70ae7aa

File tree

193 files changed

+4612
-1541
lines changed

Some content is hidden

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

193 files changed

+4612
-1541
lines changed

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ config.rules['unicorn/explicit-length-check'] = 0;
1111
config.rules['unicorn/prefer-code-point'] = 0;
1212
config.rules['no-extra-boolean-cast'] = 0;
1313
config.rules['unicorn/no-useless-undefined'] = 0;
14+
config.rules['react/no-unknown-property'] = 0;
15+
config.rules['unicorn/prefer-ternary'] = 0;
1416

1517
module.exports = config;

.github/workflows/contributor-help.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Contributor Helper
22

33
on:
4-
# 🌏 Think about the planet! No need to update stats too frequently
54
schedule: [{ cron: '0 18 * * *' }]
6-
# 💡 The following line lets you run workflow manually from the action tab!
75
workflow_dispatch:
86
jobs:
97
contributor:
@@ -15,14 +13,14 @@ jobs:
1513
with:
1614
token: ${{ secrets.GH_TOKEN }}
1715
style: 'simple'
18-
update-files: 'README.md, README-zh_CN.md'
16+
update-files: 'README.md, README.zh-CN.md'
1917
update-places: '<!-- CONTRIBUTION GROUP -->/<!-- CONTRIBUTION END -->, <!-- CONTRIBUTION GROUP -->/<!-- CONTRIBUTION END -->'
2018

2119
- name: Commit and push if changed
2220
run: |-
2321
git diff
24-
git config --global user.email "[email protected]"
25-
git config --global user.name "github-actions"
22+
git config --global user.name "lobehubbot"
23+
git config --global user.email "[email protected]"
2624
git pull
2725
git add -A
2826
git commit -m "🤖 docs: Auto update contributors" || exit 0

.github/workflows/sync.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upstream Sync
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
schedule:
8+
- cron: "0 0 * * *" # every day
9+
workflow_dispatch:
10+
11+
jobs:
12+
sync_latest_from_upstream:
13+
name: Sync latest commits from upstream repo
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event.repository.fork }}
16+
17+
steps:
18+
# Step 1: run a standard checkout action
19+
- name: Checkout target repo
20+
uses: actions/checkout@v3
21+
22+
# Step 2: run the sync action
23+
- name: Sync upstream changes
24+
id: sync
25+
uses: aormsby/[email protected]
26+
with:
27+
upstream_sync_repo: lobehub/lobe-chat
28+
upstream_sync_branch: main
29+
target_sync_branch: main
30+
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
31+
32+
# Set test_mode true to run tests instead of the true action!!
33+
test_mode: false
34+
35+
# Step 3: run check
36+
- name: Sync check
37+
if: failure()
38+
uses: actions-cool/issues-helper@v3
39+
with:
40+
actions: 'create-issue'
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
title: '🚨 同步失败 | Sync Fail'
43+
body: '由于 [LobeChat][lobechat] 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,请查看[详细教程][tutorial-zh-CN]\n---\nDue to a change in the workflow file of the [LobeChat][lobechat] upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed [Tutorial][tutorial-en-US] for instructions.\n\n[lobechat]: https://github.com/lobehub/lobe-chat\n[tutorial-zh-CN]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN\n[tutorial-en-US]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN'

.github/workflows/wiki-sync.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Wiki Sync
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'docs/**'
8+
branches:
9+
- main
10+
11+
jobs:
12+
update-wiki:
13+
runs-on: ubuntu-latest
14+
name: wiki sync
15+
steps:
16+
- uses: OrlovM/Wiki-Action@v1
17+
with:
18+
path: 'docs'
19+
token: ${{ secrets.GH_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ test-output
5454
next-env.d.ts
5555
.next
5656
.env
57+
public/*.js

.i18nrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = defineConfig({
66
entry: 'locales/zh_CN',
77
entryLocale: 'zh_CN',
88
output: 'locales',
9-
outputLocales: ['en_US'],
9+
outputLocales: ['en_US', 'ru_RU'],
1010
splitToken: 2500,
1111
temperature: 0,
1212
modelName: 'gpt-3.5-turbo',

0 commit comments

Comments
 (0)