mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 19:52:44 +01:00
943c62d1e9
Summary: Ref T1191. - Adds definitions for missing keys and keys with wrong uniqueness. Generally, I defined these before fixing the key query to actually pull all keys and support uniqueness. - Moves "key uniqueness" to note severity; this is fixable (probably?) and there are no remaining issues. - Moves "Missing Key" to note severity; missing keys are fixable and all remaining missing keys are really missing (either missing edge keys, or missing PHID keys): {F210089} - Moves "Surplus Key" to note seveirty; surplus keys are fixable all remaining surplus keys are really surplus (duplicate key in Harbormaster, key on unused column in Worker): {F210090} Test Plan: - Vetted missing/surplus/unique messages. - 146 issues remaining. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10590
58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
final class PhabricatorAuditTransactionComment
|
|
extends PhabricatorApplicationTransactionComment {
|
|
|
|
protected $commitPHID;
|
|
protected $pathID;
|
|
protected $isNewFile = 0;
|
|
protected $lineNumber = 0;
|
|
protected $lineLength = 0;
|
|
protected $fixedState;
|
|
protected $hasReplies = 0;
|
|
protected $replyToCommentPHID;
|
|
protected $legacyCommentID;
|
|
|
|
public function getApplicationTransactionObject() {
|
|
return new PhabricatorAuditTransaction();
|
|
}
|
|
|
|
public function shouldUseMarkupCache($field) {
|
|
// Only cache submitted comments.
|
|
return ($this->getTransactionPHID() != null);
|
|
}
|
|
|
|
public function getConfiguration() {
|
|
$config = parent::getConfiguration();
|
|
|
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
|
'commitPHID' => 'phid?',
|
|
'pathID' => 'id?',
|
|
'isNewFile' => 'bool',
|
|
'lineNumber' => 'uint32',
|
|
'lineLength' => 'uint32',
|
|
'fixedState' => 'text12?',
|
|
'hasReplies' => 'bool',
|
|
'replyToCommentPHID' => 'phid?',
|
|
'legacyCommentID' => 'id?',
|
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
|
|
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
|
'key_path' => array(
|
|
'columns' => array('pathID'),
|
|
),
|
|
'key_draft' => array(
|
|
'columns' => array('authorPHID', 'transactionPHID'),
|
|
),
|
|
'key_commit' => array(
|
|
'columns' => array('commitPHID'),
|
|
),
|
|
'key_legacy' => array(
|
|
'columns' => array('legacyCommentID'),
|
|
),
|
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
|
|
|
return $config;
|
|
}
|
|
|
|
}
|