Fix JIRA integration from "arc" commit messages
Summary: Fixes T4683. This was just a missing method implementation. Also provide a couple of translation things. Test Plan: - Created a revision from the command line with a nonempty `JIRA Issues:` line, via `arc diff`. - Looked at the translation strings. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T4683 Differential Revision: https://secure.phabricator.com/D8656
This commit is contained in:
@@ -264,6 +264,13 @@ final class DifferentialJIRAIssuesField
|
||||
return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
public function readValueFromCommitMessage($value) {
|
||||
$this->setValue($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
$value = $this->getValue();
|
||||
if (!$value) {
|
||||
@@ -276,4 +283,5 @@ final class DifferentialJIRAIssuesField
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -863,10 +863,8 @@ abstract class PhabricatorBaseEnglishTranslation
|
||||
|
||||
'%s pushed %d commit(s) to %s.' => array(
|
||||
array(
|
||||
array(
|
||||
'%s pushed a commit to %3$s.',
|
||||
'%s pushed %d commits to %s.',
|
||||
),
|
||||
'%s pushed a commit to %3$s.',
|
||||
'%s pushed %d commits to %s.',
|
||||
),
|
||||
),
|
||||
|
||||
@@ -875,6 +873,23 @@ abstract class PhabricatorBaseEnglishTranslation
|
||||
'%s commits',
|
||||
),
|
||||
|
||||
'%s removed %d JIRA issue(s): %s.' => array(
|
||||
array(
|
||||
'%s removed a JIRA issue: %3$s.',
|
||||
'%s removed JIRA issues: %3$s.',
|
||||
),
|
||||
),
|
||||
|
||||
'%s added %d JIRA issue(s): %s.' => array(
|
||||
array(
|
||||
'%s added a JIRA issue: %3$s.',
|
||||
'%s added JIRA issues: %3$s.',
|
||||
),
|
||||
),
|
||||
|
||||
'%s updated JIRA issue(s): added %d %s; removed %d %s.' =>
|
||||
'%s updated JIRA issues: added %3$s; removed %5$s.',
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user