mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Always mark revisions as "updated" when users comment on them
Summary: See T773 and the explanatory inline comment. Test Plan: Made no-action comments and comments that did something (reject, plan changes) to revisions. Saw them always jump to the top of the action list. Reviewers: jungejason, simpkins, btrahan Reviewed By: jungejason CC: aran, jungejason Maniphest Tasks: T773 Differential Revision: https://secure.phabricator.com/D1386
This commit is contained in:
parent
a88e132179
commit
04eb1f98e2
1 changed files with 13 additions and 14 deletions
|
@ -144,8 +144,7 @@ class DifferentialCommentEditor {
|
|||
}
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_ACCEPT:
|
||||
|
@ -161,8 +160,7 @@ class DifferentialCommentEditor {
|
|||
}
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::ACCEPTED)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::ACCEPTED);
|
||||
|
||||
if (!isset($reviewer_phids[$actor_phid])) {
|
||||
DifferentialRevisionEditor::alterReviewers(
|
||||
|
@ -187,8 +185,7 @@ class DifferentialCommentEditor {
|
|||
}
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_REJECT:
|
||||
|
@ -214,8 +211,7 @@ class DifferentialCommentEditor {
|
|||
}
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_RETHINK:
|
||||
|
@ -232,8 +228,7 @@ class DifferentialCommentEditor {
|
|||
}
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_RECLAIM:
|
||||
|
@ -246,14 +241,12 @@ class DifferentialCommentEditor {
|
|||
break;
|
||||
}
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_COMMIT:
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED)
|
||||
->save();
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED);
|
||||
break;
|
||||
|
||||
case DifferentialAction::ACTION_ADDREVIEWERS:
|
||||
|
@ -316,6 +309,12 @@ class DifferentialCommentEditor {
|
|||
throw new Exception('Unsupported action.');
|
||||
}
|
||||
|
||||
// Always save the revision (even if we didn't actually change any of its
|
||||
// properties) so that it jumps to the top of the revision list when sorted
|
||||
// by "updated". Notably, this allows "ping" comments to push it to the
|
||||
// top of the action list.
|
||||
$revision->save();
|
||||
|
||||
if ($this->addCC) {
|
||||
DifferentialRevisionEditor::addCC(
|
||||
$revision,
|
||||
|
|
Loading…
Reference in a new issue