mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-20 19:51:08 +01:00
Add "mark committed" action to the web UI
Summary: When a revision is accepted, allow users to manually mark it committed if there's a daemon/tracking problem. This shouldn't happen in most installs but we have less-robust support for Mercurial and some installs may not be fully configured. Test Plan: Marked a revision committed. Reviewers: btrahan, Makinde Reviewed By: Makinde CC: aran, epriestley Maniphest Tasks: T948 Differential Revision: https://secure.phabricator.com/D1808
This commit is contained in:
parent
84d2f5fcad
commit
62f18914db
3 changed files with 11 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -72,6 +72,7 @@ final class DifferentialAction {
|
|||
self::ACTION_RESIGN => 'Resign as Reviewer',
|
||||
self::ACTION_ADDREVIEWERS => 'Add Reviewers',
|
||||
self::ACTION_ADDCCS => 'Add CCs',
|
||||
self::ACTION_COMMIT => 'Mark Committed',
|
||||
);
|
||||
|
||||
if (!empty($verbs[$action])) {
|
||||
|
|
|
@ -445,6 +445,7 @@ class DifferentialRevisionViewController extends DifferentialController {
|
|||
$actions[DifferentialAction::ACTION_ABANDON] = true;
|
||||
$actions[DifferentialAction::ACTION_REQUEST] = true;
|
||||
$actions[DifferentialAction::ACTION_RETHINK] = true;
|
||||
$actions[DifferentialAction::ACTION_COMMIT] = true;
|
||||
break;
|
||||
case ArcanistDifferentialRevisionStatus::COMMITTED:
|
||||
break;
|
||||
|
|
|
@ -320,6 +320,14 @@ class DifferentialCommentEditor {
|
|||
break;
|
||||
|
||||
case DifferentialAction::ACTION_COMMIT:
|
||||
|
||||
// TODO: We allow this from any state because the daemons are
|
||||
// considered authoritative. However, this technically means that anyone
|
||||
// can mark anything committed at any time with the right POST.
|
||||
// Ideally we should set a flag on the editor to tell it whether it
|
||||
// should enforce the web workflow rules (actor must be author and
|
||||
// state must be 'accepted') or the daemon workflow rules (no rules).
|
||||
|
||||
$revision
|
||||
->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue