chore(community): add community standards, templates and workflows#36
chore(community): add community standards, templates and workflows#36whats2000 wants to merge 2 commits intoai-twinkle:rollingfrom
Conversation
There was a problem hiding this comment.
Pull request overview
此 PR 為專案建立社群協作的基礎設施:新增社群規範文件、Issue/PR 模板,並加入自動標籤的 GitHub Actions workflow,以提升貢獻流程一致性與維護效率。
Changes:
- 新增繁體中文的
CODE_OF_CONDUCT.md與CONTRIBUTING.md - 新增 PR / Issue 模板(feature request、bug report)
- 新增 Auto Label workflow 與 labeler 規則設定
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| CONTRIBUTING.md | 新增貢獻流程與提交規範(Bun / Husky / Conventional Commits) |
| CODE_OF_CONDUCT.md | 新增 Contributor Covenant 2.1(繁中)行為準則 |
| .github/workflows/auto-label.yml | 新增 PR 自動套用 label 的 workflow |
| .github/labeler.yml | 定義依檔案路徑/類型套用的標籤規則 |
| .github/PULL_REQUEST_TEMPLATE.md | 新增 PR 模板(繁中) |
| .github/ISSUE_TEMPLATE/feature_request.md | 新增功能請求 Issue 模板(繁中) |
| .github/ISSUE_TEMPLATE/bug_report.md | 新增錯誤回報 Issue 模板(繁中) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| sync-labels: true |
There was a problem hiding this comment.
sync-labels: true 會在檔案變更不再匹配時移除 labeler 管理的標籤;若團隊會手動加上同名標籤(如 frontend/backend),也可能被自動移除。請確認這個行為符合預期;若不希望自動移除,建議關閉此選項。
| - uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| sync-labels: true |
There was a problem hiding this comment.
steps: 下的 list item 需要再縮排一層;目前 - uses: 與 steps: 同層會造成 workflow YAML 無法解析,導致 Auto Label 不會執行。請把步驟縮排成 steps: 之下的陣列。
| - uses: actions/labeler@v5 | |
| with: | |
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
| sync-labels: true | |
| - uses: actions/labeler@v5 | |
| with: | |
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
| sync-labels: true |
| * **`main`**: 主要分支,隨時保持可部署狀態 (Rolling Release)。所有的 Pull Request 都應該合併回此分支。 | ||
| * **`feature/*`**: 用於開發新功能的分支 (例如: `feature/new-login-page`)。 | ||
| * **`fix/*`**: 用於修復錯誤的分支 (例如: `fix/login-bug`)。 |
There was a problem hiding this comment.
分支策略段落寫的是 feature/*,但下方建立分支示例使用的是 feat/...。請統一分支前綴(例如都用 feature/* 或都用 feat/*),避免貢獻者依文件操作時產生混淆。
|
|
||
| 1. 為您的功能或錯誤修復創建一個新的分支: | ||
| ```bash | ||
| git checkout -b feat/your-feature-name |
There was a problem hiding this comment.
這裡的 git checkout -b feat/... 與前文列出的 feature/* 分支命名不一致。若專案約定是 feature/*,請同步更新此命令;反之亦然。
| git checkout -b feat/your-feature-name | |
| git checkout -b feature/your-feature-name |
| 我們使用 `husky` 來確保代碼品質。在您提交 (commit) 之前,`lint-staged` 會自動執行以檢查您的代碼風格。 | ||
|
|
||
| 您也可以手動執行 lint 檢查: | ||
| ```bash | ||
| bun run lint | ||
| ``` |
There was a problem hiding this comment.
文件建議手動執行 bun run lint,但目前 package.json 的 lint script 是 lint-staged,通常只適用於已 staged 的檔案。若要提供手動檢查整個專案的方式,建議改指向 lint:es:check(或提供 lint:es:fix)等不依賴 git stage 的指令。
| 我們使用 `husky` 來確保代碼品質。在您提交 (commit) 之前,`lint-staged` 會自動執行以檢查您的代碼風格。 | |
| 您也可以手動執行 lint 檢查: | |
| ```bash | |
| bun run lint | |
| ``` | |
| 我們使用 `husky` 來確保代碼品質。在您提交 (commit) 之前,`lint-staged` 會自動執行以檢查您的代碼風格(此時執行的是 `lint` script,僅針對已 staged 的檔案)。 | |
| 若要**手動檢查整個專案**的程式碼風格,請執行: | |
| ```bash | |
| bun run lint:es:check | |
| ``` | |
| 若要在檢查的同時盡可能自動修正問題,則可改用: | |
| ```bash | |
| bun run lint:es:fix | |
| ``` |
|
|
||
| ## 我們的標準 | ||
|
|
||
| 有助於創造積環境的行為示例包括: |
There was a problem hiding this comment.
此處「積環境」疑似漏字,會影響閱讀理解;請修正為「積極環境」(或等價用語)。
| 有助於創造積環境的行為示例包括: | |
| 有助於創造積極環境的行為示例包括: |
|
|
||
| ## 執行 | ||
|
|
||
| 如發現濫用、騷擾或其他不可接受的行為,可通過 [在此插入聯繫方式] 向負責執行的社區領導者報告。 |
There was a problem hiding this comment.
行為準則的回報方式仍是佔位文字「[在此插入聯繫方式]」。這會讓實際執行流程無法落地;請替換成真實的聯絡管道(例如專案 email、維護者名單、或指向特定的回報表單/Issue 途徑)。
| 如發現濫用、騷擾或其他不可接受的行為,可通過 [在此插入聯繫方式] 向負責執行的社區領導者報告。 | |
| 如發現濫用、騷擾或其他不可接受的行為,可通過電子郵件聯繫 project-maintainers@example.com 向負責執行的社區領導者報告。 |
描述
此 PR 建立了專案的社群規範、貢獻指南以及自動化流程。詳細包含:
auto-labelCI Workflow變更類型
請刪除不相關的選項。
這已經過測試了嗎?
請描述您運行的測試以驗證您的更改。
檢查清單: