本文档提供了 Animate.css 存储库中使用的 issue 和 pull request 模板的技术概述。这些模板标准化了贡献者报告 bug、请求功能以及提交代码更改的方式。有关一般贡献工作流和指南的信息,请参阅贡献指南。
Animate.css 实现了 GitHub 的 issue 模板功能,为贡献者提供结构化表单。这些模板可确保维护者收到一致且完整的信息,以便高效地处理 issue。
来源:.github/ISSUE_TEMPLATE/bugs.yml .github/ISSUE_TEMPLATE/features.yml
Bug report template 以 YAML 格式定义,创建一个结构化表单,指导贡献者提供有关遇到问题的基本信息。
Bug report template 包含以下关键部分:
| 字段 | 必填 | 目的 |
|---|---|---|
| Bug Description | 是 | 对 bug 是什么的清晰解释 |
| Steps to Reproduce | 否 | 重现问题的编号步骤 |
| 预期行为 | 否 | What should happen instead |
| 屏幕截图 | 否 | 问题的视觉证据 |
| Desktop Environment | 否 | 操作系统、浏览器和版本详情 |
| Mobile Environment | 否 | 设备、操作系统、浏览器和版本详情 |
| 附加上下文 | 否 | Any other relevant information |
来源:.github/ISSUE_TEMPLATE/bugs.yml5-73
Bug 描述模板使用结构化 YAML,其中包含特定的字段类型和验证要求。
来源:.github/ISSUE_TEMPLATE/bugs.yml1-75
Feature request template 能够让贡献者以结构化的方式提出新的功能或改进,帮助维护者理解其背景和价值。
Feature request template 包含以下关键部分:
| 字段 | 必填 | 目的 |
|---|---|---|
| 问题描述 | 是 | Description of the issue the feature addresses |
| Solution Description | 是 | Proposed implementation or approach |
| Alternatives Considered | 是 | Other approaches that could solve the problem |
| 附加上下文 | 否 | Any other relevant information |
来源:.github/ISSUE_TEMPLATE/features.yml5-36
Feature request template 的结构强调了理解拟议增强功能背后背景的重要性。
来源:.github/ISSUE_TEMPLATE/features.yml1-37
Templates通过 GitHub 的 issue 创建工作流展示给贡献者,该工作流将 YAML 定义转换为交互式表单。
来源:.github/ISSUE_TEMPLATE/bugs.yml1-4 .github/ISSUE_TEMPLATE/features.yml1-4
Templates 使用 GitHub 的 issue form schema,这是一种基于 YAML 的配置格式。实现遵循 GitHub 的特定语法,包含以下关键组件:
每个模板都遵循此通用结构。
name: [Template Name]
description: [Template Description]
labels: [Default Labels]
body:
- type: [Field Type]
id: [Field ID]
attributes:
label: [Field Label]
description: [Field Description]
placeholder: [Example Content]
validations:
required: [true/false]
来源:.github/ISSUE_TEMPLATE/bugs.yml1-73 .github/ISSUE_TEMPLATE/features.yml1-36
使用这些模板时,贡献者应遵循以下技术指南:
Bug 报告:
功能请求:
Animate.css 中的 issue 和 pull request 模板提供了一种结构化的方法来收集贡献者信息。通过实施这些模板,项目维护者可以更有效地对社区贡献进行分类、归档和处理,同时确保信息的连贯性和完整性。