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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user