Skip to content

Commit 05c3951

Browse files
authored
docs: add issue templates and contributing guidelines (#307)
1 parent 558095a commit 05c3951

File tree

7 files changed

+309
-14
lines changed

7 files changed

+309
-14
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: '🐛 Bug report'
2+
description: Create a report to help us improve Tiny Robot
3+
title: '🐛 [Bug]: '
4+
labels: ['🐛 bug']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please fill out the following carefully in order to better fix the problem.
10+
- type: input
11+
id: tiny-robot-version
12+
attributes:
13+
label: Tiny Robot Version
14+
description: |
15+
### **Check if the issue is reproducible with the latest stable version.**
16+
You can use the command `npm ls @opentiny/tiny-robot` to view it
17+
placeholder: latest
18+
validations:
19+
required: true
20+
- type: input
21+
id: vue-version
22+
attributes:
23+
label: Vue Version
24+
placeholder: latest
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: minimal-repo
29+
attributes:
30+
label: Link to minimal reproduction
31+
description: |
32+
**Whenever possible, provide a minimal reproduction using the TinyRobot Playground at https://playground.opentiny.design/tiny-robot.html. Please do not paste random links, as this will lead to the issue being closed.**
33+
placeholder: Please Input
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: reproduce
38+
attributes:
39+
label: Steps to reproduce
40+
description: |
41+
**What actions should we perform to reproduce the bug? Clear and concise steps can help us locate the problem more quickly. Please clearly describe the steps to reproduce the issue. Issues without clear reproduction steps will not be addressed. Issues marked with 'need reproduction' that do not provide relevant steps within 7 days will be closed.**
42+
placeholder: Please Input
43+
validations:
44+
required: true
45+
- type: textarea
46+
id: expected
47+
attributes:
48+
label: What is expected
49+
placeholder: Please Input
50+
- type: textarea
51+
id: actually
52+
attributes:
53+
label: What is actually happening
54+
placeholder: Please Input
55+
- type: input
56+
id: project-name
57+
attributes:
58+
label: What is your project name
59+
description: We also welcome you to share more detailed project information here to help us understand your scenario better.
60+
placeholder: Please Input
61+
validations:
62+
required: true
63+
- type: textarea
64+
id: additional-comments
65+
attributes:
66+
label: Any additional comments (optional)
67+
description: |
68+
**Some background / context of how you ran into this bug.**
69+
placeholder: Please Input

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: true
2+
3+
contact_links:
4+
- name: 💬 Questions & Discussions
5+
url: https://github.com/opentiny/tiny-robot/discussions
6+
about: Ask questions or discuss ideas (not bugs or features)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ✨ Feature Request
2+
description: Propose new features to Tiny Robot to improve it.
3+
title: '✨ [Feature]: '
4+
labels: ['✨ feature']
5+
body:
6+
- type: textarea
7+
id: feature-solve
8+
attributes:
9+
label: What problem does this feature solve
10+
description: |
11+
Explain your use case, context, and rationale behind this feature request. More importantly, what is the end user experience you are trying to build that led to the need for this feature?
12+
placeholder: Please Input
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: feature-api
17+
attributes:
18+
label: What does the proposed API look like
19+
description: |
20+
Describe how you propose to solve the problem and provide code samples of how the API would work once implemented. Note that you can use Markdown to format your code blocks.
21+
placeholder: Please Input
22+
validations:
23+
required: true
24+
- type: input
25+
id: project-name
26+
attributes:
27+
label: What is your project name
28+
description: We also welcome you to share more detailed project information here to help us understand your scenario better.
29+
placeholder: Please Input
30+
validations:
31+
required: true

CONTRIBUTING.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Contributing
2+
3+
We are glad that you are willing to contribute to the Tiny Robot open source project. There are many forms of contribution, and you can choose one or more of them according to your strengths and interests:
4+
5+
- Report [new defect](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml)
6+
- Provide more detailed information for [existing defects](https://github.com/opentiny/tiny-robot/labels/bug), such as supplementary screenshots, more detailed reproduction steps, minimum reproducible demo links, etc.
7+
- Submit Pull Requests to fix typos in the document or make the document clearer and better
8+
9+
When you become familiar with Tiny Robot, you can try to do something more challenging, such as:
10+
11+
- Fix defects
12+
- Implement new features
13+
- Improve unit testing
14+
- Translate the document
15+
- Participate in code review
16+
17+
## Bug Reports
18+
19+
If you encounter problems while using Tiny Robot components, you are welcome to submit an Issue. Before submitting, please read the relevant documentation carefully to confirm whether this is a defect or an unimplemented feature.
20+
21+
If it is a defect, select the [Bug report](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml) template when creating a new Issue. The title should follow the format `[componentName] defect description`. For example: `[bubble] message content is not updated when data changes`.
22+
23+
Issue that reports defects should mainly include:
24+
25+
- Version numbers of `@opentiny/tiny-robot` and `vue`.
26+
- The performance of the defect can be illustrated by screenshot; if there is an error, the error message can be posted.
27+
- Defect reproduction steps, preferably with a minimum reproducible demo link.
28+
29+
If it is a new feature, select the [Feature request](https://github.com/opentiny/tiny-robot/issues/new?template=feature_request.yml) template. The title should follow the format `[componentName] new feature description`. For example: `[sender] hope to support custom placeholder`.
30+
31+
The following information is required for a new feature Issue:
32+
33+
- What problems does this feature mainly solve for users?
34+
- What is the API of this feature?
35+
36+
## Pull Requests
37+
38+
Before submitting a pull request, please make sure that your submission is in line with the overall plan of Tiny Robot. Generally, issues marked as [bug](https://github.com/opentiny/tiny-robot/labels/bug) are encouraged for pull requests. If you are not sure, you can create a [Discussion](https://github.com/opentiny/tiny-robot/discussions) for discussion.
39+
40+
### Pull Request Specification
41+
42+
#### Commit Message
43+
44+
The commit message should be in the form of `type(scope): description`, e.g. `fix(components): [bubble] fix xxx bug`.
45+
46+
1. **type**: must be one of build, chore, ci, docs, feat, fix, perf, refactor, revert, release, style, test, improvement.
47+
48+
2. **scope** (optional): package or component name, e.g. `components`, `kit`, `bubble`, `sender`, `docs`, etc.
49+
50+
#### Pull Request Title
51+
52+
The title should follow the same convention as the commit message, in the form of `type(scope): description`.
53+
54+
#### Pull Request Description
55+
56+
Please fill in the relevant information of the PR, including:
57+
58+
- PR checklist: whether the commit message follows the specifications, whether E2E/test cases are supplemented if needed, and whether documentation is updated if needed
59+
- PR type: Bugfix / Feature / Code style update / Refactoring / Docs / etc.
60+
- Related Issue number (if any)
61+
- Does this PR introduce a breaking change?
62+
63+
### Local Startup Steps
64+
65+
- Fork the [Tiny Robot](https://github.com/opentiny/tiny-robot) repository to your personal account.
66+
- Clone your fork to local.
67+
- Add the upstream remote to sync with the latest code from the upstream repository.
68+
- Run `pnpm i` in the Tiny Robot root directory to install dependencies.
69+
- Run `pnpm dev` to start the docs and playground.
70+
- Open the browser to access the docs and playground.
71+
72+
```shell
73+
# Replace username with your own GitHub username
74+
git clone git@github.com:username/tiny-robot.git
75+
cd tiny-robot
76+
77+
# Add upstream remote
78+
git remote add upstream git@github.com:opentiny/tiny-robot.git
79+
80+
# Install dependencies
81+
pnpm i
82+
83+
# Start docs and playground
84+
pnpm dev
85+
```
86+
87+
### Submit a PR
88+
89+
- Make sure you have completed the local startup steps and can run the project normally.
90+
- Sync the latest code from the upstream `develop` branch: `git pull upstream develop`.
91+
- Create a new branch from the upstream `develop` branch: `git checkout -b username/feat-xxx upstream/develop` (or `username/fix-xxx` for bugfix). Branch name should be `username/feat-xxx` or `username/fix-xxx`.
92+
- Make your changes locally.
93+
- Commit following the [Conventional Commits](https://www.conventionalcommits.org/) specification. PRs that do not follow the specification may not be merged.
94+
- Push to your fork: `git push origin branchName`.
95+
- Open the [Pull requests](https://github.com/opentiny/tiny-robot/pulls) page of the Tiny Robot repository and click **New pull request** to submit the PR.
96+
- Fill in the PR description (checklist, type, related Issue, breaking change).
97+
- After the maintainers review and comment, update the code as needed. New commits on the branch will automatically appear in the same PR.
98+
- After approval, a maintainer will merge the PR.
99+
100+
Thank you for your contribution!

CONTRIBUTING_zh.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# 贡献指南
2+
3+
很高兴你有意愿参与 Tiny Robot 开源项目的贡献,参与贡献的形式有很多种,你可以根据自己的特长和兴趣选择其中的一个或多个:
4+
5+
- 报告[新缺陷](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml)
6+
-[已有缺陷](https://github.com/opentiny/tiny-robot/labels/bug)提供更详细的信息,比如补充截图、提供更详细的复现步骤、提供最小可复现 demo 链接等
7+
- 提交 Pull Requests 修复文档中的错别字或让文档更清晰和完善
8+
9+
当你对 Tiny Robot 逐渐熟悉之后,可以尝试做一些更有挑战的事情,比如:
10+
11+
- 修复缺陷
12+
- 实现新特性
13+
- 完善单元测试
14+
- 翻译文档
15+
- 参与代码检视
16+
17+
## 提交 Issue
18+
19+
如果你在使用 Tiny Robot 组件过程中遇到问题,欢迎给我们提交 Issue。提交 Issue 之前,请先仔细阅读相关文档,确认这是一个缺陷还是尚未实现的功能。
20+
21+
如果是一个缺陷,创建新 Issue 时选择 [Bug report](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml) 模板,标题遵循 `[componentName] 缺陷简述` 的格式,比如:`[bubble] 数据变化时消息内容未更新`
22+
23+
报告缺陷的 Issue 主要需要填写以下信息:
24+
25+
- `@opentiny/tiny-robot``vue` 的版本号
26+
- 缺陷的表现,可截图辅助说明,如果有报错可贴上报错信息
27+
- 缺陷的复现步骤,最好能提供一个最小可复现 demo 链接
28+
29+
如果是一个新特性,则选择 [Feature request](https://github.com/opentiny/tiny-robot/issues/new?template=feature_request.yml) 模板,标题遵循 `[componentName] 新特性简述` 的格式,比如:`[sender] 希望能支持自定义 placeholder`
30+
31+
新特性的 Issue 主要需要填写以下信息:
32+
33+
- 该特性主要解决用户的什么问题
34+
- 该特性的 API 是什么样的
35+
36+
## 提交 PR
37+
38+
提交 PR 之前,请先确保你提交的内容符合 Tiny Robot 整体规划。一般已经标记为 [bug](https://github.com/opentiny/tiny-robot/labels/bug) 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 [Discussion](https://github.com/opentiny/tiny-robot/discussions) 进行讨论。
39+
40+
### Pull Request 规范
41+
42+
#### Commit 信息
43+
44+
commit 信息要以 `type(scope): 描述信息` 的形式填写,例如 `fix(components): [bubble] fix xxx bug`
45+
46+
1. **type**:必须是 build、chore、ci、docs、feat、fix、perf、refactor、revert、release、style、test、improvement 其中的一个。
47+
48+
2. **scope**(可选):包名或组件名,如 `components``kit``bubble``sender``docs` 等。
49+
50+
#### Pull Request 的标题
51+
52+
标题的规范与 commit 信息一样,以 `type(scope): 描述信息` 的形式填写。
53+
54+
#### Pull Request 的描述
55+
56+
请填写 PR 相关信息,主要包括:
57+
58+
- PR 自检项:Commit 信息是否符合规范、是否在需要时补充了 E2E/测试用例、是否更新了文档
59+
- PR 类型:缺陷修复、新特性、代码格式调整、重构、文档等
60+
- 关联的 Issue 编号(如有)
61+
- 是否包含破坏性变更
62+
63+
### 本地启动步骤
64+
65+
- 点击 [Tiny Robot](https://github.com/opentiny/tiny-robot) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库
66+
- Clone 个人仓库到本地
67+
- 关联上游仓库,方便同步上游仓库最新代码
68+
- 在 Tiny Robot 根目录下运行 `pnpm i`,安装依赖
69+
- 运行 `pnpm dev`,启动文档和演练场
70+
- 打开浏览器访问文档和演练场
71+
72+
```shell
73+
# username 为你的 GitHub 用户名,执行前请替换
74+
git clone git@github.com:username/tiny-robot.git
75+
cd tiny-robot
76+
77+
# 关联上游仓库
78+
git remote add upstream git@github.com:opentiny/tiny-robot.git
79+
80+
# 安装依赖
81+
pnpm i
82+
83+
# 启动文档和演练场
84+
pnpm dev
85+
```
86+
87+
### 提交 PR 的步骤
88+
89+
- 请确保你已经完成本地启动中的步骤,并能正常运行项目
90+
- 同步上游仓库 develop 分支最新代码:`git pull upstream develop`
91+
- 从上游仓库 develop 分支创建新分支:`git checkout -b username/feat-xxx upstream/develop`(修复缺陷可用 `username/fix-xxx`),分支名建议为 `username/feat-xxx` / `username/fix-xxx`
92+
- 本地编码
93+
- 遵循 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/v1.0.0/) 规范进行提交,不符合提交规范的 PR 将不会被合并
94+
- 提交到远程仓库:`git push origin branchName`
95+
- 打开 Tiny Robot 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-robot/pulls) 链接,点击 **New pull request** 按钮提交 PR
96+
- 填写 PR 描述(自检项、类型、关联 Issue、是否破坏性变更)
97+
- 项目维护者进行 Code Review 并提出意见
98+
- PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR
99+
- 项目维护者合并 PR
100+
101+
贡献流程结束,感谢你的贡献!

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,7 @@ MIT License - see [LICENSE](./LICENSE) file for details.
175175

176176
## 🤝 Contributing
177177

178-
Contributions are welcome! Please feel free to submit a Pull Request.
179-
180-
1. Fork the repository
181-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
182-
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
183-
4. Push to the branch (`git push origin feature/AmazingFeature`)
184-
5. Open a Pull Request
178+
Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) to understand the recommended workflow, commit message conventions, and how to submit Issues and Pull Requests.
185179

186180
## 📞 Support
187181

README_zh.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,7 @@ MIT 许可证 - 查看 [LICENSE](./LICENSE) 文件了解详情。
175175

176176
## 🤝 贡献
177177

178-
欢迎贡献!请随时提交 Pull Request。
179-
180-
1. Fork 本仓库
181-
2. 创建你的功能分支(`git checkout -b feature/AmazingFeature`
182-
3. 提交你的更改(`git commit -m 'Add some AmazingFeature'`
183-
4. 推送到分支(`git push origin feature/AmazingFeature`
184-
5. 发起 Pull Request
178+
欢迎贡献!请阅读[贡献指南](./CONTRIBUTING_zh.md)了解推荐的工作流程、Commit 规范以及如何提交 Issue 和 Pull Request。
185179

186180
## 📞 支持
187181

0 commit comments

Comments
 (0)