Skip to content

Commit 6655f79

Browse files
committed
重构
1 parent f6e43b4 commit 6655f79

18 files changed

+1811
-206
lines changed

.github/workflows/auto_generate.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/generator.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generator
2+
3+
on:
4+
push:
5+
issues:
6+
types: [opened, edited]
7+
8+
jobs:
9+
generate:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
- name: Install dependencies
23+
run: |
24+
npm install
25+
- name: Generate Data
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: |
29+
node scripts/generator.js
30+
- name: Setup Git Config
31+
run: |
32+
git config --global user.name 'github-actions[bot]'
33+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
34+
- name: Commit and Push to output branch
35+
run: |
36+
git fetch origin output || true
37+
git checkout -B output
38+
git add --all
39+
git commit -m "Update data from issues" || echo "No changes to commit"
40+
git push -f origin output

.github/workflows/label-commenter.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@ name: Label Commenter
22

33
on:
44
issues:
5-
types: [labeled, unlabeled]
6-
pull_request_target:
7-
types: [labeled, unlabeled]
8-
9-
permissions:
10-
contents: read
11-
issues: write
12-
pull-requests: write
5+
types:
6+
- labeled
7+
- unlabeled
138

149
jobs:
1510
comment:
1611
runs-on: ubuntu-latest
1712
steps:
1813
- uses: actions/checkout@v3
14+
1915
- name: Label Commenter
2016
uses: peaceiris/actions-label-commenter@v1
2117
with:
2218
github_token: ${{ secrets.GITHUB_TOKEN }}
23-
config_file: .github/configs/label-commenter-config.yml
19+
config_file: .github/configs/label-commenter-config.yml

.github/workflows/link-checker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Link Checker
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # 每天运行一次
6+
watch:
7+
types: [started] # 监听 star 事件
8+
9+
jobs:
10+
check-sites:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
actions: write
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
ref: output
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
- name: Install dependencies
26+
run: |
27+
npm install
28+
- name: Check Sites and Update Labels
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
node scripts/link_checker.js
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Theme Checker
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # 每天运行一次
6+
watch:
7+
types: [started] # 监听 star 事件
8+
9+
jobs:
10+
check-sites:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
actions: write
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
ref: output
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
- name: Install dependencies
26+
run: |
27+
npm install
28+
- name: Check Sites and Update Labels
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
node scripts/theme_checker.js

.gitignore

Lines changed: 131 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,131 @@
1-
.DS_Store
1+
.DS_Store
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
lerna-debug.log*
9+
.pnpm-debug.log*
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# Snowpack dependency directory (https://snowpack.dev/)
47+
web_modules/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Optional stylelint cache
59+
.stylelintcache
60+
61+
# Microbundle cache
62+
.rpt2_cache/
63+
.rts2_cache_cjs/
64+
.rts2_cache_es/
65+
.rts2_cache_umd/
66+
67+
# Optional REPL history
68+
.node_repl_history
69+
70+
# Output of 'npm pack'
71+
*.tgz
72+
73+
# Yarn Integrity file
74+
.yarn-integrity
75+
76+
# dotenv environment variable files
77+
.env
78+
.env.development.local
79+
.env.test.local
80+
.env.production.local
81+
.env.local
82+
83+
# parcel-bundler cache (https://parceljs.org/)
84+
.cache
85+
.parcel-cache
86+
87+
# Next.js build output
88+
.next
89+
out
90+
91+
# Nuxt.js build / generate output
92+
.nuxt
93+
dist
94+
95+
# Gatsby files
96+
.cache/
97+
# Comment in the public line in if your project uses Gatsby and not Next.js
98+
# https://nextjs.org/blog/next-9-1#public-directory-support
99+
# public
100+
101+
# vuepress build output
102+
.vuepress/dist
103+
104+
# vuepress v2.x temp and cache directory
105+
.temp
106+
.cache
107+
108+
# Docusaurus cache and generated files
109+
.docusaurus
110+
111+
# Serverless directories
112+
.serverless/
113+
114+
# FuseBox cache
115+
.fusebox/
116+
117+
# DynamoDB Local files
118+
.dynamodb/
119+
120+
# TernJS port file
121+
.tern-port
122+
123+
# Stores VSCode versions used for testing VSCode extensions
124+
.vscode-test
125+
126+
# yarn v2
127+
.yarn/cache
128+
.yarn/unplugged
129+
.yarn/build-state.yml
130+
.yarn/install-state.gz
131+
.pnp.*

0 commit comments

Comments
 (0)