3 final class PhabricatorRepositoryDefaultBranchTransaction
4 extends PhabricatorRepositoryTransactionType
{
6 const TRANSACTIONTYPE
= 'repo:default-branch';
8 public function generateOldValue($object) {
9 return $object->getDetail('default-branch');
12 public function applyInternalEffects($object, $value) {
13 $object->setDetail('default-branch', $value);
16 public function getTitle() {
17 $old = $this->getOldValue();
18 $new = $this->getNewValue();
22 '%s removed %s as the default branch.',
23 $this->renderAuthor(),
24 $this->renderOldValue());
25 } else if (!strlen($old)) {
27 '%s set the default branch to %s.',
28 $this->renderAuthor(),
29 $this->renderNewValue());
32 '%s changed the default branch from %s to %s.',
33 $this->renderAuthor(),
34 $this->renderOldValue(),
35 $this->renderNewValue());