mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Add link to Herald Transaction when blocking pushes
Summary: Ref T9719. Test Plan: Tried to push, get dragon and a link. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Maniphest Tasks: T9719 Differential Revision: https://secure.phabricator.com/D15027
This commit is contained in:
parent
3f439e25bc
commit
98d2370672
1 changed files with 9 additions and 4 deletions
|
@ -308,6 +308,7 @@ final class DiffusionCommitHookEngine extends Phobject {
|
|||
$rules = null;
|
||||
$blocking_effect = null;
|
||||
$blocked_update = null;
|
||||
$blocking_xscript = null;
|
||||
foreach ($updates as $update) {
|
||||
$adapter = id(clone $adapter_template)
|
||||
->setPushLog($update);
|
||||
|
@ -332,6 +333,7 @@ final class DiffusionCommitHookEngine extends Phobject {
|
|||
if ($effect->getAction() == $block_action) {
|
||||
$blocking_effect = $effect;
|
||||
$blocked_update = $update;
|
||||
$blocking_xscript = $xscript;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -357,13 +359,16 @@ final class DiffusionCommitHookEngine extends Phobject {
|
|||
throw new DiffusionCommitHookRejectException(
|
||||
pht(
|
||||
"This push was rejected by Herald push rule %s.\n".
|
||||
"Change: %s\n".
|
||||
" Rule: %s\n".
|
||||
"Reason: %s",
|
||||
" Change: %s\n".
|
||||
" Rule: %s\n".
|
||||
" Reason: %s\n".
|
||||
"Transcript: %s",
|
||||
$rule->getMonogram(),
|
||||
$blocked_name,
|
||||
$rule->getName(),
|
||||
$message));
|
||||
$message,
|
||||
PhabricatorEnv::getProductionURI(
|
||||
'/herald/transcript/'.$blocking_xscript->getID().'/')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue