feat: Add CI workflows, issue templates, examples, and prompts

This commit is contained in:
tukuaiai
2025-12-18 17:01:47 +08:00
parent 6427c15ae4
commit ecb6d7f0fa
13 changed files with 252 additions and 1881 deletions
+20 -46
View File
@@ -1,60 +1,34 @@
# .github/workflows/ci.yml
# 持续集成工作流:用于代码风格检查和链接检查
name: CI
on:
push:
branches: [main, master]
branches: [ main ]
pull_request:
branches: [main, master]
branches: [ main ]
jobs:
lint-markdown:
name: Lint Markdown
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: markdownlint '**/*.md' --ignore node_modules --ignore libs/external || true
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: markdownlint --config .github/lint_config.json '**/*.md'
check-links:
name: Check Links
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Link Checker
uses: lycheeverse/lychee-action@v1
uses: lycheeverse/lychee-action@v1.5.0
with:
args: --verbose --no-progress './**/*.md' --exclude-path libs/external
fail: false
validate-structure:
name: Validate Project Structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check required files
run: |
echo "Checking required files..."
files=("README.md" "LICENSE" "CONTRIBUTING.md" "CODE_OF_CONDUCT.md" "AGENTS.md" "CLAUDE.md")
for file in "${files[@]}"; do
if [ -f "$file" ]; then
echo "✓ $file exists"
else
echo "✗ $file missing"
fi
done
- name: Check i18n structure
run: |
echo "Checking i18n directories..."
for lang in zh en; do
if [ -d "i18n/$lang" ]; then
echo "✓ i18n/$lang exists"
else
echo "✗ i18n/$lang missing"
fi
done
args: --verbose --no-progress './**/*.md'
+14 -8
View File
@@ -1,16 +1,22 @@
name: Auto Labeler
# .github/workflows/labeler.yml
# 自动为 Pull Requests 添加标签
on:
pull_request:
types: [opened, synchronize]
name: Labeler
on: [pull_request_target]
permissions:
contents: read
pull-requests: write
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v5
- name: Checkout code
uses: actions/checkout@v3
- name: Run Labeler
uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
+16 -28
View File
@@ -1,42 +1,30 @@
name: Welcome New Contributors
# .github/workflows/welcome.yml
# 欢迎新贡献者工作流
name: Welcome First-Timers
on:
pull_request_target:
types: [opened]
issues:
types: [opened]
pull_request:
types: [opened]
permissions:
pull-requests: write
issues: write
jobs:
welcome:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
- name: Welcome new contributor
uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
👋 感谢您提交第一个 Issue
👋 你好,@${{ github.actor }}!感谢你第一次向 vibe-coding-cn 提交 Issue
我们会尽快查看。欢迎你加入我们的社区!
我们非常重视您的反馈。请确保:
- 已阅读 [贡献指南](CONTRIBUTING.md)
- 提供了足够的上下文信息
- 如果是 Bug,请提供复现步骤
我们会尽快回复您!🚀
---
Thanks for opening your first issue! We'll get back to you soon.
pr-message: |
🎉 感谢您提交第一个 Pull Request
这是您对本项目的首次贡献,我们非常感激!请确保:
- PR 描述清晰说明了改动内容
- 代码符合项目规范
- 已更新相关文档(如适用)
我们会尽快审核您的代码!💪
---
Thanks for your first PR! We'll review it soon.
👋 你好,@${{ github.actor }}!感谢你第一次向 vibe-coding-cn 提交 Pull Request
我们将仔细评审你的贡献。感谢你让这个项目变得更好!