I’ve attempted to centralize Arcanist [diff] on a server to make it easier to integrate with CI and review processes. My question is: Is there anything being considered or worked on to help support making code reviews more automated. Having a server-side Arcanist for purposes of arc diff (haven’t tried other subcommands) seems so close to working seamlessly.
Conduit endpoint documentation seems to be limited to those who are well-versed in the underlying source code or those who succeed in trial-and-error. Phabricator as a whole seems to encourage user-interaction over command-line tools based on prompting and reading through issues. The flexibility to interactively choose is sometimes nice, but sometimes a strict contract of I will accept X and output Y, otherwise throw enumerated error Z (and thus being able to handle scenario Z) can be better.
My attempt at centralized Arcanist:
For first-time setup:
- Create bot user to generate differentials from CI
- Generate API token (because it’s a bot user no CLI token is available, though differences are not in docs)
- Initialize a Git repository on the same server as the Phabricator-controlled bare repositories
- Configure a standard set of lint tools per repository (centralization makes it easier to update and add rules globally)
For each arc diff:
- Use CI [Jenkins] to run a pipeline that validates various things prior to entering review and triggers additional changes after
arc diffgenerates (like status changes, emails, unit tests, etc.).
- Pull information from ticket/issue/bug management system, including title, summary, reviewer(s), subscriber(s), etc. Send this information to a file to be referenced as a message-file.
- Since the bot user will be the author, pull CI logged-in user as CC/Subscriber.
- Perform VCS actions [Git] fetch, checkout branch so that checked-out branch is referenced by Arcanist
- Execute arc diff to generate Differential with a --message-file including ticket information.
- Cannot automatically “commandeer to”/specify author as a bot
- Cannot update a commandeered revision as a bot
- Commandeered revisions move author bot to reviewer
- Policies cannot be specified and differentials in general do not default to policies of the linked repository
- No way to have multiple authors and Subscriber/CC has actions of a reviewer (and becomes a reviewer if dropdown action selected)
Versions in play:
$ arc --version
arcanist 5eda40337bb4135ca4929617602686302edc7cc0 (4 Aug 2017)
libphutil dfced13a45f376e017465e805e151b42ea7dd295 (27 Aug 2017)
phabricator b4cbea901845087f8903bdcd210303d7e6eace50 (Aug 29 2017)