{"record":{"id":"89ffdc94f7a8ec36","repo":"phacility/phabricator","slug":"this-push-was-rejected-by-herald-push-rule-s","errorCode":null,"errorMessage":"This push was rejected by Herald push rule %s.\n    Change: %s\n      Rule: %s\n    Reason: %s\nTranscript: %s","messagePattern":"This push was rejected by Herald push rule (.+?)\\.\n    Change: (.+?)\n      Rule: (.+?)\n    Reason: (.+?)\nTranscript: (.+?)","errorType":"exception","errorClass":"DiffusionCommitHookRejectException","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/engine/DiffusionCommitHookEngine.php","lineNumber":396,"sourceCode":"    }\n\n    if ($blocking_effect) {\n      $rule = $blocking_effect->getRule();\n\n      $this->rejectCode = PhabricatorRepositoryPushLog::REJECT_HERALD;\n      $this->rejectDetails = $rule->getPHID();\n\n      $message = $blocking_effect->getTarget();\n      if (!strlen($message)) {\n        $message = pht('(None.)');\n      }\n\n      $blocked_ref_name = coalesce(\n        $blocked_update->getRefName(),\n        $blocked_update->getRefNewShort());\n      $blocked_name = $blocked_update->getRefType().'/'.$blocked_ref_name;\n\n      throw new DiffusionCommitHookRejectException(\n        pht(\n          \"This push was rejected by Herald push rule %s.\\n\".\n          \"    Change: %s\\n\".\n          \"      Rule: %s\\n\".\n          \"    Reason: %s\\n\".\n          \"Transcript: %s\",\n          $rule->getMonogram(),\n          $blocked_name,\n          $rule->getName(),\n          $message,\n          PhabricatorEnv::getProductionURI(\n            '/herald/transcript/'.$blocking_xscript->getID().'/')));\n    }\n  }\n\n  public function loadViewerProjectPHIDsForHerald() {\n    // This just caches the viewer's projects so we don't need to load them\n    // over and over again when applying Herald rules.","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/engine/DiffusionCommitHookEngine.php#L378-L414","documentation":"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.","triggerScenarios":"Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:396 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the Herald transcript link in the message to see which rule blocked the push","Adjust the change to satisfy the blocking Herald rule","Ask the rule owner to update or disable the blocking Herald push rule"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}