Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
Show First 20 Lines • Show All 1,917 Lines • ▼ Show 20 Lines | private function parseCommitMessagesIntoFields(array $local) { | ||||
foreach ($local as $hash => $info) { | foreach ($local as $hash => $info) { | ||||
$included[] = substr($hash, 0, 12).' '.$info['summary']; | $included[] = substr($hash, 0, 12).' '.$info['summary']; | ||||
} | } | ||||
// Parse all of the messages into fields. | // Parse all of the messages into fields. | ||||
$messages = array(); | $messages = array(); | ||||
foreach ($local as $hash => $info) { | foreach ($local as $hash => $info) { | ||||
$text = $info['message']; | $text = $info['message']; | ||||
if (trim($text) == self::AUTO_COMMIT_TITLE) { | |||||
continue; | |||||
} | |||||
$obj = ArcanistDifferentialCommitMessage::newFromRawCorpus($text); | $obj = ArcanistDifferentialCommitMessage::newFromRawCorpus($text); | ||||
$messages[$hash] = $obj; | $messages[$hash] = $obj; | ||||
} | } | ||||
$notes = array(); | $notes = array(); | ||||
$fields = array(); | $fields = array(); | ||||
foreach ($messages as $hash => $message) { | foreach ($messages as $hash => $message) { | ||||
try { | try { | ||||
▲ Show 20 Lines • Show All 220 Lines • ▼ Show 20 Lines | private function formatUsableLogs(array $usable) { | ||||
// - Fixed foobar bug. | // - Fixed foobar bug. | ||||
// - Documented foobar. | // - Documented foobar. | ||||
$usable = array_reverse($usable); | $usable = array_reverse($usable); | ||||
$default = array(); | $default = array(); | ||||
foreach ($usable as $message) { | foreach ($usable as $message) { | ||||
// Pick the first line out of each message. | // Pick the first line out of each message. | ||||
$text = trim($message); | $text = trim($message); | ||||
if ($text == self::AUTO_COMMIT_TITLE) { | |||||
continue; | |||||
} | |||||
$text = head(explode("\n", $text)); | $text = head(explode("\n", $text)); | ||||
$default[] = ' - '.$text."\n"; | $default[] = ' - '.$text."\n"; | ||||
} | } | ||||
return implode('', $default); | return implode('', $default); | ||||
} | } | ||||
private function loadActiveLocalCommitInfo() { | private function loadActiveLocalCommitInfo() { | ||||
▲ Show 20 Lines • Show All 404 Lines • Show Last 20 Lines |