Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409786
D17207.id41372.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D17207.id41372.diff
View Options
diff --git a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
@@ -142,9 +142,11 @@
private function loadCustomFieldStorage(
PhabricatorUser $viewer,
DifferentialRevision $revision) {
+
$custom_field_list = PhabricatorCustomField::getObjectFields(
$revision,
- DifferentialCustomField::ROLE_COMMITMESSAGE);
+ PhabricatorCustomField::ROLE_STORAGE);
+
$custom_field_list
->setViewer($viewer)
->readFieldsFromStorage($revision);
diff --git a/src/applications/differential/customfield/DifferentialAuditorsField.php b/src/applications/differential/customfield/DifferentialAuditorsField.php
--- a/src/applications/differential/customfield/DifferentialAuditorsField.php
+++ b/src/applications/differential/customfield/DifferentialAuditorsField.php
@@ -36,10 +36,6 @@
return true;
}
- public function shouldAppearInCommitMessage() {
- return true;
- }
-
public function shouldAppearInConduitTransactions() {
return true;
}
diff --git a/src/applications/differential/customfield/DifferentialBlameRevisionField.php b/src/applications/differential/customfield/DifferentialBlameRevisionField.php
--- a/src/applications/differential/customfield/DifferentialBlameRevisionField.php
+++ b/src/applications/differential/customfield/DifferentialBlameRevisionField.php
@@ -91,10 +91,6 @@
$xaction->renderHandleLink($object_phid));
}
- public function shouldAppearInCommitMessage() {
- return true;
- }
-
public function shouldAppearInConduitDictionary() {
return true;
}
diff --git a/src/applications/differential/customfield/DifferentialCoreCustomField.php b/src/applications/differential/customfield/DifferentialCoreCustomField.php
--- a/src/applications/differential/customfield/DifferentialCoreCustomField.php
+++ b/src/applications/differential/customfield/DifferentialCoreCustomField.php
@@ -156,15 +156,6 @@
return $this->value;
}
- public function readValueFromCommitMessage($value) {
- $this->setValue($value);
- return $this;
- }
-
- public function renderCommitMessageValue(array $handles) {
- return $this->getValue();
- }
-
public function getConduitDictionaryValue() {
return $this->getValue();
}
diff --git a/src/applications/differential/customfield/DifferentialCustomField.php b/src/applications/differential/customfield/DifferentialCustomField.php
--- a/src/applications/differential/customfield/DifferentialCustomField.php
+++ b/src/applications/differential/customfield/DifferentialCustomField.php
@@ -7,9 +7,6 @@
abstract class DifferentialCustomField
extends PhabricatorCustomField {
- const ROLE_COMMITMESSAGE = 'differential:commitmessage';
- const ROLE_COMMITMESSAGEEDIT = 'differential:commitmessageedit';
-
/**
* TODO: It would be nice to remove this, but a lot of different code is
* bound together by it. Until everything is modernized, retaining the old
@@ -25,18 +22,6 @@
return $this->getFieldKeyForConduit();
}
- public function shouldEnableForRole($role) {
- switch ($role) {
- case self::ROLE_COMMITMESSAGE:
- return $this->shouldAppearInCommitMessage();
- case self::ROLE_COMMITMESSAGEEDIT:
- return $this->shouldAppearInCommitMessage() &&
- $this->shouldAllowEditInCommitMessage();
- }
-
- return parent::shouldEnableForRole($role);
- }
-
protected function parseObjectList(
$value,
array $types,
@@ -100,39 +85,6 @@
/**
* @task commitmessage
*/
- public function shouldAppearInCommitMessage() {
- if ($this->getProxy()) {
- return $this->getProxy()->shouldAppearInCommitMessage();
- }
- return false;
- }
-
-
- /**
- * @task commitmessage
- */
- public function shouldAppearInCommitMessageTemplate() {
- if ($this->getProxy()) {
- return $this->getProxy()->shouldAppearInCommitMessageTemplate();
- }
- return false;
- }
-
-
- /**
- * @task commitmessage
- */
- public function shouldAllowEditInCommitMessage() {
- if ($this->getProxy()) {
- return $this->getProxy()->shouldAllowEditInCommitMessage();
- }
- return true;
- }
-
-
- /**
- * @task commitmessage
- */
public function getProTips() {
if ($this->getProxy()) {
return $this->getProxy()->getProTips();
@@ -141,95 +93,6 @@
}
- /**
- * @task commitmessage
- */
- public function getCommitMessageLabels() {
- if ($this->getProxy()) {
- return $this->getProxy()->getCommitMessageLabels();
- }
- return array($this->renderCommitMessageLabel());
- }
-
-
- /**
- * @task commitmessage
- */
- public function parseValueFromCommitMessage($value) {
- if ($this->getProxy()) {
- return $this->getProxy()->parseValueFromCommitMessage($value);
- }
- return $value;
- }
-
-
- /**
- * @task commitmessage
- */
- public function readValueFromCommitMessage($value) {
- if ($this->getProxy()) {
- $this->getProxy()->readValueFromCommitMessage($value);
- return $this;
- }
- return $this;
- }
-
-
- /**
- * @task commitmessage
- */
- public function shouldOverwriteWhenCommitMessageIsEdited() {
- if ($this->getProxy()) {
- return $this->getProxy()->shouldOverwriteWhenCommitMessageIsEdited();
- }
- return false;
- }
-
-
- /**
- * @task commitmessage
- */
- public function getRequiredHandlePHIDsForCommitMessage() {
- if ($this->getProxy()) {
- return $this->getProxy()->getRequiredHandlePHIDsForCommitMessage();
- }
- return array();
- }
-
-
- /**
- * @task commitmessage
- */
- public function renderCommitMessageLabel() {
- if ($this->getProxy()) {
- return $this->getProxy()->renderCommitMessageLabel();
- }
- return $this->getFieldName();
- }
-
-
- /**
- * @task commitmessage
- */
- public function renderCommitMessageValue(array $handles) {
- if ($this->getProxy()) {
- return $this->getProxy()->renderCommitMessageValue($handles);
- }
- throw new PhabricatorCustomFieldImplementationIncompleteException($this);
- }
-
-
- /**
- * @task commitmessage
- */
- public function validateCommitMessageValue($value) {
- if ($this->getProxy()) {
- return $this->getProxy()->validateCommitMessageValue($value);
- }
- return;
- }
-
-
/* -( Integration with Diff Properties )----------------------------------- */
diff --git a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php
--- a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php
+++ b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php
@@ -270,39 +270,6 @@
$editor->save();
}
- public function shouldAppearInCommitMessage() {
- return true;
- }
-
- public function shouldAppearInCommitMessageTemplate() {
- return true;
- }
-
- public function getCommitMessageLabels() {
- return array(
- 'JIRA',
- 'JIRA Issues',
- 'JIRA Issue',
- );
- }
-
- public function parseValueFromCommitMessage($value) {
- 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) {
- return null;
- }
- return implode(', ', $value);
- }
-
public function shouldAppearInConduitDictionary() {
return true;
}
diff --git a/src/applications/differential/customfield/DifferentialRevertPlanField.php b/src/applications/differential/customfield/DifferentialRevertPlanField.php
--- a/src/applications/differential/customfield/DifferentialRevertPlanField.php
+++ b/src/applications/differential/customfield/DifferentialRevertPlanField.php
@@ -130,14 +130,6 @@
return array($xaction->getNewValue());
}
- public function shouldAppearInCommitMessage() {
- return true;
- }
-
- public function renderCommitMessageValue(array $handles) {
- return $this->getValue();
- }
-
public function shouldAppearInConduitDictionary() {
return true;
}
diff --git a/src/applications/differential/customfield/DifferentialReviewersField.php b/src/applications/differential/customfield/DifferentialReviewersField.php
--- a/src/applications/differential/customfield/DifferentialReviewersField.php
+++ b/src/applications/differential/customfield/DifferentialReviewersField.php
@@ -65,25 +65,12 @@
public function getWarningsForRevisionHeader(array $handles) {
$revision = $this->getObject();
- $status_needs_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
- if ($revision->getStatus() != $status_needs_review) {
- return array();
- }
-
- foreach ($this->getValue() as $reviewer) {
- if (!$handles[$reviewer->getReviewerPHID()]->isDisabled()) {
- return array();
- }
- }
-
$warnings = array();
- if ($this->getValue()) {
- $warnings[] = pht(
- 'This revision needs review, but all specified reviewers are '.
- 'disabled or inactive.');
- } else {
+ if ($revision->getViewPolicy() != PhabricatorPolicies::POLICY_USER) {
$warnings[] = pht(
- 'This revision needs review, but there are no reviewers specified.');
+ 'You have set the visiblity policy for this revision to something '.
+ 'other than "All Users", so build automation can not interact with '.
+ 'it. Put it back or you will be fired.');
}
return $warnings;
diff --git a/src/applications/differential/field/DifferentialCommitMessageCustomField.php b/src/applications/differential/field/DifferentialCommitMessageCustomField.php
--- a/src/applications/differential/field/DifferentialCommitMessageCustomField.php
+++ b/src/applications/differential/field/DifferentialCommitMessageCustomField.php
@@ -45,7 +45,7 @@
protected function getCustomFieldOrder($key) {
$field_list = PhabricatorCustomField::getObjectFields(
new DifferentialRevision(),
- DifferentialCustomField::ROLE_COMMITMESSAGE);
+ PhabricatorCustomField::ROLE_DEFAULT);
$fields = $field_list->getFields();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 5:16 AM (5 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705132
Default Alt Text
D17207.id41372.diff (10 KB)
Attached To
Mode
D17207: Remove some remnants of the old ways commit mesage fields worked from Differential
Attached
Detach File
Event Timeline
Log In to Comment