mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
docs: add contributing guide and issue/PR templates
This commit is contained in:
145
.github/ISSUE_TEMPLATE/1.bug.yml
vendored
145
.github/ISSUE_TEMPLATE/1.bug.yml
vendored
@@ -1,131 +1,46 @@
|
|||||||
name: Bug report 🐛
|
name: Bug report 🐛
|
||||||
description: 项目运行中遇到的Bug或问题。
|
description: Report a bug or unexpected behavior.
|
||||||
|
title: "[Bug] "
|
||||||
labels: ['status: needs check']
|
labels: ['status: needs check']
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
### ⚠️ 前置确认
|
> 💡 English is recommended so global developers can help. 【中文用户】推荐使用英文提交,谢谢 ❤️
|
||||||
1. 网络能够访问openai接口
|
|
||||||
2. python 已安装:版本在 3.7 ~ 3.10 之间
|
|
||||||
3. `git pull` 拉取最新代码
|
|
||||||
4. 执行`pip3 install -r requirements.txt`,检查依赖是否满足
|
|
||||||
5. 拓展功能请执行`pip3 install -r requirements-optional.txt`,检查依赖是否满足
|
|
||||||
6. [FAQS](https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs) 中无类似问题
|
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: 前置确认
|
label: Self check
|
||||||
options:
|
options:
|
||||||
- label: 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在[FAQS](https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs)中也未找到类似问题。
|
- label: I'm on the latest version and searched [existing issues](https://github.com/zhayujie/CowAgent/issues) (incl. closed) — no duplicate.
|
||||||
required: true
|
required: true
|
||||||
- type: checkboxes
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: ⚠️ 搜索issues中是否已存在类似问题
|
label: Environment
|
||||||
description: >
|
description: "Version (`cow status`), OS, Python version, install method, model & channel."
|
||||||
请在 [历史issue](https://github.com/zhayujie/chatgpt-on-wechat/issues) 中清空输入框,搜索你的问题
|
placeholder: |
|
||||||
或相关日志的关键词来查找是否存在类似问题。
|
Version: v1.2.0
|
||||||
options:
|
OS: macOS / Linux / Windows / Docker
|
||||||
- label: 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue
|
Python: 3.11
|
||||||
required: true
|
Install: installer / Docker / source
|
||||||
- type: markdown
|
Model & channel: deepseek-v4-flash, web
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
请在上方的`title`中填写你对你所遇到问题的简略总结,这将帮助其他人更好的找到相似问题,谢谢❤️。
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: 操作系统类型?
|
|
||||||
description: >
|
|
||||||
请选择你运行程序的操作系统类型。
|
|
||||||
options:
|
|
||||||
- Windows
|
|
||||||
- Linux
|
|
||||||
- MacOS
|
|
||||||
- Docker
|
|
||||||
- Railway
|
|
||||||
- Windows Subsystem for Linux (WSL)
|
|
||||||
- Other (请在问题中说明)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: 运行的python版本是?
|
|
||||||
description: |
|
|
||||||
请选择你运行程序的`python`版本。
|
|
||||||
注意:在`python 3.7`中,有部分可选依赖无法安装。
|
|
||||||
经过长时间的观察,我们认为`python 3.8`是兼容性最好的版本。
|
|
||||||
`python 3.7`~`python 3.10`以外版本的issue,将视情况直接关闭。
|
|
||||||
options:
|
|
||||||
- python 3.7
|
|
||||||
- python 3.8
|
|
||||||
- python 3.9
|
|
||||||
- python 3.10
|
|
||||||
- other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: 使用的chatgpt-on-wechat版本是?
|
|
||||||
description: |
|
|
||||||
请确保你使用的是 [releases](https://github.com/zhayujie/chatgpt-on-wechat/releases) 中的最新版本。
|
|
||||||
如果你使用git, 请使用`git branch`命令来查看分支。
|
|
||||||
options:
|
|
||||||
- Latest Release
|
|
||||||
- Master (branch)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: 运行的`channel`类型是?
|
|
||||||
description: |
|
|
||||||
请确保你正确配置了该`channel`所需的配置项,所有可选的配置项都写在了[该文件中](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/config.py),请将所需配置项填写在根目录下的`config.json`文件中。
|
|
||||||
options:
|
|
||||||
- wechatmp(公众号, 订阅号)
|
|
||||||
- wechatmp_service(公众号, 服务号)
|
|
||||||
- terminal
|
|
||||||
- other
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: 复现步骤 🕹
|
label: What happened?
|
||||||
description: |
|
description: "Steps to reproduce, what you expected, and what happened instead. Screenshots welcome."
|
||||||
**⚠️ 不能复现将会关闭issue.**
|
placeholder: |
|
||||||
- type: textarea
|
1. ...
|
||||||
attributes:
|
2. ...
|
||||||
label: 问题描述 😯
|
|
||||||
description: 详细描述出现的问题,或提供有关截图。
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: 终端日志 📒
|
|
||||||
description: |
|
|
||||||
在此处粘贴终端日志,可在主目录下`run.log`文件中找到,这会帮助我们更好的分析问题,注意隐去你的API key。
|
|
||||||
如果在配置文件中加入`"debug": true`,打印出的日志会更有帮助。
|
|
||||||
|
|
||||||
<details>
|
Expected: ...
|
||||||
<summary><i>示例</i></summary>
|
Actual: ...
|
||||||
```log
|
validations:
|
||||||
[DEBUG][2023-04-16 00:23:22][plugin_manager.py:157] - Plugin SUMMARY triggered by event Event.ON_HANDLE_CONTEXT
|
required: true
|
||||||
[DEBUG][2023-04-16 00:23:22][main.py:221] - [Summary] on_handle_context. content: $总结前100条消息
|
- type: textarea
|
||||||
[DEBUG][2023-04-16 00:23:24][main.py:240] - [Summary] limit: 100, duration: -1 seconds
|
attributes:
|
||||||
[ERROR][2023-04-16 00:23:24][chat_channel.py:244] - Worker return exception: name 'start_date' is not defined
|
label: Logs
|
||||||
Traceback (most recent call last):
|
description: "Relevant logs from `nohup.out` (set `\"debug\": true` for more detail). ⚠️ Redact your API keys."
|
||||||
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
|
render: shell
|
||||||
result = self.fn(*self.args, **self.kwargs)
|
validations:
|
||||||
File "D:\project\chatgpt-on-wechat\channel\chat_channel.py", line 132, in _handle
|
required: false
|
||||||
reply = self._generate_reply(context)
|
|
||||||
File "D:\project\chatgpt-on-wechat\channel\chat_channel.py", line 142, in _generate_reply
|
|
||||||
e_context = PluginManager().emit_event(EventContext(Event.ON_HANDLE_CONTEXT, {
|
|
||||||
File "D:\project\chatgpt-on-wechat\plugins\plugin_manager.py", line 159, in emit_event
|
|
||||||
instance.handlers[e_context.event](e_context, *args, **kwargs)
|
|
||||||
File "D:\project\chatgpt-on-wechat\plugins\summary\main.py", line 255, in on_handle_context
|
|
||||||
records = self._get_records(session_id, start_time, limit)
|
|
||||||
File "D:\project\chatgpt-on-wechat\plugins\summary\main.py", line 96, in _get_records
|
|
||||||
c.execute("SELECT * FROM chat_records WHERE sessionid=? and timestamp>? ORDER BY timestamp DESC LIMIT ?", (session_id, start_date, limit))
|
|
||||||
NameError: name 'start_date' is not defined
|
|
||||||
[INFO][2023-04-16 00:23:36][app.py:14] - signal 2 received, exiting...
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
value: |
|
|
||||||
```log
|
|
||||||
<此处粘贴终端日志>
|
|
||||||
```
|
|
||||||
|
|||||||
31
.github/ISSUE_TEMPLATE/2.feature.yml
vendored
31
.github/ISSUE_TEMPLATE/2.feature.yml
vendored
@@ -1,28 +1,33 @@
|
|||||||
name: Feature request 🚀
|
name: Feature request 🚀
|
||||||
description: 提出你对项目的新想法或建议。
|
description: Suggest a new idea or improvement.
|
||||||
|
title: "[Feature] "
|
||||||
labels: ['status: needs check']
|
labels: ['status: needs check']
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
请在上方的`title`中填写简略总结,谢谢❤️。
|
> 💡 English is recommended so global developers can help. 【中文用户】推荐使用英文提交,谢谢 ❤️
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: ⚠️ 搜索是否存在类似issue
|
label: Self check
|
||||||
description: >
|
|
||||||
请在 [历史issue](https://github.com/zhayujie/chatgpt-on-wechat/issues) 中清空输入框,搜索关键词查找是否存在相似issue。
|
|
||||||
options:
|
options:
|
||||||
- label: 我已经搜索过issues和disscussions,没有发现相似issue
|
- label: I searched [existing issues](https://github.com/zhayujie/CowAgent/issues) (incl. closed) — no duplicate.
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: 总结
|
label: What problem does this solve?
|
||||||
description: 描述feature的功能。
|
description: "The use case or pain point — what are you trying to do, and what gets in the way?"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: 举例
|
label: Proposed solution
|
||||||
description: 提供聊天示例,草图或相关网址。
|
description: "What you'd like. Examples, sketches, or links welcome."
|
||||||
- type: textarea
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: 动机
|
label: Contribution
|
||||||
description: 描述你提出该feature的动机,比如没有这项feature对你的使用造成了怎样的影响。 请提供更详细的场景描述,这可能会帮助我们发现并提出更好的解决方案。
|
options:
|
||||||
|
- label: I'd be interested in helping implement this.
|
||||||
|
required: false
|
||||||
|
|||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: 📖 Documentation
|
||||||
|
url: https://docs.cowagent.ai
|
||||||
|
about: Setup guides, configuration, and FAQ.
|
||||||
21
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
21
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
Thanks for your contribution! Please write this PR in English.
|
||||||
|
【中文开发者】请使用英文填写,感谢 ❤️
|
||||||
|
-->
|
||||||
|
|
||||||
|
## What does this PR do?
|
||||||
|
|
||||||
|
<!-- A short description of the change and why it's needed. -->
|
||||||
|
|
||||||
|
## Type of change
|
||||||
|
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] New feature
|
||||||
|
- [ ] Docs
|
||||||
|
- [ ] Refactor / chore
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
- [ ] I tested this change locally
|
||||||
|
- [ ] Code comments and docs are in English
|
||||||
|
- [ ] Linked related issue (if any): closes #
|
||||||
61
CONTRIBUTING.md
Normal file
61
CONTRIBUTING.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Contributing to CowAgent
|
||||||
|
|
||||||
|
Thanks for taking the time to contribute! 🎉 CowAgent is built by a global
|
||||||
|
community, and contributions of all sizes are welcome — from typo fixes to new
|
||||||
|
features.
|
||||||
|
|
||||||
|
## Language policy
|
||||||
|
|
||||||
|
To keep the project accessible to a global community, **please write issues,
|
||||||
|
pull requests, code comments, and commit messages in English.**
|
||||||
|
|
||||||
|
> 【致中文开发者】为方便全球开发者协作,请尽量使用**英文**提交 issue、PR、代码注释与
|
||||||
|
> commit message。不必担心英文不完美——表达清楚即可,工具翻译也完全没问题。感谢理解 ❤️
|
||||||
|
|
||||||
|
## Reporting issues
|
||||||
|
|
||||||
|
Found a bug or have an idea? [Open an issue](https://github.com/zhayujie/CowAgent/issues/new/choose).
|
||||||
|
|
||||||
|
Before opening one, please search existing issues (including closed ones) to
|
||||||
|
avoid duplicates, and make sure you're on the latest version.
|
||||||
|
|
||||||
|
## Submitting a pull request
|
||||||
|
|
||||||
|
1. **Fork** the repo and create a branch from `master`
|
||||||
|
(e.g. `feat/web-search`, `fix/telegram-reconnect`).
|
||||||
|
2. Make your change. Keep it focused — one logical change per PR.
|
||||||
|
3. Follow the existing code style. Write comments and docstrings in English.
|
||||||
|
4. Run the app locally to confirm your change works.
|
||||||
|
5. Open a PR with a clear title and a short description of **what** and **why**.
|
||||||
|
|
||||||
|
We keep the bar friendly: clear, focused, and working is enough. Maintainers are
|
||||||
|
happy to help polish details during review.
|
||||||
|
|
||||||
|
### Commit & PR titles
|
||||||
|
|
||||||
|
Use a short, imperative summary. The [Conventional Commits](https://www.conventionalcommits.org/)
|
||||||
|
style is preferred but not required:
|
||||||
|
|
||||||
|
```
|
||||||
|
feat: add web search tool
|
||||||
|
fix: reconnect Telegram websocket on timeout
|
||||||
|
docs: clarify Docker setup
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development setup
|
||||||
|
|
||||||
|
See the [Install from Source](https://docs.cowagent.ai/guide/manual-install)
|
||||||
|
guide. In short:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/zhayujie/CowAgent.git
|
||||||
|
cd CowAgent
|
||||||
|
pip install -r requirements.txt
|
||||||
|
pip install -e .
|
||||||
|
cow start
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code of conduct
|
||||||
|
|
||||||
|
Be respectful and constructive. We want CowAgent to be a welcoming place for
|
||||||
|
everyone.
|
||||||
Reference in New Issue
Block a user