【问题标题】:programmatically create phabricator diff request without any repo以编程方式创建 phabricator diff 请求,无需任何 repo
【发布时间】:2016-08-01 16:10:56
【问题描述】:

我正在尝试模拟创建 diff 请求而不实际创建 repo、diff 和做 arc diff。

我想使用 https://secure.phabricator.com/conduit/method/differential.createrawdiff/

或 createDiff 命令。但我不确定json应该是什么? diff 请求是如何发送过来的?如何伪造与 curl 请求一起使用的创建?

非常感谢任何见解和帮助?

非常感谢

【问题讨论】:

    标签: phabricator arcanist


    【解决方案1】:

    这是我使用的 json:

    '{
        "diff": "diff --git a/scripts/deploy/restart_apache b/scripts/deploy/restart_apache\nindex 510a7f9..d29177c 100755\n--- a/scripts/deploy/restart_apache\n+++ b/scripts/deploy/restart_apache\n@@ -59,7 +59,7 @@ do\n                                         # Set variables for the alpha context.\n                                         webServerBaseName='\''alpha-w'\''\n                                         webServerSuffix='\'''\''\n-                                        numWebServers=1\n+                                        numWebServers=2\n                                         checkPort=80\n                                         ;;\n                                 \"beta\")"
    }'
    

    不过,您需要使用奥术师。我不相信有一种方法可以在不使用 Arcanist 的情况下使用 API。你不需要使用arc diff,但你仍然需要奥术师。您将通过 Arcanist 使用的命令是这样的:

    echo $json_string | arc call-conduit --conduit-uri https://secure.phabricator.com/ --conduit-token $conduit_token differential.createrawdiff
    

    【讨论】:

      猜你喜欢
      • 2017-06-02
      • 1970-01-01
      • 2016-12-21
      • 2017-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-26
      • 1970-01-01
      相关资源
      最近更新 更多