Skip to content

Commit ae2c267

Browse files
committed
feat: add issue and pull request templates for better contribution guidelines
1 parent acc810f commit ae2c267

5 files changed

Lines changed: 183 additions & 0 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Bug report
2+
description: Report a bug, regression, or content problem / 提交 Bug、回归或内容问题
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for reporting this issue.
11+
12+
感谢反馈问题。请尽量提供可复现信息,方便快速定位。
13+
14+
- type: dropdown
15+
id: area
16+
attributes:
17+
label: Affected area / 影响范围
18+
description: Which part is affected?
19+
options:
20+
- Docs / 文档
21+
- UI / UX
22+
- i18n / 多语言
23+
- Generator / 提示词生成器
24+
- Cloudflare deploy / Cloudflare 部署
25+
- CI / GitHub Actions
26+
- Other / 其他
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: summary
32+
attributes:
33+
label: What happened? / 问题现象
34+
description: Describe the bug clearly.
35+
placeholder: Tell us what you expected and what actually happened.
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: steps
41+
attributes:
42+
label: Steps to reproduce / 复现步骤
43+
description: Provide the smallest reproducible steps.
44+
placeholder: |
45+
1. Go to ...
46+
2. Click ...
47+
3. See error ...
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: environment
53+
attributes:
54+
label: Environment / 环境信息
55+
description: Browser, OS, device, deployment environment, etc.
56+
placeholder: Windows 11, Chrome 136, Cloudflare Workers, main branch
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: evidence
62+
attributes:
63+
label: Logs, screenshots, or links / 日志、截图或链接
64+
description: Paste relevant errors, screenshots, or page links.
65+
render: shell
66+
67+
- type: checkboxes
68+
id: checks
69+
attributes:
70+
label: Checklist / 检查清单
71+
options:
72+
- label: I searched existing issues first / 我已先搜索现有 issue
73+
- label: I can still reproduce this on the latest main / 最新 main 上仍可复现

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Feature request
2+
description: Suggest an improvement for UX, content, docs, or workflow / 提交体验、内容、文档或流程优化建议
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Share the user problem first, then the proposed solution.
11+
12+
请优先描述用户问题,再描述你建议的方案。
13+
14+
- type: dropdown
15+
id: area
16+
attributes:
17+
label: Area / 领域
18+
options:
19+
- Docs / 文档
20+
- UI / UX
21+
- i18n / 多语言
22+
- Lessons / 教程内容
23+
- Generator / 提示词生成器
24+
- Build / Deploy
25+
- CI / GitHub Actions
26+
- Other / 其他
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: problem
32+
attributes:
33+
label: User problem / 用户问题
34+
description: What friction, confusion, or missing value are users facing?
35+
placeholder: Describe the user pain point.
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: proposal
41+
attributes:
42+
label: Proposed solution / 建议方案
43+
description: What change would improve the experience?
44+
placeholder: Describe the improvement you want to see.
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: outcome
50+
attributes:
51+
label: Expected outcome / 预期效果
52+
description: What should become easier, clearer, or more reliable?
53+
placeholder: Explain the expected user-facing result.
54+
55+
- type: textarea
56+
id: references
57+
attributes:
58+
label: References / 参考信息
59+
description: Add screenshots, examples, links, or related issues.
60+
61+
- type: checkboxes
62+
id: checks
63+
attributes:
64+
label: Checklist / 检查清单
65+
options:
66+
- label: This request is focused on one clear improvement / 这个建议聚焦于一个明确改进点
67+
- label: I checked whether this is already covered in docs or issues / 我已检查文档或现有 issue 中是否已覆盖

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Summary / 概要
2+
3+
- What changed?
4+
- 这次改动解决了什么问题?
5+
6+
## Why / 背景
7+
8+
- Why is this change needed?
9+
- 这项改动想改善什么用户体验、流程或稳定性?
10+
11+
## Scope / 范围
12+
13+
- [ ] Docs / 文档
14+
- [ ] UI / UX
15+
- [ ] i18n / 多语言
16+
- [ ] Build / CI / Deploy
17+
- [ ] Content / 教程内容
18+
- [ ] Other / 其他
19+
20+
## Validation / 验证
21+
22+
- [ ] `npm run build`
23+
- [ ] Manual smoke test / 手动冒烟验证
24+
- [ ] Screenshots attached when UI changed / UI 改动已附截图
25+
26+
Validation notes / 验证说明:
27+
28+
## Risks / 风险
29+
30+
- Any known risks, tradeoffs, or follow-up work?
31+
- 是否有已知风险、权衡或后续待办?
32+
33+
## Checklist / 检查清单
34+
35+
- [ ] I tested the changed behavior locally
36+
- [ ] 我已检查文案、链接和中英文内容是否一致
37+
- [ ] I updated docs when needed
38+
- [ ] 我确认没有提交本地构建产物或临时文件

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CI
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -11,6 +12,9 @@ on:
1112
permissions:
1213
contents: read
1314

15+
env:
16+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
17+
1418
concurrency:
1519
group: ci-${{ github.workflow }}-${{ github.ref }}
1620
cancel-in-progress: true

0 commit comments

Comments
 (0)