acceptance.md 4 KB
Newer Older
1
2
3
4
# Homer MergeRequest Acceptance process

The Acceptance process slightly differs whether you are a project's *developer* (or higher) or not.

Simon Latapie's avatar
Simon Latapie committed
5
### Voting system
6

7
8
9
10
11
12
13
14
15
#### General rules

- Only project *developers* (with a *developer* role in the project or higher) votes are taken into account.
- Votes on your own Merge Request (either positive or negative) are ignored.

#### New Method

- The **Score** is computed by counting the current number of approvals from the project *developers*.

16
17
Note: there is no real replacement for downvotes (:thumbsdown:) from the old method: this action is merged with the unresolved thread requirement.

18
19
20
#### Old method

- The **Score** is computed by comparing the number of :thumbsup: and :thumbsdown: given to the MergeRequest.
21

Simon Latapie's avatar
Simon Latapie committed
22
### Process Diagram
23
24

![](acceptance.svg)
25

26

Simon Latapie's avatar
Simon Latapie committed
27
# Implementation
28
29
30

Homer uses a simple decision graph to determine the status of the merge requests.

Simon Latapie's avatar
Simon Latapie committed
31
32
33
34
35
36
37
38
### Status Definitions

Visible status:
- NotCompliant: This MR doesn't pass the mandatory requirements such as a successful pipeline
- Reviewable: This MR has passed the pipeline and can now be reviewed by developers
- InReview: This MR is being reviewed and has opened discussions
- Acceptable: This MR will be accepted once the cooldown period has passed (24h or 72h)
- Accepted: This MR can be rebased and merged by a developer
Simon Latapie's avatar
Simon Latapie committed
39
- Stale: This MR is not acceptable and inactive for too long (60 days)
Simon Latapie's avatar
Simon Latapie committed
40
41
42
43
44
45
46
47

Internal status:
- Submitted: Initial status
- PipelineReady: Is it possible to check the pipeline result
- QuantumState: It is not possible to know if the merge request is mergeable (the mergeability check is not finished)
- PipelineNotFinished: The pipeline check is not finished.


48
### If the MergeRequest author has Developer role (or higher)
49
50

```mermaid
51
graph TD
52
53
54
55
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
56
    PipelineReady --> Q2{Is CI OK?}
57
    Q2 -->|Yes| Reviewable([Reviewable])
58
    Q2 -->|No| NotCompliant
59
60
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
    Reviewable -->|"No vote and No thread opened during 72h"| Accepted([Accepted])
Simon Latapie's avatar
Simon Latapie committed
61
    Reviewable -->|"Thread opened or another Developer voted"| InReview([InReview])
62
    InReview -->|"All threads resolved and Score >= 0"| Acceptable([Acceptable])
63
    InReview -->|"Inactive for 60 days"| Stale([Stale])
64
    Acceptable -->|Wait for 24h| Accepted
65
66
67
68
69
70
71
72
classDef default fill:#fff,stroke-width:2px
classDef internal stroke-dasharray: 5 5
class Submitted,PipelineReady,QuantumState,PipelineNotFinished internal
style Acceptable color:#8fbc8f,stroke:#8fbc8f
style Accepted color:#009966,stroke:#009966
style InReview color:#FF8800,stroke:#FF8800
style NotCompliant color:#6699cc,stroke:#6699cc
style Reviewable color:#FF610A,stroke:#FF610A
73
style Stale color:#6699cc,stroke:#6699cc
74
75
```

76
### If the MergeRequest author is **NOT** a project's developer
77
78

```mermaid
79
graph TD
80
81
82
83
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
84
    PipelineReady --> Q2{Is CI OK?}
85
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
86
    Q2 -->|No| NotCompliant
87
88
89
    Q2 -->|Yes| Reviewable([Reviewable])
    Reviewable -->|"Thread opened or a Developer voted"| InReview([InReview])
    InReview -->|"All threads resolved and Score > 0"| Acceptable([Acceptable])
90
    InReview -->|"Inactive for 60 days"| Stale([Stale])
91
92
93
94
95
96
97
98
99
    Acceptable -->|Wait for 72h| Accepted([Accepted])
classDef default fill:#fff,stroke-width:2px
classDef internal stroke-dasharray: 5 5
class Submitted,PipelineReady,QuantumState,PipelineNotFinished internal
style Acceptable color:#8fbc8f,stroke:#8fbc8f
style Accepted color:#009966,stroke:#009966
style InReview color:#FF8800,stroke:#FF8800
style NotCompliant color:#6699cc,stroke:#6699cc
style Reviewable color:#FF610A,stroke:#FF610A
100
style Stale color:#6699cc,stroke:#6699cc
101
102
```