我试图配置一个phabricator实例,我发现当我们使用arc diff
时更改arcanist默认模板对团队非常有用。
实际上模板包含以下文字:
<<Replace this line with your Revision Title>>
Summary:
Test Plan:
Reviewers:
Subscribers:
# Tip: Write "Fixes T123" in your summary to automatically close the
# corresponding task when this change lands.
# NEW DIFFERENTIAL REVISION
# Describe the changes in this new revision.
#
# arc could not identify any existing revision in your working copy.
# If you intended to update an existing revision, use:
#
# $ arc diff --update <revision>
我正在谷歌搜索以找到更改此默认模板的方法,但我无法找到它......
有任何方式可以个性化&#34;这个模板?
答案 0 :(得分:0)
正如Phabricator Task T12276中用户@milianw的问题所报告的那样,实际上似乎无法自定义提交消息。
这是官方原因:
请记住,Phabricator是一种企业工具,并且 大部分安装(99%)是依靠 我们已经在软件中内置了责任制。
无论如何,我试图探索类DifferentialCommitMessageField
,并且发现此方法产生了所有可用字段的列表:
final public static function getAllFields() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
->setUniqueMethod('getCommitMessageFieldKey')
->setSortMethod('getFieldOrder')
->execute();
}
并查看所有继承DifferentialCommitMessageField
的类。其中一些:
DifferentialTagsCommitMessageField
DifferentialSubscribersCommitMessageField
DifferentialAuditorsCommitMessageField
DifferentialReviewedByCommitMessageField
DifferentialTestPlanCommitMessageField
DifferentialTitleCommitMessageField
DifferentialSummaryCommitMessageField
因此,也许您可以自定义更改相关类的字段。您可以更改一些默认值,也可以尝试禁用在以下类之一中声明此方法的字段:
/**
* This method is inherited from DifferentialCommitMessageField
*
* @override
*/
public function isFieldEnabled() {
// return true;
return false
}
简而言之,您可以尝试扩展Phabricator来做到这一点。目前,对于一般企业用例而言,此功能还不是优先考虑的事情。
无论如何,请不要忘记Phabricator是免费/自由和开源软件。您拥有使用该代码并进行一些改进的所有权利。如果您真的对此功能感兴趣,并且可以添加此自定义功能,则某些用户可能会对您的补丁程序感兴趣,因此,如果可行,并且不引入回归,您也可以考虑对上游进行更改。 / p>