phacility/phabricator · error · PhutilArgumentUsageException

Specify a story key to republish.

Error message

Specify a story key to republish.

What it means

Error "Specify a story key to republish." thrown in phacility/phabricator.

Source

Thrown at src/applications/feed/management/PhabricatorFeedManagementRepublishWorkflow.php:28

      ->setSynopsis(
        pht(
          'Republish a feed event to all consumers.'))
      ->setArguments(
        array(
          array(
            'name' => 'key',
            'wildcard' => true,
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $console = PhutilConsole::getConsole();
    $viewer = $this->getViewer();

    $key = $args->getArg('key');
    if (count($key) < 1) {
      throw new PhutilArgumentUsageException(
        pht('Specify a story key to republish.'));
    } else if (count($key) > 1) {
      throw new PhutilArgumentUsageException(
        pht('Specify exactly one story key to republish.'));
    }
    $key = head($key);

    $story = id(new PhabricatorFeedQuery())
      ->setViewer($viewer)
      ->withChronologicalKeys(array($key))
      ->executeOne();

    if (!$story) {
      throw new PhutilArgumentUsageException(
        pht('No story exists with key "%s"!', $key));
    }

    $console->writeOut("%s\n", pht('Republishing story...'));

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/feed/management/PhabricatorFeedManagementRepublishWorkflow.php:28 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/e1ebf58c925a18ad. Report an issue: GitHub.