Phabricator's arcanist command line tool allows you to add a "diff" for revision. This is useful because you can quickly generate a diff which your colleagues can review.
Normally, running arc diff master
, for example, will prompt your for a diff message, a test plan, and some other information, and then create a diff on Phabricator.
However, I would like to run arc diff from a continuous integration server, therefore assuming yes to all questions and passing the message and test plan as an argument to the command. What I have now is:
arc diff master --allow-untracked
Still, it is assuming that it is being called from a human user, and asking for a message, which fails when called from a continuous integration server. How can skip the prompts?
I think what you are looking for is the
--verbatim
option. Considering the changes are committed so that it has a commit message you can run a command like:arc diff --verbatim --reviewers xxxx --uncommitted --allow-untracked
This implies you set the
Test plan
to optional, else you have to specify it as well.Finally you can also read revision info from a file using
--message-file
.Another approach would be:
arc diff --raw-command "git diff origin/master"
createrevision
conduit call as described here to create the revision:https://secure.phabricator.com/conduit/method/differential.createrevision/