在 Azure DevOps 的 Git 的拉取请求模板中添加字段
Add field in Pull Request template for Git in Azure DevOps
我计划在我的拉取请求模板中添加一个新字段,以便在开发人员提交拉取请求以供审核之前强制执行检查列表。
目前,我已经创建了一个 markdown 文件 "PULL_REQUEST_TEMPLATE.md",并在其中放置了以下内容 -
- [ ] Functionality unit tested
- [ ] Followed coding standard
- [ ] Followed database standard
- [ ] Local build successful
但这会在描述字段中显示复选框。我希望在拉取请求模板中添加一个独立于描述字段的新字段。
另外,我想跟踪用户在这些复选框上的操作历史,但这不是优先事项,但是,是的,在这个阶段我非常需要这个检查列表的新字段。
任何人都可以建议如何实现这一目标吗?
But this displays check boxes in the description field. I am looking to add a new field in the pull request template independent of description field.
恐怕我们无法在拉取请求模板中添加独立于描述字段的新字段。
根据文档Improve pull request descriptions using templates:
What is a pull request template?
A pull request template is a file containing markdown text that is added to your pull request description when the pull request is created.
我们可以知道MS提供的模板只是参考了在pull request description中添加的markdown,不像workitem,我们可以通过workitem来添加自定义字段自定义过程。 MS 没有提供除描述以外的自定义字段,所以我们无法在 pull request 模板中添加新字段,必须在描述字段中添加新字段。
顺便说一句,如果您必须在拉取请求模板中添加一个独立于描述字段的新字段,您可以在我们的 UserVoice 站点 (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ) 上添加对此功能的请求,这是我们提供产品建议的主要论坛,并添加您提出此请求的原因。
希望这对您有所帮助。
我计划在我的拉取请求模板中添加一个新字段,以便在开发人员提交拉取请求以供审核之前强制执行检查列表。
目前,我已经创建了一个 markdown 文件 "PULL_REQUEST_TEMPLATE.md",并在其中放置了以下内容 -
- [ ] Functionality unit tested
- [ ] Followed coding standard
- [ ] Followed database standard
- [ ] Local build successful
但这会在描述字段中显示复选框。我希望在拉取请求模板中添加一个独立于描述字段的新字段。
另外,我想跟踪用户在这些复选框上的操作历史,但这不是优先事项,但是,是的,在这个阶段我非常需要这个检查列表的新字段。
任何人都可以建议如何实现这一目标吗?
But this displays check boxes in the description field. I am looking to add a new field in the pull request template independent of description field.
恐怕我们无法在拉取请求模板中添加独立于描述字段的新字段。
根据文档Improve pull request descriptions using templates:
What is a pull request template?
A pull request template is a file containing markdown text that is added to your pull request description when the pull request is created.
我们可以知道MS提供的模板只是参考了在pull request description中添加的markdown,不像workitem,我们可以通过workitem来添加自定义字段自定义过程。 MS 没有提供除描述以外的自定义字段,所以我们无法在 pull request 模板中添加新字段,必须在描述字段中添加新字段。
顺便说一句,如果您必须在拉取请求模板中添加一个独立于描述字段的新字段,您可以在我们的 UserVoice 站点 (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ) 上添加对此功能的请求,这是我们提供产品建议的主要论坛,并添加您提出此请求的原因。
希望这对您有所帮助。