mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Only associate branch with task if maniphest is enabled
Summary: Previously, maniphest tasks would get upated by diffs on branches with tasky names, even if maniphest was disabled. Test Plan: Tested createing a diff in sandbox with maniphest disabled, on a git branch named using the format "t###". Without this change, if there happened to be a task in the maniphest DB which matched, it was updated an email was sent to users. Reviewers: epriestley Reviewed By: epriestley CC: wez, slawekbiel, whhone, Korvin, aran Differential Revision: https://secure.phabricator.com/D6881
This commit is contained in:
parent
853544b54a
commit
8bba3f280d
1 changed files with 5 additions and 0 deletions
|
@ -47,6 +47,11 @@ final class DifferentialBranchFieldSpecification
|
|||
}
|
||||
|
||||
public function didWriteRevision(DifferentialRevisionEditor $editor) {
|
||||
$maniphest = 'PhabricatorApplicationManiphest';
|
||||
if (!PhabricatorApplication::isClassInstalled($maniphest)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$branch = $this->getDiff()->getBranch();
|
||||
$match = null;
|
||||
if (preg_match('/^T(\d+)/i', $branch, $match)) { // No $ to allow T123_demo.
|
||||
|
|
Loading…
Reference in a new issue