mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Remove various additional calls to getCallsign()
Summary: Ref T4245. These are all straightforward to remove. Test Plan: - Edited paths in a package. - Ran `bin/audit delete --repositories ...` with various identifiers. - Searched by repository for `R3`, `rAAAA` in Harbormaster. - Did a Herald dry run on a commit. - Browsed commits, made comments. - Viewed a Releeph product list. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4245 Differential Revision: https://secure.phabricator.com/D14927
This commit is contained in:
parent
d9e034f02c
commit
37532a0bf0
8 changed files with 21 additions and 23 deletions
|
@ -46,7 +46,7 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor {
|
|||
'diffusion-audit-'.$commit->getPHID(),
|
||||
pht(
|
||||
'Commit %s',
|
||||
'r'.$repository->getCallsign().$commit->getCommitIdentifier()),
|
||||
$commit->getMonogram()),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -222,22 +222,23 @@ final class PhabricatorAuditManagementDeleteWorkflow
|
|||
return $list;
|
||||
}
|
||||
|
||||
private function loadRepos($callsigns) {
|
||||
$callsigns = $this->parseList($callsigns);
|
||||
if (!$callsigns) {
|
||||
private function loadRepos($identifiers) {
|
||||
$identifiers = $this->parseList($identifiers);
|
||||
if (!$identifiers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$repos = id(new PhabricatorRepositoryQuery())
|
||||
$query = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withCallsigns($callsigns)
|
||||
->execute();
|
||||
$repos = mpull($repos, null, 'getCallsign');
|
||||
->withIdentifiers($identifiers);
|
||||
|
||||
foreach ($callsigns as $sign) {
|
||||
if (empty($repos[$sign])) {
|
||||
$repos = $query->execute();
|
||||
|
||||
$map = $query->getIdentifierMap();
|
||||
foreach ($identifiers as $identifier) {
|
||||
if (empty($map[$identifier])) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht('No such repository with callsign "%s"!', $sign));
|
||||
pht('No repository "%s" exists!', $identifier));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,10 +130,7 @@ final class HeraldCommitAdapter
|
|||
}
|
||||
|
||||
public function getHeraldName() {
|
||||
return
|
||||
'r'.
|
||||
$this->repository->getCallsign().
|
||||
$this->commit->getCommitIdentifier();
|
||||
return $this->commit->getMonogram();
|
||||
}
|
||||
|
||||
public function loadAffectedPaths() {
|
||||
|
|
|
@ -112,7 +112,7 @@ final class HarbormasterBuildableSearchEngine
|
|||
} else if ($object instanceof DifferentialDiff) {
|
||||
$diff_names[] = $object->getID();
|
||||
} else if ($object instanceof PhabricatorRepository) {
|
||||
$repository_names[] = 'r'.$object->getCallsign();
|
||||
$repository_names[] = $object->getMonogram();
|
||||
} else if ($object instanceof PhabricatorRepositoryCommit) {
|
||||
$repository = $object->getRepository();
|
||||
$commit_names[] = $repository->formatCommitName(
|
||||
|
|
|
@ -83,7 +83,7 @@ final class PhabricatorOwnersPathsController
|
|||
}
|
||||
}
|
||||
|
||||
$repos = mpull($repos, 'getCallsign', 'getPHID');
|
||||
$repos = mpull($repos, 'getMonogram', 'getPHID');
|
||||
asort($repos);
|
||||
|
||||
$template = new AphrontTypeaheadTemplateView();
|
||||
|
|
|
@ -121,11 +121,11 @@ final class ReleephProductCreateController extends ReleephProductController {
|
|||
|
||||
foreach ($repos as $repo_id => $repo) {
|
||||
$repo_name = $repo->getName();
|
||||
$callsign = $repo->getCallsign();
|
||||
$choices[$repo->getPHID()] = "r{$callsign} ({$repo_name})";
|
||||
$display = $repo->getDisplayName();
|
||||
$choices[$repo->getPHID()] = "{$display} ({$repo_name})";
|
||||
}
|
||||
|
||||
ksort($choices);
|
||||
asort($choices);
|
||||
return $choices;
|
||||
}
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ final class DifferentialReleephRequestFieldSpecification extends Phobject {
|
|||
'part of a Releeph branch, but also has %d path change(s) not '.
|
||||
'part of a Releeph branch!',
|
||||
$commit->getCommitIdentifier(),
|
||||
$repo->getCallsign(),
|
||||
$repo->getDisplayName(),
|
||||
count($in_branch),
|
||||
count($ex_branch));
|
||||
phlog($error);
|
||||
|
|
|
@ -114,9 +114,9 @@ final class ReleephProductSearchEngine
|
|||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/diffusion/'.$repo->getCallsign().'/',
|
||||
'href' => $repo->getURI(),
|
||||
),
|
||||
'r'.$repo->getCallsign()));
|
||||
$repo->getMonogram()));
|
||||
|
||||
$list->addItem($item);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue