mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
feat: pr validation
This commit is contained in:
272
docs/community/HOW_TO_MIGRATE_YOUR_PR.md
Normal file
272
docs/community/HOW_TO_MIGRATE_YOUR_PR.md
Normal file
@@ -0,0 +1,272 @@
|
||||
# 🔄 How to Migrate Your PR to the New Format
|
||||
|
||||
**Language:** [English](HOW_TO_MIGRATE_YOUR_PR.md) | [中文](HOW_TO_MIGRATE_YOUR_PR.zh-CN.md)
|
||||
|
||||
This guide helps you migrate your existing PR to meet the new PR management system requirements.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Why Migrate?
|
||||
|
||||
While your existing PR **will still be reviewed and merged** under current standards, migrating it to the new format gives you:
|
||||
|
||||
✅ **Faster reviews** - Automated checks catch issues early
|
||||
✅ **Better feedback** - Clear, actionable feedback from CI
|
||||
✅ **Higher quality** - Consistent code standards
|
||||
✅ **Learning** - Understand our new contribution workflow
|
||||
|
||||
---
|
||||
|
||||
## ⚡ Quick Check (Recommended)
|
||||
|
||||
### Step 1: Analyze Your PR
|
||||
|
||||
```bash
|
||||
# Run the PR health check (reads only, doesn't modify anything)
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
This will analyze your PR and tell you:
|
||||
- ✅ What's good
|
||||
- ⚠️ What needs attention
|
||||
- 💡 How to fix issues
|
||||
- 📊 Overall health score
|
||||
|
||||
### Step 2: Fix Issues
|
||||
|
||||
Based on the suggestions, fix the issues manually. Common fixes:
|
||||
|
||||
```bash
|
||||
# Rebase on latest dev
|
||||
git fetch upstream && git rebase upstream/dev
|
||||
|
||||
# Format Go code
|
||||
go fmt ./...
|
||||
|
||||
# Run tests
|
||||
go test ./...
|
||||
|
||||
# Format frontend code
|
||||
cd web && npm run lint -- --fix
|
||||
```
|
||||
|
||||
### Step 3: Run Check Again
|
||||
|
||||
```bash
|
||||
# Verify all issues are fixed
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
### Step 4: Push Changes
|
||||
|
||||
```bash
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
### What the Script Does
|
||||
|
||||
1. ✅ Syncs with latest `upstream/dev`
|
||||
2. ✅ Rebases your changes
|
||||
3. ✅ Formats Go code (`go fmt`)
|
||||
4. ✅ Runs Go linting (`go vet`)
|
||||
5. ✅ Runs tests
|
||||
6. ✅ Formats frontend code (if applicable)
|
||||
7. ✅ Pushes changes to your PR
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Manual Migration (Step by Step)
|
||||
|
||||
If you prefer to do it manually:
|
||||
|
||||
### Step 1: Sync with Upstream
|
||||
|
||||
```bash
|
||||
# Add upstream if not already added
|
||||
git remote add upstream https://github.com/tinkle-community/nofx.git
|
||||
|
||||
# Fetch latest changes
|
||||
git fetch upstream
|
||||
|
||||
# Rebase your branch
|
||||
git checkout <your-pr-branch>
|
||||
git rebase upstream/dev
|
||||
```
|
||||
|
||||
### Step 2: Backend Checks (Go)
|
||||
|
||||
```bash
|
||||
# Format Go code
|
||||
go fmt ./...
|
||||
|
||||
# Run linting
|
||||
go vet ./...
|
||||
|
||||
# Run tests
|
||||
go test ./...
|
||||
|
||||
# If you made changes, commit them
|
||||
git add .
|
||||
git commit -m "chore: format and fix backend issues"
|
||||
```
|
||||
|
||||
### Step 3: Frontend Checks (if applicable)
|
||||
|
||||
```bash
|
||||
cd web
|
||||
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Fix linting issues
|
||||
npm run lint -- --fix
|
||||
|
||||
# Check types
|
||||
npm run type-check
|
||||
|
||||
# Test build
|
||||
npm run build
|
||||
|
||||
cd ..
|
||||
|
||||
# Commit any fixes
|
||||
git add .
|
||||
git commit -m "chore: fix frontend issues"
|
||||
```
|
||||
|
||||
### Step 4: Update PR Title (if needed)
|
||||
|
||||
Ensure your PR title follows [Conventional Commits](https://www.conventionalcommits.org/):
|
||||
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
Examples:
|
||||
feat(exchange): add OKX integration
|
||||
fix(trader): resolve position tracking bug
|
||||
docs(readme): update installation guide
|
||||
```
|
||||
|
||||
**Types:**
|
||||
- `feat` - New feature
|
||||
- `fix` - Bug fix
|
||||
- `docs` - Documentation
|
||||
- `refactor` - Code refactoring
|
||||
- `perf` - Performance improvement
|
||||
- `test` - Test updates
|
||||
- `chore` - Build/config changes
|
||||
- `security` - Security improvements
|
||||
|
||||
### Step 5: Push Changes
|
||||
|
||||
```bash
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📋 Checklist
|
||||
|
||||
After migrating, verify:
|
||||
|
||||
- [ ] PR is rebased on latest `dev`
|
||||
- [ ] No merge conflicts
|
||||
- [ ] Backend tests pass locally
|
||||
- [ ] Frontend builds successfully
|
||||
- [ ] PR title follows Conventional Commits format
|
||||
- [ ] All commits are meaningful
|
||||
- [ ] Changes pushed to GitHub
|
||||
|
||||
---
|
||||
|
||||
## 🤖 What Happens After Migration?
|
||||
|
||||
After you push your changes:
|
||||
|
||||
1. **Automated checks will run** (they won't block merging, just provide feedback)
|
||||
2. **You'll get a comment** with check results and suggestions
|
||||
3. **Maintainers will review** your PR with the new context
|
||||
4. **Faster review** thanks to pre-checks
|
||||
|
||||
---
|
||||
|
||||
## ❓ Troubleshooting
|
||||
|
||||
### "Rebase conflicts"
|
||||
|
||||
If you get conflicts during rebase:
|
||||
|
||||
```bash
|
||||
# Fix conflicts in your editor
|
||||
# Then:
|
||||
git add <fixed-files>
|
||||
git rebase --continue
|
||||
|
||||
# Or abort and ask for help:
|
||||
git rebase --abort
|
||||
```
|
||||
|
||||
**Need help?** Just comment on your PR and we'll assist!
|
||||
|
||||
### "Tests failing"
|
||||
|
||||
If tests fail:
|
||||
|
||||
```bash
|
||||
# Run tests to see the error
|
||||
go test ./...
|
||||
|
||||
# Fix the issue
|
||||
# Then commit and push
|
||||
git add .
|
||||
git commit -m "fix: resolve test failures"
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
### "Script not working"
|
||||
|
||||
If the migration script doesn't work:
|
||||
|
||||
1. Check you have Go and Node.js installed
|
||||
2. Try manual migration (steps above)
|
||||
3. Ask for help in your PR comments
|
||||
|
||||
---
|
||||
|
||||
## 💡 Tips
|
||||
|
||||
**Don't want to migrate?**
|
||||
- That's okay! Your PR will still be reviewed and merged
|
||||
- Migration is optional but recommended
|
||||
|
||||
**First time using Git rebase?**
|
||||
- Check our [Git guide](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
|
||||
- Ask questions in your PR - we're here to help!
|
||||
|
||||
**Want to learn more?**
|
||||
- [Contributing Guidelines](../../CONTRIBUTING.md)
|
||||
- [Migration Announcement](MIGRATION_ANNOUNCEMENT.md)
|
||||
- [PR Review Guide](../maintainers/PR_REVIEW_GUIDE.md)
|
||||
|
||||
---
|
||||
|
||||
## 📞 Need Help?
|
||||
|
||||
**Stuck on migration?**
|
||||
- Comment on your PR
|
||||
- Ask in [Telegram](https://t.me/nofx_dev_community)
|
||||
- Open a [Discussion](https://github.com/tinkle-community/nofx/discussions)
|
||||
|
||||
**We're here to help you succeed!** 🚀
|
||||
|
||||
---
|
||||
|
||||
## 🎉 After Migration
|
||||
|
||||
Once migrated:
|
||||
1. ✅ Wait for automated checks to run
|
||||
2. ✅ Address any feedback in comments
|
||||
3. ✅ Wait for maintainer review
|
||||
4. ✅ Celebrate when merged! 🎉
|
||||
|
||||
**Thank you for contributing to NOFX!**
|
||||
272
docs/community/HOW_TO_MIGRATE_YOUR_PR.zh-CN.md
Normal file
272
docs/community/HOW_TO_MIGRATE_YOUR_PR.zh-CN.md
Normal file
@@ -0,0 +1,272 @@
|
||||
# 🔄 如何将你的 PR 迁移到新格式
|
||||
|
||||
**语言:** [English](HOW_TO_MIGRATE_YOUR_PR.md) | [中文](HOW_TO_MIGRATE_YOUR_PR.zh-CN.md)
|
||||
|
||||
本指南帮助你将现有 PR 迁移以满足新的 PR 管理系统要求。
|
||||
|
||||
---
|
||||
|
||||
## 🎯 为什么要迁移?
|
||||
|
||||
虽然你的现有 PR **仍将按照当前标准审核和合并**,但将其迁移到新格式可以获得:
|
||||
|
||||
✅ **更快的审核** - 自动化检查尽早捕获问题
|
||||
✅ **更好的反馈** - CI 提供清晰、可操作的反馈
|
||||
✅ **更高质量** - 一致的代码标准
|
||||
✅ **学习机会** - 了解我们新的贡献工作流程
|
||||
|
||||
---
|
||||
|
||||
## ⚡ 快速检查(推荐)
|
||||
|
||||
### 步骤 1:分析你的 PR
|
||||
|
||||
```bash
|
||||
# 运行 PR 健康检查(只读,不修改任何内容)
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
这将分析你的 PR 并告诉你:
|
||||
- ✅ 什么是好的
|
||||
- ⚠️ 什么需要注意
|
||||
- 💡 如何修复问题
|
||||
- 📊 整体健康评分
|
||||
|
||||
### 步骤 2:修复问题
|
||||
|
||||
根据建议,手动修复问题。常见修复:
|
||||
|
||||
```bash
|
||||
# Rebase 到最新 dev
|
||||
git fetch upstream && git rebase upstream/dev
|
||||
|
||||
# 格式化 Go 代码
|
||||
go fmt ./...
|
||||
|
||||
# 运行测试
|
||||
go test ./...
|
||||
|
||||
# 格式化前端代码
|
||||
cd web && npm run lint -- --fix
|
||||
```
|
||||
|
||||
### 步骤 3:再次运行检查
|
||||
|
||||
```bash
|
||||
# 验证所有问题都已修复
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
### 步骤 4:推送更改
|
||||
|
||||
```bash
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
### 脚本做什么
|
||||
|
||||
1. ✅ 与最新的 `upstream/dev` 同步
|
||||
2. ✅ Rebase 你的更改
|
||||
3. ✅ 格式化 Go 代码(`go fmt`)
|
||||
4. ✅ 运行 Go linting(`go vet`)
|
||||
5. ✅ 运行测试
|
||||
6. ✅ 格式化前端代码(如果适用)
|
||||
7. ✅ 推送更改到你的 PR
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ 手动迁移(逐步指南)
|
||||
|
||||
如果你更喜欢手动操作:
|
||||
|
||||
### 步骤 1:与 Upstream 同步
|
||||
|
||||
```bash
|
||||
# 如果还没添加 upstream,添加它
|
||||
git remote add upstream https://github.com/tinkle-community/nofx.git
|
||||
|
||||
# 获取最新更改
|
||||
git fetch upstream
|
||||
|
||||
# Rebase 你的分支
|
||||
git checkout <your-pr-branch>
|
||||
git rebase upstream/dev
|
||||
```
|
||||
|
||||
### 步骤 2:后端检查(Go)
|
||||
|
||||
```bash
|
||||
# 格式化 Go 代码
|
||||
go fmt ./...
|
||||
|
||||
# 运行 linting
|
||||
go vet ./...
|
||||
|
||||
# 运行测试
|
||||
go test ./...
|
||||
|
||||
# 如果有更改,提交它们
|
||||
git add .
|
||||
git commit -m "chore: format and fix backend issues"
|
||||
```
|
||||
|
||||
### 步骤 3:前端检查(如果适用)
|
||||
|
||||
```bash
|
||||
cd web
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 修复 linting 问题
|
||||
npm run lint -- --fix
|
||||
|
||||
# 检查类型
|
||||
npm run type-check
|
||||
|
||||
# 测试构建
|
||||
npm run build
|
||||
|
||||
cd ..
|
||||
|
||||
# 提交任何修复
|
||||
git add .
|
||||
git commit -m "chore: fix frontend issues"
|
||||
```
|
||||
|
||||
### 步骤 4:更新 PR 标题(如果需要)
|
||||
|
||||
确保你的 PR 标题遵循 [Conventional Commits](https://www.conventionalcommits.org/):
|
||||
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
示例:
|
||||
feat(exchange): add OKX integration
|
||||
fix(trader): resolve position tracking bug
|
||||
docs(readme): update installation guide
|
||||
```
|
||||
|
||||
**类型:**
|
||||
- `feat` - 新功能
|
||||
- `fix` - Bug 修复
|
||||
- `docs` - 文档
|
||||
- `refactor` - 代码重构
|
||||
- `perf` - 性能改进
|
||||
- `test` - 测试更新
|
||||
- `chore` - 构建/配置更改
|
||||
- `security` - 安全改进
|
||||
|
||||
### 步骤 5:推送更改
|
||||
|
||||
```bash
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📋 检查清单
|
||||
|
||||
迁移后,验证:
|
||||
|
||||
- [ ] PR 已基于最新 `dev` rebase
|
||||
- [ ] 没有合并冲突
|
||||
- [ ] 后端测试在本地通过
|
||||
- [ ] 前端构建成功
|
||||
- [ ] PR 标题遵循 Conventional Commits 格式
|
||||
- [ ] 所有 commit 都有意义
|
||||
- [ ] 更改已推送到 GitHub
|
||||
|
||||
---
|
||||
|
||||
## 🤖 迁移后会发生什么?
|
||||
|
||||
推送更改后:
|
||||
|
||||
1. **自动化检查将运行**(不会阻止合并,只提供反馈)
|
||||
2. **你将收到评论**,包含检查结果和建议
|
||||
3. **维护者将审核** 你的 PR,有了新的上下文
|
||||
4. **更快的审核** 得益于预检查
|
||||
|
||||
---
|
||||
|
||||
## ❓ 故障排除
|
||||
|
||||
### "Rebase 冲突"
|
||||
|
||||
如果在 rebase 期间遇到冲突:
|
||||
|
||||
```bash
|
||||
# 在编辑器中修复冲突
|
||||
# 然后:
|
||||
git add <fixed-files>
|
||||
git rebase --continue
|
||||
|
||||
# 或中止并寻求帮助:
|
||||
git rebase --abort
|
||||
```
|
||||
|
||||
**需要帮助?** 在你的 PR 中评论,我们会协助!
|
||||
|
||||
### "测试失败"
|
||||
|
||||
如果测试失败:
|
||||
|
||||
```bash
|
||||
# 运行测试查看错误
|
||||
go test ./...
|
||||
|
||||
# 修复问题
|
||||
# 然后提交并推送
|
||||
git add .
|
||||
git commit -m "fix: resolve test failures"
|
||||
git push -f origin <your-pr-branch>
|
||||
```
|
||||
|
||||
### "脚本不工作"
|
||||
|
||||
如果迁移脚本不工作:
|
||||
|
||||
1. 检查你是否安装了 Go 和 Node.js
|
||||
2. 尝试手动迁移(上面的步骤)
|
||||
3. 在你的 PR 评论中寻求帮助
|
||||
|
||||
---
|
||||
|
||||
## 💡 提示
|
||||
|
||||
**不想迁移?**
|
||||
- 没关系!你的 PR 仍将被审核和合并
|
||||
- 迁移是可选的但推荐的
|
||||
|
||||
**第一次使用 Git rebase?**
|
||||
- 查看我们的 [Git 指南](https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%8F%98%E5%9F%BA)
|
||||
- 在你的 PR 中提问 - 我们在这里帮助!
|
||||
|
||||
**想了解更多?**
|
||||
- [贡献指南](../../docs/i18n/zh-CN/CONTRIBUTING.md)
|
||||
- [迁移公告](MIGRATION_ANNOUNCEMENT.zh-CN.md)
|
||||
- [PR 审核指南](../maintainers/PR_REVIEW_GUIDE.zh-CN.md)
|
||||
|
||||
---
|
||||
|
||||
## 📞 需要帮助?
|
||||
|
||||
**迁移遇到困难?**
|
||||
- 在你的 PR 中评论
|
||||
- 在 [Telegram](https://t.me/nofx_dev_community) 提问
|
||||
- 开启 [Discussion](https://github.com/tinkle-community/nofx/discussions)
|
||||
|
||||
**我们在这里帮助你成功!** 🚀
|
||||
|
||||
---
|
||||
|
||||
## 🎉 迁移后
|
||||
|
||||
迁移完成后:
|
||||
1. ✅ 等待自动化检查运行
|
||||
2. ✅ 处理评论中的任何反馈
|
||||
3. ✅ 等待维护者审核
|
||||
4. ✅ 合并时庆祝!🎉
|
||||
|
||||
**感谢你为 NOFX 做出贡献!**
|
||||
358
docs/community/MIGRATION_ANNOUNCEMENT.md
Normal file
358
docs/community/MIGRATION_ANNOUNCEMENT.md
Normal file
@@ -0,0 +1,358 @@
|
||||
# 📢 PR Management System Update - What Contributors Need to Know
|
||||
|
||||
**Language:** [English](MIGRATION_ANNOUNCEMENT.md) | [中文](MIGRATION_ANNOUNCEMENT.zh-CN.md)
|
||||
|
||||
We're introducing a new PR management system to improve code quality and make contributing easier! This guide explains what's changing and what you need to do.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 What's Changing?
|
||||
|
||||
We're introducing:
|
||||
|
||||
✅ **Clear contribution guidelines** aligned with our [roadmap](../roadmap/README.md)
|
||||
✅ **Automated checks** (tests, linting, security scans)
|
||||
✅ **Better labeling** for organization and prioritization
|
||||
✅ **Faster review turnaround** with pre-checks
|
||||
✅ **Transparent process** so you know exactly what to expect
|
||||
|
||||
---
|
||||
|
||||
## 📅 Timeline
|
||||
|
||||
```
|
||||
Week 1-2: Existing PR Review Period
|
||||
Week 3: Soft Launch (checks are advisory only)
|
||||
Week 4+: Full Launch (checks are required)
|
||||
```
|
||||
|
||||
**Important:** This rollout is gradual. You'll have time to adapt!
|
||||
|
||||
---
|
||||
|
||||
## 🤔 What This Means for YOU
|
||||
|
||||
### If You Have an Existing Open PR
|
||||
|
||||
**Good news:** Your PR will NOT be blocked by new rules!
|
||||
|
||||
- ✅ Your PR will be reviewed under current (relaxed) standards
|
||||
- ✅ We'll review and provide feedback within 1-2 weeks
|
||||
- ✅ Some PRs may need a quick rebase or minor updates
|
||||
|
||||
**What you might need to do:**
|
||||
1. **Rebase on latest `dev` branch** if there are conflicts
|
||||
2. **Respond to review comments** within 1 week
|
||||
3. **Be patient** as we work through the backlog
|
||||
|
||||
**What happens if I don't respond?**
|
||||
- We may close your PR after 2 weeks of inactivity
|
||||
- You can always reopen it later with updates!
|
||||
- No hard feelings - we're just cleaning up the backlog
|
||||
|
||||
### 🚀 Want to Check Your PR? (Optional)
|
||||
|
||||
We've created a **PR health check tool** to help you see if your PR meets the new standards!
|
||||
|
||||
**Run this in your local fork:**
|
||||
```bash
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
- 🔍 Analyzes your PR (doesn't modify anything)
|
||||
- ✅ Shows what's good
|
||||
- ⚠️ Points out issues
|
||||
- 💡 Gives you specific fix suggestions
|
||||
- 📊 Overall health score
|
||||
|
||||
**Then fix issues and push:**
|
||||
```bash
|
||||
# Fix the issues (see suggestions from script)
|
||||
# Run check again
|
||||
./scripts/pr-check.sh
|
||||
|
||||
# Push when ready
|
||||
git push -f origin <your-branch>
|
||||
```
|
||||
|
||||
**📖 Full Guide:** [How to Migrate Your PR](HOW_TO_MIGRATE_YOUR_PR.md)
|
||||
|
||||
**Remember:** This is completely **optional** for existing PRs!
|
||||
|
||||
---
|
||||
|
||||
### If You're Submitting a NEW PR
|
||||
|
||||
**Timeline matters:**
|
||||
|
||||
#### Week 3 (Soft Launch):
|
||||
- ✅ Automated checks will run (tests, linting, security)
|
||||
- ⚠️ **Checks are advisory only** - they won't block your PR
|
||||
- ✅ This is a learning period - we're here to help!
|
||||
- ✅ Get familiar with the new [Contributing Guidelines](../../CONTRIBUTING.md)
|
||||
|
||||
#### Week 4+ (Full Launch):
|
||||
- ✅ All automated checks must pass before merge
|
||||
- ✅ PR must follow [Conventional Commits](https://www.conventionalcommits.org/) format
|
||||
- ✅ PR template must be filled out
|
||||
- ✅ Must align with [roadmap](../roadmap/README.md) priorities
|
||||
|
||||
---
|
||||
|
||||
## ✅ How to Prepare for New System
|
||||
|
||||
### 1. Read the Contributing Guidelines
|
||||
|
||||
📖 [CONTRIBUTING.md](../../CONTRIBUTING.md)
|
||||
|
||||
**Key points:**
|
||||
- We accept PRs aligned with our roadmap (security, AI, exchanges, UI/UX)
|
||||
- PRs should be focused and small (<300 lines preferred)
|
||||
- Use Conventional Commits format: `feat(area): description`
|
||||
- Include tests for new features
|
||||
|
||||
### 2. Check the Roadmap
|
||||
|
||||
🗺️ [Roadmap](../roadmap/README.md)
|
||||
|
||||
**Current priorities (Phase 1):**
|
||||
- 🔒 Security enhancements
|
||||
- 🧠 AI model integrations
|
||||
- 🔗 Exchange integrations (OKX, Bybit, Lighter, EdgeX)
|
||||
- 🎨 UI/UX improvements
|
||||
- ⚡ Performance optimizations
|
||||
- 🐛 Bug fixes
|
||||
|
||||
**Lower priority (Phase 2+):**
|
||||
- Universal market expansion (stocks, futures)
|
||||
- Advanced AI features
|
||||
- Enterprise features
|
||||
|
||||
💡 **Pro tip:** If your PR aligns with Phase 1, it'll be reviewed faster!
|
||||
|
||||
### 3. Set Up Local Testing
|
||||
|
||||
Before submitting a PR, test locally:
|
||||
|
||||
```bash
|
||||
# Backend tests
|
||||
go test ./...
|
||||
go fmt ./...
|
||||
go vet ./...
|
||||
|
||||
# Frontend tests
|
||||
cd web
|
||||
npm run lint
|
||||
npm run type-check
|
||||
npm run build
|
||||
```
|
||||
|
||||
This helps your PR pass automated checks on first try!
|
||||
|
||||
---
|
||||
|
||||
## 📝 PR Title Format
|
||||
|
||||
Use [Conventional Commits](https://www.conventionalcommits.org/) format:
|
||||
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
Examples:
|
||||
feat(exchange): add OKX futures support
|
||||
fix(trader): resolve position tracking bug
|
||||
docs(readme): update installation instructions
|
||||
perf(ai): optimize prompt generation
|
||||
```
|
||||
|
||||
**Types:**
|
||||
- `feat` - New feature
|
||||
- `fix` - Bug fix
|
||||
- `docs` - Documentation
|
||||
- `refactor` - Code refactoring
|
||||
- `perf` - Performance improvement
|
||||
- `test` - Test updates
|
||||
- `chore` - Build/config changes
|
||||
- `security` - Security improvements
|
||||
|
||||
---
|
||||
|
||||
## 🎯 What Makes a Good PR?
|
||||
|
||||
### ✅ Good PR Example
|
||||
|
||||
```
|
||||
Title: feat(exchange): add OKX exchange integration
|
||||
|
||||
Description:
|
||||
Implements OKX exchange support with the following features:
|
||||
- Order placement and cancellation
|
||||
- Balance and position retrieval
|
||||
- Leverage configuration
|
||||
- Error handling and retry logic
|
||||
|
||||
Closes #123
|
||||
|
||||
Testing:
|
||||
- [x] Unit tests added and passing
|
||||
- [x] Manually tested with real API
|
||||
- [x] Documentation updated
|
||||
```
|
||||
|
||||
**Why it's good:**
|
||||
- ✅ Clear, descriptive title
|
||||
- ✅ Explains what and why
|
||||
- ✅ Links to issue
|
||||
- ✅ Includes testing details
|
||||
- ✅ Small, focused change
|
||||
|
||||
### ❌ Avoid These
|
||||
|
||||
**Too vague:**
|
||||
```
|
||||
Title: update code
|
||||
Description: made some changes
|
||||
```
|
||||
|
||||
**Too large:**
|
||||
```
|
||||
Title: feat: complete rewrite of entire trading system
|
||||
Files changed: 2,500+
|
||||
```
|
||||
|
||||
**Off roadmap:**
|
||||
```
|
||||
Title: feat: add support for stock trading
|
||||
(This is Phase 3, not current priority)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🐛 If Your PR Fails Checks
|
||||
|
||||
Don't panic! We're here to help.
|
||||
|
||||
**Week 3 (Soft Launch):**
|
||||
- Checks are advisory - we'll help you fix issues
|
||||
- Ask questions in your PR comments
|
||||
- We can guide you through debugging
|
||||
|
||||
**Week 4+ (Full Launch):**
|
||||
- Checks must pass, but we still help!
|
||||
- Common issues:
|
||||
- Test failures → Run `go test ./...` locally
|
||||
- Linting errors → Run `go fmt` and `npm run lint`
|
||||
- Merge conflicts → Rebase on latest `dev`
|
||||
|
||||
**Need help?** Just ask! Comment in your PR or reach out:
|
||||
- [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions)
|
||||
- [Telegram Community](https://t.me/nofx_dev_community)
|
||||
|
||||
---
|
||||
|
||||
## 💰 Special Note for Bounty Contributors
|
||||
|
||||
If you're working on a bounty:
|
||||
|
||||
✅ **Your PRs get priority review** (24-48 hours)
|
||||
✅ **Extra support** to meet requirements
|
||||
✅ **Flexible during transition** - we'll work with you
|
||||
|
||||
Just make sure to:
|
||||
- Reference the bounty issue number
|
||||
- Meet all acceptance criteria
|
||||
- Include demo video/screenshots
|
||||
|
||||
---
|
||||
|
||||
## ❓ FAQ
|
||||
|
||||
### Q: Will my existing PR be rejected?
|
||||
|
||||
**A:** No! Existing PRs use relaxed standards. We may ask for minor updates (rebase, small fixes), but you won't be held to new strict requirements.
|
||||
|
||||
### Q: What if I can't pass the new CI checks?
|
||||
|
||||
**A:** Week 3 is a learning period. We'll help you understand and fix issues. By Week 4, you'll be familiar with the process!
|
||||
|
||||
### Q: Will this slow down contributions?
|
||||
|
||||
**A:** Actually, no! Automated checks catch issues early, making reviews faster. Clear guidelines help you submit better PRs on first try.
|
||||
|
||||
### Q: Can I still contribute if I'm a beginner?
|
||||
|
||||
**A:** Absolutely! Look for issues labeled `good first issue`. We're here to mentor and help you succeed.
|
||||
|
||||
### Q: My PR is large (>1000 lines). What should I do?
|
||||
|
||||
**A:** Consider breaking it into smaller PRs. This gets you:
|
||||
- ✅ Faster reviews
|
||||
- ✅ Easier testing
|
||||
- ✅ Higher chance of quick merge
|
||||
|
||||
Need help planning? Just ask in your PR!
|
||||
|
||||
### Q: What if my feature isn't on the roadmap?
|
||||
|
||||
**A:** Open an issue first to discuss! We're open to good ideas, but want to ensure alignment before you spend time coding.
|
||||
|
||||
### Q: When will this be fully active?
|
||||
|
||||
**A:** Week 4+ (approximately 4 weeks from announcement date). Check the pinned Discussion post for exact dates.
|
||||
|
||||
---
|
||||
|
||||
## 🎉 Benefits for Contributors
|
||||
|
||||
This new system helps YOU by:
|
||||
|
||||
✅ **Faster reviews** - Automated pre-checks reduce review time
|
||||
✅ **Clear expectations** - You know exactly what's required
|
||||
✅ **Better feedback** - Automated checks catch issues early
|
||||
✅ **Fair prioritization** - Roadmap-aligned PRs reviewed faster
|
||||
✅ **Recognition** - Contributor tiers and recognition program
|
||||
|
||||
---
|
||||
|
||||
## 📚 Resources
|
||||
|
||||
### Must Read
|
||||
- [Contributing Guidelines](../../CONTRIBUTING.md) - Complete guide
|
||||
- [Roadmap](../roadmap/README.md) - Current priorities
|
||||
|
||||
### Helpful Links
|
||||
- [Conventional Commits](https://www.conventionalcommits.org/) - Commit format
|
||||
- [Good First Issues](https://github.com/tinkle-community/nofx/labels/good%20first%20issue) - Beginner-friendly tasks
|
||||
- [Bounty Program](../bounty-guide.md) - Get paid to contribute
|
||||
|
||||
### Get Help
|
||||
- [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions) - Ask questions
|
||||
- [Telegram](https://t.me/nofx_dev_community) - Community chat
|
||||
- [Twitter](https://x.com/nofx_ai) - Updates and announcements
|
||||
|
||||
---
|
||||
|
||||
## 💬 Feedback Welcome!
|
||||
|
||||
This is a new system and we want YOUR input:
|
||||
|
||||
- 📝 What's unclear?
|
||||
- 🤔 What concerns do you have?
|
||||
- 💡 How can we improve?
|
||||
|
||||
Share in the [Migration Feedback Discussion](https://github.com/tinkle-community/nofx/discussions) (link TBD)
|
||||
|
||||
---
|
||||
|
||||
## 🙏 Thank You!
|
||||
|
||||
We appreciate your contributions and patience during this transition. Together, we're building something amazing!
|
||||
|
||||
**Questions?** Don't hesitate to ask. We're here to help! 🚀
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Status:** Announcement (Week 0)
|
||||
**Full Launch:** Week 4+ (TBD)
|
||||
358
docs/community/MIGRATION_ANNOUNCEMENT.zh-CN.md
Normal file
358
docs/community/MIGRATION_ANNOUNCEMENT.zh-CN.md
Normal file
@@ -0,0 +1,358 @@
|
||||
# 📢 PR 管理系统更新 - 贡献者须知
|
||||
|
||||
**语言:** [English](MIGRATION_ANNOUNCEMENT.md) | [中文](MIGRATION_ANNOUNCEMENT.zh-CN.md)
|
||||
|
||||
我们正在引入新的 PR 管理系统,以提高代码质量并让贡献变得更容易!本指南解释了变化内容以及你需要做什么。
|
||||
|
||||
---
|
||||
|
||||
## 🎯 有什么变化?
|
||||
|
||||
我们正在引入:
|
||||
|
||||
✅ **清晰的贡献指南** 与我们的[路线图](../roadmap/README.zh-CN.md)对齐
|
||||
✅ **自动化检查**(测试、linting、安全扫描)
|
||||
✅ **更好的标签** 用于组织和优先级排序
|
||||
✅ **更快的审核周转** 通过预检查
|
||||
✅ **透明的流程** 让你准确知道期望什么
|
||||
|
||||
---
|
||||
|
||||
## 📅 时间表
|
||||
|
||||
```
|
||||
第 1-2 周:现有 PR 审核期
|
||||
第 3 周: 软启动(检查仅是建议性的)
|
||||
第 4 周+: 完全启动(检查是必需的)
|
||||
```
|
||||
|
||||
**重要:** 这个推出是渐进式的。你将有时间适应!
|
||||
|
||||
---
|
||||
|
||||
## 🤔 这对你意味着什么
|
||||
|
||||
### 如果你有现有的打开的 PR
|
||||
|
||||
**好消息:** 你的 PR 不会被新规则阻塞!
|
||||
|
||||
- ✅ 你的 PR 将按照当前(宽松)标准进行审核
|
||||
- ✅ 我们将在 1-2 周内审核并提供反馈
|
||||
- ✅ 一些 PR 可能需要快速 rebase 或次要更新
|
||||
|
||||
**你可能需要做什么:**
|
||||
1. **基于最新 `dev` 分支 rebase** 如果有冲突
|
||||
2. **在 1 周内回应审核评论**
|
||||
3. **保持耐心** 我们正在处理积压
|
||||
|
||||
**如果我不回应会怎样?**
|
||||
- 我们可能会在 2 周不活动后关闭你的 PR
|
||||
- 你随时可以稍后重新打开并更新!
|
||||
- 没有恶意 - 我们只是在清理积压
|
||||
|
||||
### 🚀 想要检查你的 PR?(可选)
|
||||
|
||||
我们创建了一个 **PR 健康检查工具**来帮助你看 PR 是否符合新标准!
|
||||
|
||||
**在你的本地 fork 中运行:**
|
||||
```bash
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
**它做什么:**
|
||||
- 🔍 分析你的 PR(不修改任何内容)
|
||||
- ✅ 显示什么是好的
|
||||
- ⚠️ 指出问题
|
||||
- 💡 给你具体的修复建议
|
||||
- 📊 整体健康评分
|
||||
|
||||
**然后修复问题并推送:**
|
||||
```bash
|
||||
# 修复问题(查看脚本的建议)
|
||||
# 再次运行检查
|
||||
./scripts/pr-check.sh
|
||||
|
||||
# 准备好后推送
|
||||
git push -f origin <your-branch>
|
||||
```
|
||||
|
||||
**📖 完整指南:** [如何迁移你的 PR](HOW_TO_MIGRATE_YOUR_PR.zh-CN.md)
|
||||
|
||||
**记住:** 对于现有 PR,这是完全**可选的**!
|
||||
|
||||
---
|
||||
|
||||
### 如果你要提交新的 PR
|
||||
|
||||
**时间很重要:**
|
||||
|
||||
#### 第 3 周(软启动):
|
||||
- ✅ 自动化检查将运行(测试、linting、安全性)
|
||||
- ⚠️ **检查仅是建议性的** - 不会阻塞你的 PR
|
||||
- ✅ 这是一个学习期 - 我们在这里帮助!
|
||||
- ✅ 熟悉新的[贡献指南](../../docs/i18n/zh-CN/CONTRIBUTING.md)
|
||||
|
||||
#### 第 4 周+(完全启动):
|
||||
- ✅ 所有自动化检查必须通过才能合并
|
||||
- ✅ PR 必须遵循 [Conventional Commits](https://www.conventionalcommits.org/) 格式
|
||||
- ✅ 必须填写 PR 模板
|
||||
- ✅ 必须与[路线图](../roadmap/README.zh-CN.md)优先级对齐
|
||||
|
||||
---
|
||||
|
||||
## ✅ 如何为新系统做准备
|
||||
|
||||
### 1. 阅读贡献指南
|
||||
|
||||
📖 [CONTRIBUTING.md](../../docs/i18n/zh-CN/CONTRIBUTING.md)
|
||||
|
||||
**关键点:**
|
||||
- 我们接受与路线图对齐的 PR(安全性、AI、交易所、UI/UX)
|
||||
- PR 应该集中且小型(<300 行优先)
|
||||
- 使用 Conventional Commits 格式:`feat(area): description`
|
||||
- 为新功能包含测试
|
||||
|
||||
### 2. 查看路线图
|
||||
|
||||
🗺️ [路线图](../roadmap/README.zh-CN.md)
|
||||
|
||||
**当前优先级(Phase 1):**
|
||||
- 🔒 安全增强
|
||||
- 🧠 AI 模型集成
|
||||
- 🔗 交易所集成(OKX、Bybit、Lighter、EdgeX)
|
||||
- 🎨 UI/UX 改进
|
||||
- ⚡ 性能优化
|
||||
- 🐛 Bug 修复
|
||||
|
||||
**较低优先级(Phase 2+):**
|
||||
- 通用市场扩展(股票、期货)
|
||||
- 高级 AI 功能
|
||||
- 企业功能
|
||||
|
||||
💡 **专业提示:** 如果你的 PR 与 Phase 1 对齐,它会被更快审核!
|
||||
|
||||
### 3. 设置本地测试
|
||||
|
||||
提交 PR 前,在本地测试:
|
||||
|
||||
```bash
|
||||
# 后端测试
|
||||
go test ./...
|
||||
go fmt ./...
|
||||
go vet ./...
|
||||
|
||||
# 前端测试
|
||||
cd web
|
||||
npm run lint
|
||||
npm run type-check
|
||||
npm run build
|
||||
```
|
||||
|
||||
这有助于你的 PR 第一次就通过自动化检查!
|
||||
|
||||
---
|
||||
|
||||
## 📝 PR 标题格式
|
||||
|
||||
使用 [Conventional Commits](https://www.conventionalcommits.org/) 格式:
|
||||
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
示例:
|
||||
feat(exchange): add OKX futures support
|
||||
fix(trader): resolve position tracking bug
|
||||
docs(readme): update installation instructions
|
||||
perf(ai): optimize prompt generation
|
||||
```
|
||||
|
||||
**类型:**
|
||||
- `feat` - 新功能
|
||||
- `fix` - Bug 修复
|
||||
- `docs` - 文档
|
||||
- `refactor` - 代码重构
|
||||
- `perf` - 性能改进
|
||||
- `test` - 测试更新
|
||||
- `chore` - 构建/配置变更
|
||||
- `security` - 安全改进
|
||||
|
||||
---
|
||||
|
||||
## 🎯 什么是好的 PR?
|
||||
|
||||
### ✅ 好的 PR 示例
|
||||
|
||||
```
|
||||
标题:feat(exchange): add OKX exchange integration
|
||||
|
||||
描述:
|
||||
使用以下功能实现 OKX 交易所支持:
|
||||
- 订单下达和取消
|
||||
- 余额和仓位检索
|
||||
- 杠杆配置
|
||||
- 错误处理和重试逻辑
|
||||
|
||||
关闭 #123
|
||||
|
||||
测试:
|
||||
- [x] 单元测试已添加并通过
|
||||
- [x] 使用真实 API 手动测试
|
||||
- [x] 文档已更新
|
||||
```
|
||||
|
||||
**为什么好:**
|
||||
- ✅ 清晰、描述性标题
|
||||
- ✅ 解释了什么和为什么
|
||||
- ✅ 链接到 issue
|
||||
- ✅ 包含测试详情
|
||||
- ✅ 小型、集中的变更
|
||||
|
||||
### ❌ 避免这些
|
||||
|
||||
**太模糊:**
|
||||
```
|
||||
标题:update code
|
||||
描述:made some changes
|
||||
```
|
||||
|
||||
**太大:**
|
||||
```
|
||||
标题:feat: complete rewrite of entire trading system
|
||||
文件变更:2,500+
|
||||
```
|
||||
|
||||
**不在路线图上:**
|
||||
```
|
||||
标题:feat: add support for stock trading
|
||||
(这是 Phase 3,不是当前优先级)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🐛 如果你的 PR 检查失败
|
||||
|
||||
不要恐慌!我们在这里帮助。
|
||||
|
||||
**第 3 周(软启动):**
|
||||
- 检查是建议性的 - 我们会帮你解决问题
|
||||
- 在你的 PR 评论中提问
|
||||
- 我们可以指导你进行调试
|
||||
|
||||
**第 4 周+(完全启动):**
|
||||
- 检查必须通过,但我们仍然会帮助!
|
||||
- 常见问题:
|
||||
- 测试失败 → 在本地运行 `go test ./...`
|
||||
- Linting 错误 → 运行 `go fmt` 和 `npm run lint`
|
||||
- 合并冲突 → 基于最新 `dev` rebase
|
||||
|
||||
**需要帮助?** 只管问!在你的 PR 中评论或联系:
|
||||
- [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions)
|
||||
- [Telegram 社区](https://t.me/nofx_dev_community)
|
||||
|
||||
---
|
||||
|
||||
## 💰 悬赏贡献者特别说明
|
||||
|
||||
如果你正在做悬赏任务:
|
||||
|
||||
✅ **你的 PR 获得优先审核**(24-48 小时)
|
||||
✅ **额外支持** 以满足要求
|
||||
✅ **过渡期间灵活** - 我们会与你合作
|
||||
|
||||
只需确保:
|
||||
- 引用悬赏 issue 编号
|
||||
- 满足所有验收标准
|
||||
- 包含演示视频/截图
|
||||
|
||||
---
|
||||
|
||||
## ❓ 常见问题
|
||||
|
||||
### Q:我的现有 PR 会被拒绝吗?
|
||||
|
||||
**A:** 不会!现有 PR 使用宽松标准。我们可能会要求次要更新(rebase、小修复),但你不会被要求满足新的严格要求。
|
||||
|
||||
### Q:如果我无法通过新的 CI 检查怎么办?
|
||||
|
||||
**A:** 第 3 周是学习期。我们会帮你理解和修复问题。到第 4 周,你将熟悉这个流程!
|
||||
|
||||
### Q:这会减慢贡献速度吗?
|
||||
|
||||
**A:** 实际上不会!自动化检查尽早捕获问题,使审核更快。清晰的指南帮助你第一次就提交更好的 PR。
|
||||
|
||||
### Q:如果我是初学者,我还能贡献吗?
|
||||
|
||||
**A:** 绝对可以!查找标记为 `good first issue` 的 issue。我们在这里指导并帮助你成功。
|
||||
|
||||
### Q:我的 PR 很大(>1000 行)。我应该怎么做?
|
||||
|
||||
**A:** 考虑将其拆分为更小的 PR。这让你获得:
|
||||
- ✅ 更快的审核
|
||||
- ✅ 更容易的测试
|
||||
- ✅ 更高的快速合并机会
|
||||
|
||||
需要帮助规划?在你的 PR 中提问即可!
|
||||
|
||||
### Q:如果我的功能不在路线图上怎么办?
|
||||
|
||||
**A:** 先开一个 issue 讨论!我们对好想法持开放态度,但在你花时间编码之前想确保对齐。
|
||||
|
||||
### Q:这将何时完全激活?
|
||||
|
||||
**A:** 第 4 周+(从公告日期起大约 4 周)。查看置顶的 Discussion 帖子了解确切日期。
|
||||
|
||||
---
|
||||
|
||||
## 🎉 对贡献者的好处
|
||||
|
||||
这个新系统通过以下方式帮助你:
|
||||
|
||||
✅ **更快的审核** - 自动化预检查减少审核时间
|
||||
✅ **清晰的期望** - 你准确知道需要什么
|
||||
✅ **更好的反馈** - 自动化检查尽早捕获问题
|
||||
✅ **公平的优先级排序** - 路线图对齐的 PR 审核更快
|
||||
✅ **表彰** - 贡献者等级和表彰计划
|
||||
|
||||
---
|
||||
|
||||
## 📚 资源
|
||||
|
||||
### 必读
|
||||
- [贡献指南](../../docs/i18n/zh-CN/CONTRIBUTING.md) - 完整指南
|
||||
- [路线图](../roadmap/README.zh-CN.md) - 当前优先级
|
||||
|
||||
### 有用链接
|
||||
- [Conventional Commits](https://www.conventionalcommits.org/) - Commit 格式
|
||||
- [Good First Issues](https://github.com/tinkle-community/nofx/labels/good%20first%20issue) - 适合初学者的任务
|
||||
- [悬赏计划](../bounty-guide.md) - 获得报酬来贡献
|
||||
|
||||
### 获取帮助
|
||||
- [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions) - 提问
|
||||
- [Telegram](https://t.me/nofx_dev_community) - 社区聊天
|
||||
- [Twitter](https://x.com/nofx_ai) - 更新和公告
|
||||
|
||||
---
|
||||
|
||||
## 💬 欢迎反馈!
|
||||
|
||||
这是一个新系统,我们想要你的意见:
|
||||
|
||||
- 📝 什么不清楚?
|
||||
- 🤔 你有什么顾虑?
|
||||
- 💡 我们如何改进?
|
||||
|
||||
在[迁移反馈讨论](https://github.com/tinkle-community/nofx/discussions)中分享(链接待定)
|
||||
|
||||
---
|
||||
|
||||
## 🙏 谢谢你!
|
||||
|
||||
我们感谢你的贡献和在这次过渡期间的耐心。我们一起正在构建令人惊叹的东西!
|
||||
|
||||
**问题?** 不要犹豫提问。我们在这里帮助!🚀
|
||||
|
||||
---
|
||||
|
||||
**最后更新:** 2025-01-XX
|
||||
**状态:** 公告(第 0 周)
|
||||
**完全启动:** 第 4 周+(待定)
|
||||
173
docs/community/PR_COMMENT_TEMPLATE.md
Normal file
173
docs/community/PR_COMMENT_TEMPLATE.md
Normal file
@@ -0,0 +1,173 @@
|
||||
# 📢 PR Comment Template for Existing PRs
|
||||
|
||||
This template is for maintainers to comment on existing PRs to introduce the new system.
|
||||
|
||||
---
|
||||
|
||||
## Template (English)
|
||||
|
||||
```markdown
|
||||
Hi @{username}! 👋
|
||||
|
||||
Thank you for your contribution to NOFX!
|
||||
|
||||
## 🚀 New PR Management System
|
||||
|
||||
We're introducing a new PR management system to improve code quality and make reviews faster. Your PR will **not be blocked** by these changes - we'll review it under current standards.
|
||||
|
||||
### ✨ Optional: Want to check your PR against new standards?
|
||||
|
||||
We've created a **PR health check tool** that analyzes your PR and gives you suggestions!
|
||||
|
||||
**How to use:**
|
||||
|
||||
```bash
|
||||
# In your local fork, on your PR branch
|
||||
cd /path/to/your/nofx-fork
|
||||
git checkout <your-branch-name>
|
||||
|
||||
# Run the health check (reads only, doesn't modify)
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
- 🔍 Analyzes your PR (doesn't modify anything)
|
||||
- ✅ Shows what's already good
|
||||
- ⚠️ Points out issues
|
||||
- 💡 Gives specific suggestions on how to fix
|
||||
- 📊 Overall health score
|
||||
|
||||
**Then fix and re-check:**
|
||||
```bash
|
||||
# Fix the issues based on suggestions
|
||||
# Run check again to verify
|
||||
./scripts/pr-check.sh
|
||||
|
||||
# Push when everything looks good
|
||||
git push origin <your-branch-name>
|
||||
```
|
||||
|
||||
### 📖 Learn More
|
||||
|
||||
- [Migration Announcement](https://github.com/tinkle-community/nofx/blob/dev/docs/community/MIGRATION_ANNOUNCEMENT.md)
|
||||
- [Contributing Guidelines](https://github.com/tinkle-community/nofx/blob/dev/CONTRIBUTING.md)
|
||||
|
||||
### ❓ Questions?
|
||||
|
||||
Just ask here! We're happy to help. 🙏
|
||||
|
||||
---
|
||||
|
||||
**Note:** This migration is **completely optional** for existing PRs. We'll review and merge your PR either way!
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Template (Chinese / 中文)
|
||||
|
||||
```markdown
|
||||
嗨 @{username}!👋
|
||||
|
||||
感谢你为 NOFX 做出的贡献!
|
||||
|
||||
## 🚀 新的 PR 管理系统
|
||||
|
||||
我们正在引入新的 PR 管理系统,以提高代码质量并加快审核速度。你的 PR **不会被阻止** - 我们将按照当前标准审核它。
|
||||
|
||||
### ✨ 可选:想要检查你的 PR 吗?
|
||||
|
||||
我们创建了一个 **PR 健康检查工具**来帮助你看 PR 是否符合新标准!
|
||||
|
||||
**在你的本地 fork 中运行:**
|
||||
|
||||
```bash
|
||||
# 在你的本地 fork 中,切换到你的 PR 分支
|
||||
cd /path/to/your/nofx-fork
|
||||
git checkout <your-branch-name>
|
||||
|
||||
# 运行健康检查(只读,不修改任何内容)
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
**它做什么:**
|
||||
- 🔍 分析你的 PR(不修改任何内容)
|
||||
- ✅ 显示什么是好的
|
||||
- ⚠️ 指出问题
|
||||
- 💡 给你具体的修复建议
|
||||
- 📊 整体健康评分
|
||||
|
||||
**然后修复问题并推送:**
|
||||
```bash
|
||||
# 修复问题(查看脚本的建议)
|
||||
# 再次运行检查
|
||||
./scripts/pr-check.sh
|
||||
|
||||
# 准备好后推送
|
||||
git push origin <your-branch-name>
|
||||
```
|
||||
|
||||
### 📖 了解更多
|
||||
|
||||
- [迁移公告](https://github.com/tinkle-community/nofx/blob/dev/docs/community/MIGRATION_ANNOUNCEMENT.zh-CN.md)
|
||||
- [贡献指南](https://github.com/tinkle-community/nofx/blob/dev/docs/i18n/zh-CN/CONTRIBUTING.md)
|
||||
|
||||
### ❓ 问题?
|
||||
|
||||
在这里提问即可!我们很乐意帮助。🙏
|
||||
|
||||
---
|
||||
|
||||
**注意:** 对于现有 PR,此迁移是**完全可选的**。无论如何我们都会审核和合并你的 PR!
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Copy-Paste Template
|
||||
|
||||
For quick commenting on multiple PRs:
|
||||
|
||||
```markdown
|
||||
👋 Hi! Thanks for your PR!
|
||||
|
||||
We're introducing a new PR system. Your PR won't be blocked - we'll review it normally.
|
||||
|
||||
**Want to check your PR?** Run this in your fork:
|
||||
```bash
|
||||
./scripts/pr-check.sh
|
||||
```
|
||||
|
||||
[Learn more](https://github.com/tinkle-community/nofx/blob/dev/docs/community/MIGRATION_ANNOUNCEMENT.md) | This is optional!
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Bulk Comment Script (for maintainers)
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
# Comment on all open PRs
|
||||
gh pr list --state open --json number --jq '.[].number' | while read pr_number; do
|
||||
echo "Commenting on PR #$pr_number"
|
||||
|
||||
gh pr comment "$pr_number" --body "👋 Hi! Thanks for your PR!
|
||||
|
||||
We're introducing a new PR system. Your PR won't be blocked - we'll review it normally.
|
||||
|
||||
**Want to check your PR?** Run this in your fork:
|
||||
\`\`\`bash
|
||||
./scripts/pr-check.sh
|
||||
\`\`\`
|
||||
|
||||
[Learn more](https://github.com/tinkle-community/nofx/blob/dev/docs/community/MIGRATION_ANNOUNCEMENT.md) | This is optional!"
|
||||
|
||||
echo "✅ Commented on PR #$pr_number"
|
||||
sleep 2 # Be nice to GitHub API
|
||||
done
|
||||
```
|
||||
|
||||
Save as `comment-all-prs.sh` and run:
|
||||
```bash
|
||||
chmod +x comment-all-prs.sh
|
||||
./comment-all-prs.sh
|
||||
```
|
||||
@@ -4,6 +4,20 @@ Welcome to the NOFX community! This section contains everything you need to cont
|
||||
|
||||
---
|
||||
|
||||
## 📢 Important Announcement
|
||||
|
||||
**🚀 New PR Management System Coming Soon!**
|
||||
|
||||
We're introducing a new PR management system to improve code quality and make contributing easier!
|
||||
|
||||
**📖 Read:** [Migration Announcement](MIGRATION_ANNOUNCEMENT.md) | [迁移公告(中文)](MIGRATION_ANNOUNCEMENT.zh-CN.md)
|
||||
|
||||
**Timeline:** 4-week gradual rollout starting soon
|
||||
|
||||
**For existing PRs:** Don't worry! Your PRs will not be blocked by new rules.
|
||||
|
||||
---
|
||||
|
||||
## 🤝 How to Contribute
|
||||
|
||||
### Getting Started
|
||||
|
||||
Reference in New Issue
Block a user