Differential D18412 Diff 44256 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 199 Lines • ▼ Show 20 Lines | if ($revision_id) { | ||||
| $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()); | ||||
| $should_close = !$revision->isPublished() && $should_autoclose; | $should_close = !$revision->isPublished() && $should_autoclose; | ||||
| if ($should_close) { | if ($should_close) { | ||||
| $type_close = DifferentialRevisionCloseTransaction::TRANSACTIONTYPE; | |||||
| $commit_close_xaction = id(new DifferentialTransaction()) | $commit_close_xaction = id(new DifferentialTransaction()) | ||||
| ->setTransactionType(DifferentialTransaction::TYPE_ACTION) | ->setTransactionType($type_close) | ||||
| ->setNewValue(DifferentialAction::ACTION_CLOSE) | ->setNewValue(true) | ||||
| ->setMetadataValue('isCommitClose', true); | ->setMetadataValue('isCommitClose', true); | ||||
| $commit_close_xaction->setMetadataValue( | $commit_close_xaction->setMetadataValue( | ||||
| 'commitPHID', | 'commitPHID', | ||||
| $commit->getPHID()); | $commit->getPHID()); | ||||
| $commit_close_xaction->setMetadataValue( | $commit_close_xaction->setMetadataValue( | ||||
| 'committerPHID', | 'committerPHID', | ||||
| $committer_phid); | $committer_phid); | ||||
| ▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines | |||||