acceptance.md 3.32 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

- The **Score** is computed by comparing the number of :thumbsup: and :thumbsdown: given to the MergeRequest
- Only project *developers* (or higher) are taken into account

Simon Latapie's avatar
Simon Latapie committed
10
### Process Diagram
11
12

![](acceptance.svg)
13

14

Simon Latapie's avatar
Simon Latapie committed
15
# Implementation
16
17
18

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

Simon Latapie's avatar
Simon Latapie committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
### 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

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.


35
### If the MergeRequest author has Developer role (or higher)
36
37

```mermaid
38
graph TD
39
40
41
42
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
43
    PipelineReady --> Q2{Is CI OK?}
44
    Q2 -->|Yes| Reviewable([Reviewable])
45
    Q2 -->|No| NotCompliant
46
47
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
    Reviewable -->|"No vote and No thread opened during 72h"| Accepted([Accepted])
Simon Latapie's avatar
Simon Latapie committed
48
    Reviewable -->|"Thread opened or another Developer voted"| InReview([InReview])
49
    InReview -->|"All threads resolved and Score >= 0"| Acceptable([Acceptable])
50
    Acceptable -->|Wait for 24h| Accepted
51
52
53
54
55
56
57
58
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
59
60
```

61
### If the MergeRequest author is **NOT** a project's developer
62
63

```mermaid
64
graph TD
65
66
67
68
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
69
    PipelineReady --> Q2{Is CI OK?}
70
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
71
    Q2 -->|No| NotCompliant
72
73
74
75
76
77
78
79
80
81
82
83
    Q2 -->|Yes| Reviewable([Reviewable])
    Reviewable -->|"Thread opened or a Developer voted"| InReview([InReview])
    InReview -->|"All threads resolved and Score > 0"| Acceptable([Acceptable])
    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
84
85
```