Differential D18341 Diff 44160 src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
| Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | if ($revision_id) { | ||||
| queryfx( | queryfx( | ||||
| $conn_w, | $conn_w, | ||||
| 'INSERT IGNORE INTO %T (revisionID, commitPHID) VALUES (%d, %s)', | 'INSERT IGNORE INTO %T (revisionID, commitPHID) VALUES (%d, %s)', | ||||
| DifferentialRevision::TABLE_COMMIT, | DifferentialRevision::TABLE_COMMIT, | ||||
| $revision->getID(), | $revision->getID(), | ||||
| $commit->getPHID()); | $commit->getPHID()); | ||||
| $status_closed = ArcanistDifferentialRevisionStatus::CLOSED; | $should_close = !$revision->isPublished() && $should_autoclose; | ||||
| $should_close = ($revision->getStatus() != $status_closed) && | |||||
| $should_autoclose; | |||||
| if ($should_close) { | if ($should_close) { | ||||
| $commit_close_xaction = id(new DifferentialTransaction()) | $commit_close_xaction = id(new DifferentialTransaction()) | ||||
| ->setTransactionType(DifferentialTransaction::TYPE_ACTION) | ->setTransactionType(DifferentialTransaction::TYPE_ACTION) | ||||
| ->setNewValue(DifferentialAction::ACTION_CLOSE) | ->setNewValue(DifferentialAction::ACTION_CLOSE) | ||||
| ->setMetadataValue('isCommitClose', true); | ->setMetadataValue('isCommitClose', true); | ||||
| $commit_close_xaction->setMetadataValue( | $commit_close_xaction->setMetadataValue( | ||||
| 'commitPHID', | 'commitPHID', | ||||
| ▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines | |||||