gpt4 book ai didi

phabricator - 是否可以修改奥术师/差异模板?

转载 作者:行者123 更新时间:2023-12-03 14:30:03 33 4
gpt4 key购买 nike

我正在尝试配置一个 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>

我正在谷歌上寻找任何方法来更改此默认模板,但我找不到它...

有什么方法可以“个性化”这个模板?

最佳答案

如 Phabricator 任务 T12276 中所述来自用户@milianw 的一个问题,实际上似乎没有自定义提交消息的能力。

这是官方原因:

Please keep in mind Phabricator is an enterprise tool, and the majority of installs (99%) are businesses who rely on the accountability we've built into the software.

chad, Feb 18 2017, 11:55 PM



无论如何,我试图探索类(class) 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 是一个免费/自由和开源软件。您拥有使用代码并进行一些改进的所有权利。如果你真的对这个特性感兴趣并且你有可能添加这个自定义特性,一些用户可能对你的补丁感兴趣,所以你也可以考虑向上游提出你的更改,如果它有效并且不会引入回归。

    关于phabricator - 是否可以修改奥术师/差异模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34679013/

    33 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com