phacility/phabricator · error · DiffusionCommitHookRejectException

This push was rejected by Herald push rule

Error message

This push was rejected by Herald push rule %s.
    Change: %s
      Rule: %s
    Reason: %s
Transcript: %s

What it means

Push rejection from applyHeraldRules: a Herald push rule produced a blocking effect on a ref update. The exception (DiffusionCommitHookRejectException) carries the rule name, the affected ref, the rule's rejection message, and a transcript URI; rejectCode is set to REJECT_HERALD so the push log records the Herald rejection.

Solutions

  1. Read the Herald transcript link in the message to see which rule blocked the push
  2. Adjust the change to satisfy the blocking Herald rule
  3. Ask the rule owner to update or disable the blocking Herald push rule
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:396 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/89ffdc94f7a8ec36. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:396

    }

    if ($blocking_effect) {
      $rule = $blocking_effect->getRule();

      $this->rejectCode = PhabricatorRepositoryPushLog::REJECT_HERALD;
      $this->rejectDetails = $rule->getPHID();

      $message = $blocking_effect->getTarget();
      if (!strlen($message)) {
        $message = pht('(None.)');
      }

      $blocked_ref_name = coalesce(
        $blocked_update->getRefName(),
        $blocked_update->getRefNewShort());
      $blocked_name = $blocked_update->getRefType().'/'.$blocked_ref_name;

      throw new DiffusionCommitHookRejectException(
        pht(
          "This push was rejected by Herald push rule %s.\n".
          "    Change: %s\n".
          "      Rule: %s\n".
          "    Reason: %s\n".
          "Transcript: %s",
          $rule->getMonogram(),
          $blocked_name,
          $rule->getName(),
          $message,
          PhabricatorEnv::getProductionURI(
            '/herald/transcript/'.$blocking_xscript->getID().'/')));
    }
  }

  public function loadViewerProjectPHIDsForHerald() {
    // This just caches the viewer's projects so we don't need to load them
    // over and over again when applying Herald rules.

View on GitHub (pinned to 5720a38cfe)