@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Yell at developers if they don't replace the default revision title with thier new revision title.

Summary: Same as the title

Test Plan: Will test locally by running arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan, starruler

Maniphest Tasks: T2663

Differential Revision: https://secure.phabricator.com/D5297

authored by

Afaque Hussain and committed by
epriestley
05c5c431 7487c574

+16 -2
+2 -1
src/applications/differential/conduit/ConduitAPI_differential_getcommitmessage_Method.php
··· 102 102 $label = $field->renderLabelForCommitMessage(); 103 103 if (!strlen($value)) { 104 104 if ($field_key === 'title') { 105 - $commit_message[] = '<<Enter Revision Title>>'; 105 + $commit_message[] = 106 + DifferentialTitleFieldSpecification::getDefaultRevisionTitle(); 106 107 } else { 107 108 if ($field->shouldAppearOnCommitMessageTemplate() && $is_edit) { 108 109 $commit_message[] = $label.': ';
+14 -1
src/applications/differential/field/specification/DifferentialTitleFieldSpecification.php
··· 41 41 if (!strlen($this->title)) { 42 42 $this->error = 'Required'; 43 43 throw new DifferentialFieldValidationException( 44 - "You must provide a title."); 44 + "You must provide a revision title in the first line ". 45 + "of your commit message."); 46 + } 47 + 48 + if (preg_match('/^<<.*>>$/', $this->title)) { 49 + $default_title = self::getDefaultRevisionTitle(); 50 + $this->error = 'Required'; 51 + throw new DifferentialFieldValidationException( 52 + "Replace the line '{$default_title}' with a revision title ". 53 + "that describes the change."); 45 54 } 46 55 } 47 56 ··· 84 93 85 94 public function getColumnClassForRevisionList() { 86 95 return 'wide pri'; 96 + } 97 + 98 + public static function getDefaultRevisionTitle() { 99 + return '<<Replace this line with your Revision Title>>'; 87 100 } 88 101 89 102 public function renderValueForRevisionList(DifferentialRevision $revision) {