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;
|
$rules = null;
|
||||||
$blocking_effect = null;
|
$blocking_effect = null;
|
||||||
$blocked_update = null;
|
$blocked_update = null;
|
||||||
|
$blocking_xscript = null;
|
||||||
foreach ($updates as $update) {
|
foreach ($updates as $update) {
|
||||||
$adapter = id(clone $adapter_template)
|
$adapter = id(clone $adapter_template)
|
||||||
->setPushLog($update);
|
->setPushLog($update);
|
||||||
|
@ -332,6 +333,7 @@ final class DiffusionCommitHookEngine extends Phobject {
|
||||||
if ($effect->getAction() == $block_action) {
|
if ($effect->getAction() == $block_action) {
|
||||||
$blocking_effect = $effect;
|
$blocking_effect = $effect;
|
||||||
$blocked_update = $update;
|
$blocked_update = $update;
|
||||||
|
$blocking_xscript = $xscript;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,11 +361,14 @@ final class DiffusionCommitHookEngine extends Phobject {
|
||||||
"This push was rejected by Herald push rule %s.\n".
|
"This push was rejected by Herald push rule %s.\n".
|
||||||
" Change: %s\n".
|
" Change: %s\n".
|
||||||
" Rule: %s\n".
|
" Rule: %s\n".
|
||||||
"Reason: %s",
|
" Reason: %s\n".
|
||||||
|
"Transcript: %s",
|
||||||
$rule->getMonogram(),
|
$rule->getMonogram(),
|
||||||
$blocked_name,
|
$blocked_name,
|
||||||
$rule->getName(),
|
$rule->getName(),
|
||||||
$message));
|
$message,
|
||||||
|
PhabricatorEnv::getProductionURI(
|
||||||
|
'/herald/transcript/'.$blocking_xscript->getID().'/')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue