acceptance.md 3.6 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
16
17
18
#### 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*.

#### Old method

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

Simon Latapie's avatar
Simon Latapie committed
20
### Process Diagram
21
22

![](acceptance.svg)
23

24

Simon Latapie's avatar
Simon Latapie committed
25
# Implementation
26
27
28

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

Simon Latapie's avatar
Simon Latapie committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
### 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.


45
### If the MergeRequest author has Developer role (or higher)
46
47

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

71
### If the MergeRequest author is **NOT** a project's developer
72
73

```mermaid
74
graph TD
75
76
77
78
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
79
    PipelineReady --> Q2{Is CI OK?}
80
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
81
    Q2 -->|No| NotCompliant
82
83
84
85
86
87
88
89
90
91
92
93
    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
94
95
```