mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
When a revision is closed, always promote it out of draft
Summary: Fixes T13300. Currently, if you create a revision and then immediately land it (either using `--draft` or just beating Harbormaster to the punch) it can be stuck in "Draft" forever. Instead, count landing changes like this as a publishing action. Test Plan: - Used `arc diff --hold` to create a revision, then pushed the commit immediately. - Before change: revision closed, but was stuck in draft. - After change: revision closed and was promoted out of draft. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13300 Differential Revision: https://secure.phabricator.com/D20565
This commit is contained in:
parent
67f062b004
commit
760406762a
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,11 @@ final class DifferentialRevisionCloseTransaction
|
||||||
$object->setProperty(
|
$object->setProperty(
|
||||||
DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED,
|
DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED,
|
||||||
$was_accepted);
|
$was_accepted);
|
||||||
|
|
||||||
|
// See T13300. When a revision is closed, we promote it out of "Draft"
|
||||||
|
// immediately. This usually happens when a user creates a draft revision
|
||||||
|
// and then lands the associated commit before the revision leaves draft.
|
||||||
|
$object->setShouldBroadcast(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validateAction($object, PhabricatorUser $viewer) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
Loading…
Reference in a new issue