summaryrefslogtreecommitdiffstats
path: root/java/com/google/gerrit/extensions/client/ChangeStatus.java
blob: 89cdf5d46829c11f32584696586e2af1cb4cc346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.gerrit.extensions.client;

/* Current state within the basic workflow of the change **/
public enum ChangeStatus {

  /**
   * Change is open and pending review, or review is in progress.
   *
   * <p>This is the default state assigned to a change when it is first created in the database. A
   * change stays in the NEW state throughout its review cycle, until the change is submitted or
   * abandoned.
   *
   * <p>Changes in the NEW state can be moved to:
   *
   * <ul>
   *   <li>{@link #MERGED} - when the Submit Patch Set action is used;
   *   <li>{@link #ABANDONED} - when the Abandon action is used.
   * </ul>
   */
  NEW,

  /**
   * Change is staged and waiting for CI to start a build of it.
   *
   * <p> While a change is staged, it cannot be further modified by adding a replacement patch
   * set.
   */
  STAGED,

  /**
   * Change is integrating in a build on a CI system.
   *
   * <p> While a change is integrating, it cannot be further modified by adding a replacement patch
   * set.
   */
  INTEGRATING,

  /**
   * Change is closed, and submitted to its destination branch.
   *
   * <p>Once a change has been merged, it cannot be further modified by adding a replacement patch
   * set. Draft comments however may be published, supporting a post-submit review.
   */
  MERGED,

  /**
   * Change is closed, but was not submitted to its destination branch.
   *
   * <p>Once a change has been abandoned, it cannot be further modified by adding a replacement
   * patch set, and it cannot be merged. Draft comments however may be published, permitting
   * reviewers to send constructive feedback.
   *
   * <p>Changes in the ABANDONED state can be moved to:
   *
   * <ul>
   *   <li>{@link #NEW} - when the Restore action is used.
   * </ul>
   */
  ABANDONED,

  /**
   * Change is closed, but was not submitted to its destination branch. Deferred is similar
   * to abandoned, the difference is that the change is expected to be reopened later.
   *
   * <p>Once a change has been deferred, it cannot be further modified by adding a replacement
   * patch set, and it cannot be merged. Draft comments however may be published, permitting
   * reviewers to send constructive feedback.
   *
   * <p>Changes in the DEFERRED state can be moved to:
   *
   * <ul>
   *   <li>{@link #NEW} - when the Reopen action is used.
   * </ul>
   */
  DEFERRED
}