@@ -0,0 +1,1628 @@
+package com.box.l10n.mojito.cli.command;%0A%0A%0Aimport com.beust.jcommander.Parameter;%0Aimport com.beust.jcommander.Parameters;%0Aimport com.box.l10n.mojito.cli.console.ConsoleWriter;%0Aimport com.box.l10n.mojito.phabricator.DifferentialRevision;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Qualifier;%0Aimport org.springframework.context.annotation.Scope;%0Aimport org.springframework.stereotype.Component;%0A%0A@Component%0A@Scope(%22prototype%22)%0A@Parameters(commandNames = %7B%22phab-add-msg%22%7D, commandDescription = %22Add a message to a Phabricator revision%22)%0Apublic class PhabricatorAddMessageCommand extends Command %7B%0A    /**%0A     * logger%0A     */%0A    static Logger logger = LoggerFactory.getLogger(PhabricatorAddMessageCommand.class);%0A%0A    @Qualifier(%22ansiCodeEnabledFalse%22)%0A    @Autowired%0A    ConsoleWriter consoleWriterAnsiCodeEnabledFalse;%0A%0A    @Autowired(required = false)%0A    DifferentialRevision differentialRevision;%0A%0A    @Parameter(names = %7B%22--object-id%22, %22-o%22%7D, arity = 1, required = true, description = %22the object id of the revision%22)%0A    String objectId;%0A%0A    @Parameter(names = %7B%22--message%22, %22-m%22%7D, arity = 1, required = true, description = %22message to add%22)%0A    String message;%0A%0A%0A    @Override%0A    public void execute() throws CommandException %7B%0A        if (differentialRevision == null) %7B%0A            throw new CommandException(%22Phabricator must be configured with properties: l10n.phabricator.url and l10n.phabricator.token%22);%0A        %7D%0A%0A        differentialRevision.addComment(objectId, message);%0A    %7D%0A%7D%0A

Add command to add a message to a phabricator revision