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

Make `bin/diviner generate --repository <repository>` accept identifiers

Summary: Ref T4245. This currently accepts only callsigns; prepare it for the bright new callsign-optional world.

Test Plan:
- Ran `./bin/diviner generate --repository 1 --book src/docs/book/flavor.book --clean`, got a good result.
- Ran `./bin/diviner generate --repository 239238 --book src/docs/book/flavor.book --clean`, got an appropraite error about a bad repository identifier.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

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

+6 -6
+6 -6
src/applications/diviner/workflow/DivinerGenerateWorkflow.php
··· 27 27 ), 28 28 array( 29 29 'name' => 'repository', 30 - 'param' => 'callsign', 30 + 'param' => 'identifier', 31 31 'help' => pht('Repository that the documentation belongs to.'), 32 32 ), 33 33 )); ··· 192 192 } 193 193 $publisher = newv($publisher_class, array()); 194 194 195 - $callsign = $args->getArg('repository'); 195 + $identifier = $args->getArg('repository'); 196 196 $repository = null; 197 - if ($callsign) { 197 + if (strlen($identifier)) { 198 198 $repository = id(new PhabricatorRepositoryQuery()) 199 199 ->setViewer(PhabricatorUser::getOmnipotentUser()) 200 - ->withCallsigns(array($callsign)) 200 + ->withIdentifiers(array($identifier)) 201 201 ->executeOne(); 202 202 203 203 if (!$repository) { 204 204 throw new PhutilArgumentUsageException( 205 205 pht( 206 - "Repository '%s' does not exist.", 207 - $callsign)); 206 + 'Repository "%s" does not exist.', 207 + $identifier)); 208 208 } 209 209 210 210 $publisher->setRepositoryPHID($repository->getPHID());