command-linephabricator

Is there a way to abandon a diff via arc CLI?


So far, the only way I found to close diffs is on the web ui. I have a workflow where I need to do this programatically, and would like to use the arc CLI to abandon diffs.

Is this possible? I tried reading through arc -h but didn't find anything related to abandoning diffs.

Thanks!


Solution

  • Found it:

    echo '{"transactions": [{"type": "abandon","value": true}], "objectIdentifier": "$REVISION"}' | arc call-conduit --conduit-uri https://$PHABRICATOR_DOMAIN.com/ differential.revision.edit