chore: add GitHub templates and community files

- Add Issue templates (bug report, feature request) with bilingual support
- Add PR template with bilingual support
- Add Dependabot configuration for Python, Docker, and GitHub Actions
- Add labels configuration with 30+ standardized labels
- Add code quality workflow (Black, isort, Flake8, Bandit)
- Add LICENSE (Apache 2.0)
- Add CONTRIBUTING.md with development guidelines
- Add SECURITY.md with vulnerability reporting process

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
胡绍康andClaude Opus 4.6 committed 2026-02-25 17:10:54 +08:00
1 parent 2aca6d9954
commit a448637477
9 files changed
+776

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
---
name: Bug Report / Bug 报告
about: Create a report to help us improve / 创建报告帮助我们改进
title: "bug: "
labels: "bug"
assignees: ""
---
# Bug Report / Bug 报告
**Version / 版本:**
<!-- Please specify commit or tag version. / 请指定 commit 或 tag 版本。 -->
**Current behavior / 当前行为:**
<!-- Describe how the bug manifests. / 描述 bug 如何表现。 -->
**Expected behavior / 期望行为:**
<!-- Describe what the behavior would be without the bug. / 描述没有 bug 时应该是什么行为。 -->
**Steps to reproduce / 复现步骤:**
<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. / 请说明复现问题所需的步骤,如果可以提供示例应用会更好。 -->
**Related code / 相关代码:**
<!-- If you are able to illustrate the bug or feature request with an example, please provide it here. / 如果可以用示例说明 bug,请在此提供。 -->
```
insert short code snippets here / 在此插入简短代码片段
```
**Other information / 其他信息:**
<!-- List any other information that is relevant to your issue. Related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. / 列出与问题相关的其他信息。相关 issue、修复建议、Stack Overflow 链接、论坛链接等。 -->
+32
View File
@@ -0,0 +1,32 @@
---
name: Feature Request / 功能请求
about: Suggest an idea for this project / 为此项目提出想法
title: "feat: "
labels: "enhancement"
assignees: ""
---
# Feature Request / 功能请求
**Describe the Feature Request / 描述功能请求**
<!-- A clear and concise description of what the feature request is. Please include if your feature request is related to a problem. / 清晰简洁地描述功能请求是什么。如果功能请求与某个问题相关,请说明。 -->
**Describe Preferred Solution / 描述首选解决方案**
<!-- A clear and concise description of what you want to happen. / 清晰简洁地描述你希望发生什么。 -->
**Describe Alternatives / 描述替代方案**
<!-- A clear and concise description of any alternative solutions or features you've considered. / 清晰简洁地描述你考虑过的任何替代解决方案或功能。 -->
**Related Code / 相关代码**
<!-- If you are able to illustrate the bug or feature request with an example, please provide it here. / 如果可以用示例说明功能请求,请在此提供。 -->
**Additional Context / 附加上下文**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to add, use case, Stack Overflow links, forum links, screenshots, OS if applicable, etc. / 列出与问题相关的其他信息。堆栈跟踪、相关 issue、添加建议、用例、Stack Overflow 链接、论坛链接、截图、操作系统(如适用)等。 -->
**If the feature request is approved, would you be willing to submit a PR? / 如果功能请求被批准,你愿意提交 PR 吗?**
Yes / No _(Help can be provided if you need assistance submitting a PR / 如果需要帮助提交 PR,我们可以提供协助)_
+33
View File
@@ -0,0 +1,33 @@
<!--- Please provide a general summary of your changes in the title above / 请在上方标题中提供更改的总体摘要 -->
## Pull request type / PR 类型
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. / 请尽量将 PR 限制为一种类型,如需要可提交多个 PR。 -->
Please check the type of change your PR introduces / 请勾选 PR 引入的更改类型:
- [ ] Bugfix / Bug 修复
- [ ] Feature / 新功能
- [ ] Code style update (formatting, renaming) / 代码风格更新(格式化、重命名)
- [ ] Refactoring (no functional changes, no api changes) / 重构(无功能更改、无 API 更改)
- [ ] Build related changes / 构建相关更改
- [ ] Documentation content changes / 文档内容更改
- [ ] Other (please describe) / 其他(请描述):
## What is the current behavior? / 当前行为是什么?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. / 请描述你正在修改的当前行为,或链接到相关 issue。 -->
Issue Number / Issue 编号: N/A
## What is the new behavior? / 新行为是什么?
<!-- Please describe the behavior or changes that are being added by this PR. / 请描述此 PR 添加的行为或更改。 -->
-
-
-
## Other information / 其他信息
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. / 与此 PR 相关的其他重要信息,例如组件更改前后的截图。 -->
+40
View File
@@ -0,0 +1,40 @@
version: 2
updates:
# Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore"
include: "scope"
# Docker dependencies
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "docker"
commit-message:
prefix: "chore"
include: "scope"
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "ci"
commit-message:
prefix: "chore"
include: "scope"
+84
View File
@@ -0,0 +1,84 @@
---
- name: "breaking-change"
color: ee0701
description: "A breaking change for existing users."
- name: "bug"
color: ee0701
description: "Inconsistencies or issues which will cause a problem for users or implementors."
- name: "documentation"
color: 0052cc
description: "Solely about the documentation of the project."
- name: "enhancement"
color: 1d76db
description: "Enhancement of the code, not introducing new features."
- name: "refactor"
color: 1d76db
description: "Improvement of existing code, not introducing new features."
- name: "performance"
color: 1d76db
description: "Improving performance, not introducing new features."
- name: "new-feature"
color: 0e8a16
description: "New features or options."
- name: "maintenance"
color: 2af79e
description: "Generic maintenance tasks."
- name: "ci"
color: 1d76db
description: "Work that improves the continue integration."
- name: "dependencies"
color: 1d76db
description: "Upgrade or downgrade of project dependencies."
- name: "python"
color: 3572A5
description: "Related to Python code or dependencies."
- name: "docker"
color: 2496ED
description: "Related to Docker configuration or images."
- name: "in-progress"
color: fbca04
description: "Issue is currently being resolved by a developer."
- name: "stale"
color: fef2c0
description: "There has not been activity on this issue or PR for quite some time."
- name: "no-stale"
color: fef2c0
description: "This issue or PR is exempted from the stable bot."
- name: "security"
color: ee0701
description: "Marks a security issue that needs to be resolved ASAP."
- name: "incomplete"
color: fef2c0
description: "Marks a PR or issue that is missing information."
- name: "invalid"
color: fef2c0
description: "Marks a PR or issue that is missing information."
- name: "beginner-friendly"
color: 0e8a16
description: "Good first issue for people wanting to contribute to the project."
- name: "help-wanted"
color: 0e8a16
description: "We need some extra helping hands or expertise in order to resolve this."
- name: "priority-critical"
color: ee0701
description: "This should be dealt with ASAP. Not fixing this issue would be a serious error."
- name: "priority-high"
color: b60205
description: "After critical issues are fixed, these should be dealt with before any further issues."
- name: "priority-medium"
color: 0e8a16
description: "This issue may be useful, and needs some attention."
- name: "priority-low"
color: e4ea8a
description: "Nice addition, maybe... someday..."
- name: "major"
color: b60205
description: "This PR causes a major version bump in the version number."
- name: "minor"
color: 0e8a16
description: "This PR causes a minor version bump in the version number."
+75
View File
@@ -0,0 +1,75 @@
name: Code Quality
on:
push:
branches: [ "main", "master" ]
paths:
- "**.py"
- "requirements.txt"
- ".github/workflows/code-quality.yml"
pull_request:
paths:
- "**.py"
- "requirements.txt"
- ".github/workflows/code-quality.yml"
workflow_dispatch:
jobs:
linting:
name: Code Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort mypy
- name: Run Black (Code Formatter Check)
run: black --check --diff .
- name: Run isort (Import Sorting Check)
run: isort --check-only --diff .
- name: Run Flake8 (Linting)
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run Flake8 (Complexity Check)
run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
security:
name: Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit[toml]
- name: Run Bandit Security Scan
run: bandit -r . -f json -o bandit-report.json || true
- name: Display Bandit Results
run: |
if [ -f bandit-report.json ]; then
cat bandit-report.json
fi