1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-19 11:11:10 +01:00

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:
epriestley 2014-03-31 09:27:30 -07:00
parent deba531401
commit 3aabfc7f4d
2 changed files with 27 additions and 4 deletions

View file

@ -264,6 +264,13 @@ final class DifferentialJIRAIssuesField
return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY); 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) { public function renderCommitMessageValue(array $handles) {
$value = $this->getValue(); $value = $this->getValue();
if (!$value) { if (!$value) {
@ -276,4 +283,5 @@ final class DifferentialJIRAIssuesField
return true; return true;
} }
} }

View file

@ -863,10 +863,8 @@ abstract class PhabricatorBaseEnglishTranslation
'%s pushed %d commit(s) to %s.' => array( '%s pushed %d commit(s) to %s.' => array(
array( array(
array( '%s pushed a commit to %3$s.',
'%s pushed a commit to %3$s.', '%s pushed %d commits to %s.',
'%s pushed %d commits to %s.',
),
), ),
), ),
@ -875,6 +873,23 @@ abstract class PhabricatorBaseEnglishTranslation
'%s commits', '%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.',
); );
} }