Differential: exclude fields from commit message to follow our guidelines

Do it as a tweaks to render due to:

- Those fields are considered permanent.
- We still want to be able to specify them when creating new revisions
  (at least for subscribers/reviewers).
This commit is contained in:
2019-09-03 14:36:00 +02:00
committed by Sergey Sharybin
parent 2b54804c7b
commit a162f188c2
4 changed files with 24 additions and 0 deletions

View File

@@ -42,6 +42,12 @@ final class DifferentialAuditorsCommitMessageField
}
public function renderFieldValue($value) {
// Blender: don't include this in commit messages.
//
// NOTE: Do it at render time to match behavior of other tweaked fields
// (such as reviewers) which are considered non-disableable.
return null;
return $this->renderHandleList($value);
}

View File

@@ -62,6 +62,12 @@ final class DifferentialReviewersCommitMessageField
}
public function renderFieldValue($value) {
// Blender: don't include this in commit messages.
//
// NOTE: Do it at render time to allow specifying reviewers when creating
// a new differential revision with `arc diff`.
return null;
$value = $this->inflateReviewers($value);
$phid_list = array();

View File

@@ -45,6 +45,12 @@ final class DifferentialSubscribersCommitMessageField
}
public function renderFieldValue($value) {
// Blender: don't include this in commit messages.
//
// NOTE: Do it at render time to allow specifying subsribers when creating
// a new differential revision with `arc diff`.
return null;
return $this->renderHandleList($value);
}

View File

@@ -51,6 +51,12 @@ final class DifferentialTagsCommitMessageField
}
public function renderFieldValue($value) {
// Blender: don't include this in commit messages.
//
// NOTE: Do it at render time to allow specifying tags when creating
// a new differential revision with `arc diff`.
return null;
return $this->renderHandleList($value);
}