Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | $arguments = array( | ||||
| 'base' => array( | 'base' => array( | ||||
| 'param' => 'rules', | 'param' => 'rules', | ||||
| 'help' => pht('Additional rules for determining base revision.'), | 'help' => pht('Additional rules for determining base revision.'), | ||||
| 'nosupport' => array( | 'nosupport' => array( | ||||
| 'svn' => pht('Subversion does not use base commits.'), | 'svn' => pht('Subversion does not use base commits.'), | ||||
| ), | ), | ||||
| 'supports' => array('git', 'hg'), | 'supports' => array('git', 'hg'), | ||||
| ), | ), | ||||
| 'no-diff' => array( | |||||
| 'help' => pht( | |||||
| 'Only run lint and unit tests. Intended for internal use.'), | |||||
| ), | |||||
| 'cache' => array( | 'cache' => array( | ||||
| 'param' => 'bool', | 'param' => 'bool', | ||||
| 'help' => pht( | 'help' => pht( | ||||
| '%d to disable lint cache, %d to enable (default).', | '%d to disable lint cache, %d to enable (default).', | ||||
| 0, | 0, | ||||
| 1), | 1), | ||||
| 'passthru' => array( | 'passthru' => array( | ||||
| 'lint' => true, | 'lint' => true, | ||||
| ▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | EOTEXT | ||||
| public function isRawDiffSource() { | public function isRawDiffSource() { | ||||
| return $this->getArgument('raw') || $this->getArgument('raw-command'); | return $this->getArgument('raw') || $this->getArgument('raw-command'); | ||||
| } | } | ||||
| public function run() { | public function run() { | ||||
| $this->console = PhutilConsole::getConsole(); | $this->console = PhutilConsole::getConsole(); | ||||
| $this->runRepositoryAPISetup(); | $this->runRepositoryAPISetup(); | ||||
| if ($this->getArgument('no-diff')) { | |||||
| $this->removeScratchFile('diff-result.json'); | |||||
| $data = $this->runLintUnit(); | |||||
| $this->writeScratchJSONFile('diff-result.json', $data); | |||||
| return 0; | |||||
| } | |||||
| $this->runDiffSetupBasics(); | $this->runDiffSetupBasics(); | ||||
| $commit_message = $this->buildCommitMessage(); | $commit_message = $this->buildCommitMessage(); | ||||
| $this->dispatchEvent( | $this->dispatchEvent( | ||||
| ArcanistEventType::TYPE_DIFF_DIDBUILDMESSAGE, | ArcanistEventType::TYPE_DIFF_DIDBUILDMESSAGE, | ||||
| array( | array( | ||||
| 'message' => $commit_message, | 'message' => $commit_message, | ||||
| ▲ Show 20 Lines • Show All 2,445 Lines • Show Last 20 Lines | |||||