Differential D15304 Diff 36923 src/applications/repository/storage/PhabricatorRepositoryTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryTransaction.php
Show All 23 Lines | final class PhabricatorRepositoryTransaction | ||||
const TYPE_CREDENTIAL = 'repo:credential'; | const TYPE_CREDENTIAL = 'repo:credential'; | ||||
const TYPE_DANGEROUS = 'repo:dangerous'; | const TYPE_DANGEROUS = 'repo:dangerous'; | ||||
const TYPE_SLUG = 'repo:slug'; | const TYPE_SLUG = 'repo:slug'; | ||||
const TYPE_SERVICE = 'repo:service'; | const TYPE_SERVICE = 'repo:service'; | ||||
const TYPE_SYMBOLS_SOURCES = 'repo:symbol-source'; | const TYPE_SYMBOLS_SOURCES = 'repo:symbol-source'; | ||||
const TYPE_SYMBOLS_LANGUAGE = 'repo:symbol-language'; | const TYPE_SYMBOLS_LANGUAGE = 'repo:symbol-language'; | ||||
const TYPE_STAGING_URI = 'repo:staging-uri'; | const TYPE_STAGING_URI = 'repo:staging-uri'; | ||||
const TYPE_AUTOMATION_BLUEPRINTS = 'repo:automation-blueprints'; | const TYPE_AUTOMATION_BLUEPRINTS = 'repo:automation-blueprints'; | ||||
const TYPE_CALLSIGN = 'repo:callsign'; | |||||
// TODO: Clean up these legacy transaction types. | // TODO: Clean up these legacy transaction types. | ||||
const TYPE_SSH_LOGIN = 'repo:ssh-login'; | const TYPE_SSH_LOGIN = 'repo:ssh-login'; | ||||
const TYPE_SSH_KEY = 'repo:ssh-key'; | const TYPE_SSH_KEY = 'repo:ssh-key'; | ||||
const TYPE_SSH_KEYFILE = 'repo:ssh-keyfile'; | const TYPE_SSH_KEYFILE = 'repo:ssh-keyfile'; | ||||
const TYPE_HTTP_LOGIN = 'repo:http-login'; | const TYPE_HTTP_LOGIN = 'repo:http-login'; | ||||
const TYPE_HTTP_PASS = 'repo:http-pass'; | const TYPE_HTTP_PASS = 'repo:http-pass'; | ||||
▲ Show 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
$this->renderHandleList($add)); | $this->renderHandleList($add)); | ||||
} else { | } else { | ||||
return pht( | return pht( | ||||
'%s removed %s automation blueprint(s): %s.', | '%s removed %s automation blueprint(s): %s.', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
new PhutilNumber(count($rem)), | new PhutilNumber(count($rem)), | ||||
$this->renderHandleList($rem)); | $this->renderHandleList($rem)); | ||||
} | } | ||||
case self::TYPE_CALLSIGN: | |||||
if ($old === null) { | |||||
return pht( | |||||
'%s set the callsign for this repository to "%s".', | |||||
$this->renderHandleLink($author_phid), | |||||
$new); | |||||
} else if ($new === null) { | |||||
return pht( | |||||
'%s removed the callsign ("%s") for this repository.', | |||||
$this->renderHandleLink($author_phid), | |||||
$old); | |||||
} else { | |||||
return pht( | |||||
'%s changed the callsign for this repository from "%s" to "%s".', | |||||
$this->renderHandleLink($author_phid), | |||||
$old, | |||||
$new); | |||||
} | |||||
} | } | ||||
return parent::getTitle(); | return parent::getTitle(); | ||||
} | } | ||||
public function hasChangeDetails() { | public function hasChangeDetails() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_DESCRIPTION: | case self::TYPE_DESCRIPTION: | ||||
Show All 13 Lines |