@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.

Support reading and querying Almanac service PHIDs via "diffusion.repository.search"

Summary:
Ref T13222. See PHI992. If you lose all hosts in a service cluster, you may need to get a list of affected repositories to figure out which backups to pull.

Support doing this via the API.

Test Plan: Queried by service PHID and saw service PHIDs in the call results.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13222

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

+21
+13
src/applications/repository/query/PhabricatorRepositorySearchEngine.php
··· 44 44 ->setKey('uris') 45 45 ->setDescription( 46 46 pht('Search for repositories by clone/checkout URI.')), 47 + id(new PhabricatorPHIDsSearchField()) 48 + ->setLabel(pht('Services')) 49 + ->setKey('almanacServicePHIDs') 50 + ->setAliases( 51 + array( 52 + 'almanacServicePHID', 53 + 'almanacService', 54 + 'almanacServices', 55 + )), 47 56 ); 48 57 } 49 58 ··· 78 87 79 88 if ($map['uris']) { 80 89 $query->withURIs($map['uris']); 90 + } 91 + 92 + if ($map['almanacServicePHIDs']) { 93 + $query->withAlmanacServicePHIDs($map['almanacServicePHIDs']); 81 94 } 82 95 83 96 return $query;
+8
src/applications/repository/storage/PhabricatorRepository.php
··· 2773 2773 ->setDescription( 2774 2774 pht( 2775 2775 'True if the repository is importing initial commits.')), 2776 + id(new PhabricatorConduitSearchFieldSpecification()) 2777 + ->setKey('almanacServicePHID') 2778 + ->setType('phid?') 2779 + ->setDescription( 2780 + pht( 2781 + 'The Almanac Service that hosts this repository, if the '. 2782 + 'repository is clustered.')), 2776 2783 ); 2777 2784 } 2778 2785 ··· 2784 2791 'shortName' => $this->getRepositorySlug(), 2785 2792 'status' => $this->getStatus(), 2786 2793 'isImporting' => (bool)$this->isImporting(), 2794 + 'almanacServicePHID' => $this->getAlmanacServicePHID(), 2787 2795 ); 2788 2796 } 2789 2797