Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / releeph / field / specification / ReleephCommitMessageFieldSpecification.php
blob5122d1e7e169b52092317009aeded1cf738763e8
1 <?php
3 final class ReleephCommitMessageFieldSpecification
4 extends ReleephFieldSpecification {
6 public function getFieldKey() {
7 return 'commit:apply';
10 public function getName() {
11 return '__only_for_commit_message!';
14 public function shouldAppearInPropertyView() {
15 return false;
18 public function shouldAppearOnCommitMessage() {
19 return true;
22 public function renderLabelForCommitMessage() {
23 return $this->renderCommonLabel();
26 public function renderValueForCommitMessage() {
27 return $this->renderCommonValue(
28 DifferentialReleephRequestFieldSpecification::ACTION_PICKS);
31 public function shouldAppearOnRevertMessage() {
32 return true;
35 public function renderLabelForRevertMessage() {
36 return $this->renderCommonLabel();
39 public function renderValueForRevertMessage() {
40 return $this->renderCommonValue(
41 DifferentialReleephRequestFieldSpecification::ACTION_REVERTS);
44 private function renderCommonLabel() {
45 return id(new DifferentialReleephRequestFieldSpecification())
46 ->renderLabelForCommitMessage();
49 private function renderCommonValue($action) {
50 $rq = 'RQ'.$this->getReleephRequest()->getID();
51 return "{$action} {$rq}";