博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
创建GitHub Pull Request和Issue模板
阅读量:2534 次
发布时间:2019-05-11

本文共 2097 字,大约阅读时间需要 6 分钟。

There's nothing more frustrating than getting an incomplete bug report.  I've often seen bug reports containing a useless "{x} feature doesn't work"; no steps to reproduce, no URL, no browser or device information, just a hopelessly vague message.  Similar is receiving a pull request or patch which doesn't state its intent and doesn't provide steps to test (and what about unit tests?).  Now that many projects are public, most on GitHub, I've seen a massive rise in these types of sparsely documented issues and pull requests.

没有比不完整的错误报告更令人沮丧的了。 我经常看到错误报告包含无效的“ {x}功能不起作用”; 没有重现步骤,没有URL,没有浏览器或设备信息,只是一条毫无希望的模糊信息。 类似的是接收到一个拉取请求或补丁,该请求未声明其意图且未提供测试步骤(单元测试又如何?)。 现在,许多项目都是公开的,大部分在GitHub上,我已经看到这类稀疏记录的问题和请求请求的数量大大增加。

I recently found out you an create pull request and issues templates so that when the user goes to file a pull request or issue, your template displays within the description textarea.  Let's have a look at how we can do that!

最近,我发现您创建了一个创建请求请求并发出了模板,因此当用户去提交请求请求或发出时,您的模板将显示在描述文本区域中。 让我们看看我们如何做到这一点!

创建模板文件 (Creating Template Files)

Creating and putting in place the template files is easy:

创建和放置模板文件很容易:

  • The proper place to put the template files is in a .github directory at the root of your repository

    放置模板文件的适当位置在存储库根目录的.github目录中

  • The templates are to be created in markdown format

    模板将以降价格式创建
  • The issues template text goes in a ISSUE_TEMPLATE.md file

    问题模板文本位于ISSUE_TEMPLATE.md文件中

  • The pull requests template text goes in a PULL_REQUEST_TEMPLATE.md file

    拉取请求模板文本放在PULL_REQUEST_TEMPLATE.md文件中

A great example of template usage can be seen in the .  The issue template looks as follows:

在可以看到模板用法的一个很好的例子。 问题模板如下所示:

**Description:**- A-Frame Version:- Platform / Device:- Reproducible Code Snippet or URL:

If your community repositories suffer from lack of information in issues and pull requests, or you simply want to prevent the problem, create GitHub templates for developers.  They may not provide the information you'd like, but you can at least nudge them in the proper direction!

如果您的社区存储库因问题信息不足而无法发送请求,或者您只是想防止问题发生,请为开发人员创建GitHub模板。 它们可能不会提供您想要的信息,但是您至少可以向正确的方向轻推它们!

翻译自:

转载地址:http://hcpwd.baihongyu.com/

你可能感兴趣的文章
使用Postmark测试后端存储性能
查看>>
NSTextView 文字链接的定制化
查看>>
第五天站立会议内容
查看>>
ATMEGA16 IOport相关汇总
查看>>
JAVA基础-多线程
查看>>
面试题5:字符串替换空格
查看>>
[Codevs] 线段树练习5
查看>>
Amazon
查看>>
component-based scene model
查看>>
Echart输出图形
查看>>
hMailServer搭建简单邮件系统
查看>>
从零开始学习jQuery
查看>>
Spring+SpringMVC+MyBatis深入学习及搭建(四)——MyBatis输入映射与输出映射
查看>>
opacity半透明兼容ie8。。。。ie8半透明
查看>>
CDOJ_24 八球胜负
查看>>
Alpha 冲刺 (7/10)
查看>>
一款jQuery打造的具有多功能切换的幻灯片特效
查看>>
SNMP从入门到开发:进阶篇
查看>>
@ServletComponentScan ,@ComponentScan,@Configuration 解析
查看>>
unity3d 射弹基础案例代码分析
查看>>