SHA256
initial commit
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
# Issue Templates
|
||||
|
||||
结构化的 Issue 模板, 引导学生在提问前思考、规范问题描述, 减少低质量和重复提问。
|
||||
|
||||
## 设计理念
|
||||
|
||||
每个模板都包含以下引导机制:
|
||||
|
||||
1. **强制先思考再提问** - 每个模板都有"你目前的理解"或"已尝试的方法"必填字段, 促使学生先尝试自己解决
|
||||
2. **减少重复提问** - 提交确认中要求"已搜索过已有 Issue"
|
||||
3. **结构化信息收集** - 使用 YAML 表单格式(dropdown、textarea with render 等), 比自由文本更规范
|
||||
4. **禁止空白 Issue** - `config.yaml` 设置 `blank_issues_enabled: false`, 强制使用模板
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
issue-templates/
|
||||
├── general/ general 仓库使用
|
||||
│ └── .gitea/ISSUE_TEMPLATE/
|
||||
│ ├── config.yaml 禁止空白 Issue + 外部链接
|
||||
│ ├── course-question.yaml 课程内容 / 知识点答疑
|
||||
│ ├── homework-help.yaml 编程作业问题
|
||||
│ └── env-setup.yaml 环境配置问题
|
||||
└── homework/ hwXX 作业仓库使用
|
||||
└── .gitea/ISSUE_TEMPLATE/
|
||||
├── config.yaml 禁止空白 Issue + 引导到 general
|
||||
└── homework-help.yaml 编程作业问题(无作业编号字段)
|
||||
```
|
||||
|
||||
## 模板说明
|
||||
|
||||
### general 仓库(3 个模板)
|
||||
|
||||
#### 课程内容 / 知识点答疑 (`course-question.yaml`)
|
||||
|
||||
适用于 C/C++ 语法、数据结构、算法等课程内容的概念性疑问。
|
||||
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|:----:|------|
|
||||
| 问题分类 | dropdown | Y | 语法 / 数据类型 / 指针与内存 / 函数 / 结构体 / 文件操作 / 预处理 / 其他 |
|
||||
| 问题描述 | textarea | Y | 清晰描述问题 |
|
||||
| 你目前的理解 | textarea | Y | 描述当前理解和困惑点 |
|
||||
| 参考资料 | textarea | N | 已查阅的教材/网络资源 |
|
||||
| 提交确认 | checkboxes | Y | 已搜索重复 + 已查阅教材 |
|
||||
|
||||
#### 编程作业问题 (`homework-help.yaml`)
|
||||
|
||||
适用于作业中遇到的编译错误、运行时错误、逻辑问题。
|
||||
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|:----:|------|
|
||||
| 作业编号 | input | Y | 如 "hw03 第2题" |
|
||||
| 问题类型 | dropdown | Y | 编译错误 / 运行时错误 / 逻辑错误 / 思路不清晰 / 其他 |
|
||||
| 问题描述 | textarea | Y | |
|
||||
| 相关代码 | textarea (render: c) | Y | 代码片段, 自动语法高亮 |
|
||||
| 错误信息 / 实际输出 | textarea (render: shell) | N | |
|
||||
| 期望行为 | textarea | Y | |
|
||||
| 已尝试的调试方法 | textarea | Y | 核心引导字段 |
|
||||
| 提交确认 | checkboxes | Y | 已搜索重复 + 仅贴相关代码 |
|
||||
|
||||
#### 环境配置问题 (`env-setup.yaml`)
|
||||
|
||||
适用于 IDE 安装、编译器配置、开发环境搭建问题。课程统一使用 Windows。
|
||||
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|:----:|------|
|
||||
| IDE / 编辑器 | dropdown | Y | Visual Studio / VS Code / CLion / Dev-C++ / Code::Blocks / 其他 |
|
||||
| 编译器 | dropdown | Y | MSVC / GCC (MinGW) / Clang / 不确定 / 其他 |
|
||||
| 问题描述 | textarea | Y | |
|
||||
| 已尝试的解决方法 | textarea | Y | 核心引导字段 |
|
||||
| 错误截图 / 日志 | textarea | N | 支持拖拽上传图片 |
|
||||
| 提交确认 | checkboxes | Y | 已搜索重复 + 已查阅配置指南 |
|
||||
|
||||
### homework 仓库(1 个模板)
|
||||
|
||||
作业仓库仅包含 `homework-help.yaml`, 与 general 版本的区别:
|
||||
|
||||
- **无"作业编号"字段** - 仓库名(hw01, hw02...)本身即标识作业
|
||||
- **新增"题目理解"问题类型** - dropdown 中增加此选项
|
||||
- **config.yaml 中引导非作业问题到 general 仓库**
|
||||
|
||||
## 部署方式
|
||||
|
||||
模板通过 Python CLI 工具推送到仓库:
|
||||
|
||||
```bash
|
||||
# 初始化时自动推送到 general 仓库
|
||||
uv run tjhlp setup init --org tjhlp-2025f
|
||||
|
||||
# 创建作业仓库时自动推送作业模板
|
||||
uv run tjhlp repos create-homework --org tjhlp-2025f --number 1
|
||||
|
||||
# 手动推送到指定仓库
|
||||
uv run tjhlp repos init-templates tjhlp-2025f/general --type general
|
||||
uv run tjhlp repos init-templates tjhlp-2025f/hw01 --type homework
|
||||
```
|
||||
|
||||
## 自定义
|
||||
|
||||
如需调整模板内容(如添加新的问题分类、修改引导文案), 直接编辑对应的 YAML 文件, 然后重新推送:
|
||||
|
||||
```bash
|
||||
uv run tjhlp repos init-templates tjhlp-2025f/general --type general
|
||||
```
|
||||
|
||||
YAML 模板语法参考 [Gitea 文档](https://docs.gitea.com/usage/issue-pull-request-templates#syntax-for-yaml-template)。
|
||||
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 课程主页
|
||||
url: https://example.com
|
||||
about: 访问课程主页获取有关资源
|
||||
- name: 常见问题汇总
|
||||
url: https://example.com/faq
|
||||
about: 提问前请先查阅常见问题汇总
|
||||
@@ -0,0 +1,73 @@
|
||||
name: 课程内容 / 知识点答疑
|
||||
about: 关于 C/C++ 语法、算法、数据结构等课程内容的疑问
|
||||
title: "[课程答疑] "
|
||||
labels:
|
||||
- 课程内容
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 提问前请确认
|
||||
|
||||
- 请先在 Issue 列表中搜索是否已有相同或类似的问题
|
||||
- 请先查阅课件中的相关章节
|
||||
- 清晰地描述你的问题, 并说明你目前的理解——这有助于助教更准确地帮助你
|
||||
|
||||
- type: dropdown
|
||||
id: category
|
||||
attributes:
|
||||
label: 问题分类
|
||||
description: 选择最接近你问题的分类
|
||||
options:
|
||||
- 语法问题
|
||||
- 数据类型与运算
|
||||
- 指针与内存管理
|
||||
- 函数
|
||||
- 数组与字符串
|
||||
- 结构体与联合体
|
||||
- 文件操作
|
||||
- 预处理与编译
|
||||
- 其他
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
description: 清晰、具体地描述你的问题
|
||||
placeholder: |
|
||||
例如: 我在学习指针数组和数组指针时, 不理解 int *p[3] 和 int (*p)[3] 的区别……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: current-understanding
|
||||
attributes:
|
||||
label: 你目前的理解
|
||||
description: 描述你对这个问题目前的理解, 以及具体哪里感到困惑。这一步很重要——尝试用自己的话表述, 有助于理清思路。
|
||||
placeholder: |
|
||||
例如: 我目前理解 int *p[3] 是一个包含 3 个 int 指针的数组, 但不确定 int (*p)[3] 为什么要加括号……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: references
|
||||
attributes:
|
||||
label: 参考资料
|
||||
description: 你已经查阅了哪些教材章节、课件页码或网络资源?(选填)
|
||||
placeholder: |
|
||||
例如: 教材第 8 章 8.3 节;课件第 12 讲第 15 页;CSDN 上搜索了"指针数组 vs 数组指针"……
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: confirmations
|
||||
attributes:
|
||||
label: 提交确认
|
||||
description: 请确认以下事项
|
||||
options:
|
||||
- label: 我已在 Issue 列表中搜索过, 确认没有重复的问题
|
||||
required: true
|
||||
- label: 我已查阅教材或课件中的相关内容
|
||||
required: true
|
||||
@@ -0,0 +1,68 @@
|
||||
name: 环境配置问题
|
||||
about: IDE 安装、编译器配置、开发环境搭建等问题
|
||||
title: "[环境配置] "
|
||||
labels:
|
||||
- 环境配置
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 提问前请确认
|
||||
|
||||
- 请先查阅课程提供的环境配置指南
|
||||
- 在 Issue 列表中搜索是否已有相同的环境问题及解决方案
|
||||
- 尽量提供完整的错误截图或日志信息
|
||||
|
||||
- type: dropdown
|
||||
id: compiler
|
||||
attributes:
|
||||
label: 编译器
|
||||
description: 你使用的开发工具
|
||||
options:
|
||||
- Visual Studio(MSVC)
|
||||
- 小熊猫 C++(gcc)
|
||||
- 其他(请说明)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
description: 描述你遇到的环境配置问题
|
||||
placeholder: |
|
||||
例如: VS 的“解决方案资源管理器”关闭后不知道在哪里打开
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: attempts
|
||||
attributes:
|
||||
label: 已尝试的解决方法
|
||||
description: 你已经尝试了哪些方法来解决这个问题?
|
||||
placeholder: |
|
||||
例如:
|
||||
- 按照课程指南重新安装了 MinGW
|
||||
- 检查了环境变量 PATH, 发现没有添加 MinGW 的 bin 目录
|
||||
- 在网上搜索了 "VS Code gcc not found" 但给出的方法没有解决……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: error-logs
|
||||
attributes:
|
||||
label: 错误截图 / 日志
|
||||
description: 请粘贴错误截图或完整的日志信息(选填, 可直接拖拽图片到此处)
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: confirmations
|
||||
attributes:
|
||||
label: 提交确认
|
||||
description: 请确认以下事项
|
||||
options:
|
||||
- label: 我已在 Issue 列表中搜索过, 确认没有重复的问题
|
||||
required: true
|
||||
- label: 我已查阅课程提供的环境配置指南
|
||||
required: true
|
||||
@@ -0,0 +1,100 @@
|
||||
name: 编程作业问题
|
||||
about: 作业中遇到的编译错误、运行时错误、逻辑问题等
|
||||
title: "[作业] "
|
||||
labels:
|
||||
- 编程作业
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 提问须知
|
||||
|
||||
- **请描述你的思路和卡点**, 而不是直接贴完整代码要求别人帮你写
|
||||
- 只贴出**与问题相关的代码片段**, 不要贴整个文件
|
||||
- 如果有编译错误或运行时错误, 请附上完整的错误信息
|
||||
- 先尝试自己调试(加 `cout` 输出中间变量、使用 VS 调试工具等), 并说明你尝试了什么
|
||||
|
||||
- type: input
|
||||
id: homework-id
|
||||
attributes:
|
||||
label: 作业编号
|
||||
description: 作业编号及题目(如适用)
|
||||
placeholder: "例如: 3-b3-1"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: problem-type
|
||||
attributes:
|
||||
label: 问题类型
|
||||
description: 选择最接近的问题类型
|
||||
options:
|
||||
- 编译错误
|
||||
- 运行时错误(崩溃/段错误)
|
||||
- 逻辑错误(输出不符合预期)
|
||||
- 思路不清晰(不知道怎么下手)
|
||||
- 其他
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
description: 简要描述你遇到的问题
|
||||
placeholder: |
|
||||
例如: 我的排序函数在处理包含重复元素的数组时输出结果不正确……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: code
|
||||
attributes:
|
||||
label: 相关代码
|
||||
description: 贴出与问题相关的代码片段(不要贴完整作业代码)
|
||||
render: cpp
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: error-output
|
||||
attributes:
|
||||
label: 错误信息 / 实际输出
|
||||
description: 编译器报错信息、程序崩溃信息或实际输出结果(选填)
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: 期望行为
|
||||
description: 描述你期望程序的正确行为或输出
|
||||
placeholder: |
|
||||
例如: 输入 [3, 1, 2, 1], 期望输出 [1, 1, 2, 3], 但实际输出 [1, 2, 3, 1]……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: debugging-attempts
|
||||
attributes:
|
||||
label: 已尝试的调试方法
|
||||
description: 你已经尝试了哪些方法来定位问题?这一步很重要——调试能力是编程的核心技能之一。
|
||||
placeholder: |
|
||||
例如:
|
||||
- 在循环中加了 cout 输出每轮交换后的数组内容
|
||||
- 检查了数组下标, 发现第 3 轮循环时 i 的值超出了范围
|
||||
- 用 VS 的断点调试逐步执行, 发现……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: confirmations
|
||||
attributes:
|
||||
label: 提交确认
|
||||
description: 请确认以下事项
|
||||
options:
|
||||
- label: 我已在 Issue 列表中搜索过, 确认没有重复的问题
|
||||
required: true
|
||||
- label: 我贴出的是与问题相关的代码片段, 而非完整作业代码
|
||||
required: true
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 一般性问题请到 general 仓库提问
|
||||
url: https://example.com
|
||||
about: 课程内容答疑、环境配置等非作业特定问题请到 general 仓库
|
||||
@@ -0,0 +1,93 @@
|
||||
name: 编程作业问题
|
||||
about: 本次作业中遇到的编译错误、运行时错误、逻辑问题等
|
||||
title: "[求助] "
|
||||
labels:
|
||||
- 编程作业
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 提问须知
|
||||
|
||||
- **请描述你的思路和卡点**, 而不是直接贴完整代码要求别人帮你写
|
||||
- 只贴出**与问题相关的代码片段**, 不要贴整个文件
|
||||
- 如果有编译错误或运行时错误, 请附上完整的错误信息
|
||||
- 先尝试自己调试(加 `printf` 输出中间变量、使用断点调试等), 并说明你尝试了什么
|
||||
- 课程内容答疑、环境配置等**非本次作业特定的问题**请到 **general** 仓库提问
|
||||
|
||||
- type: dropdown
|
||||
id: problem-type
|
||||
attributes:
|
||||
label: 问题类型
|
||||
description: 选择最接近的问题类型
|
||||
options:
|
||||
- 编译错误
|
||||
- 运行时错误(崩溃/段错误)
|
||||
- 逻辑错误(输出不符合预期)
|
||||
- 思路不清晰(不知道怎么下手)
|
||||
- 题目理解
|
||||
- 其他
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
description: 简要描述你遇到的问题(如涉及多道题目请注明题号)
|
||||
placeholder: |
|
||||
例如: 第 2 题, 我的排序函数在处理包含重复元素的数组时输出结果不正确……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: code
|
||||
attributes:
|
||||
label: 相关代码
|
||||
description: 贴出与问题相关的代码片段(不要贴完整作业代码)
|
||||
render: c
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: error-output
|
||||
attributes:
|
||||
label: 错误信息 / 实际输出
|
||||
description: 编译器报错信息、程序崩溃信息或实际输出结果(选填)
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: 期望行为
|
||||
description: 描述你期望程序的正确行为或输出
|
||||
placeholder: |
|
||||
例如: 输入 [3, 1, 2, 1], 期望输出 [1, 1, 2, 3], 但实际输出 [1, 2, 3, 1]……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: debugging-attempts
|
||||
attributes:
|
||||
label: 已尝试的调试方法
|
||||
description: 你已经尝试了哪些方法来定位问题?这一步很重要——调试能力是编程的核心技能之一。
|
||||
placeholder: |
|
||||
例如:
|
||||
- 在循环中加了 printf 输出每轮交换后的数组内容
|
||||
- 检查了数组下标, 发现第 3 轮循环时 i 的值超出了范围
|
||||
- 用 VS Code 的断点调试逐步执行, 发现……
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: confirmations
|
||||
attributes:
|
||||
label: 提交确认
|
||||
description: 请确认以下事项
|
||||
options:
|
||||
- label: 我已在 Issue 列表中搜索过, 确认没有重复的问题
|
||||
required: true
|
||||
- label: 我贴出的是与问题相关的代码片段, 而非完整作业代码
|
||||
required: true
|
||||
Reference in New Issue
Block a user