phabricator

phabricator commandline for creating repository


I am attempting to use Phabricator's code review feature to grade code submissions by students in a class. The code is committed to a Subversion server in which each student has their own folder under a top level location on the server. For the current classes, I have no control over the root location. If I did, I would just move it so there was a folder that contained all the student repositories for just the classes I need and create a repo in that folder and diffs from lower branches, but at this point I can't.

I've found a way to do almost everything I need to do in Phabricator from the commandline, such as creating each of the student users and generating the diffs. There's only one thing I can't figure out how to do: Create a Repository.

I looked through the options in the help for Phabricator and Arcanist, but I didn't see anything that appeared to do what I needed.

Does anyone know if it's possible to create a repository from the Phabricator or arc commandline? Or in some other automated way?

Thanks!


Solution

  • We don't have a really easy way to do this right now, but you can use arc to call the Conduit API. Pipe a JSON blob into it:

    echo '{"name":"repo name", ...}' | arc call-conduit repository.create
    

    You can access /conduit/method/repository.create/ on the web UI for a list of parameters the call accepts.