Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
| ... | ... |
@@ -53,14 +53,17 @@ All decisions affecting docker, big and small, follow the same 3 steps: |
| 53 | 53 |
|
| 54 | 54 |
* Step 2: Discuss the pull request. Anyone can do this. |
| 55 | 55 |
|
| 56 |
-* Step 3: Accept or refuse a pull request. The relevant maintainer does this (see below "Who decides what?") |
|
| 56 |
+* Step 3: Accept (`LGTM`) or refuse a pull request. The relevant maintainers do |
|
| 57 |
+this (see below "Who decides what?") |
|
| 57 | 58 |
|
| 58 | 59 |
|
| 59 | 60 |
## Who decides what? |
| 60 | 61 |
|
| 61 |
-So all decisions are pull requests, and the relevant maintainer makes |
|
| 62 |
-the decision by accepting or refusing the pull request. But how do we |
|
| 63 |
-identify the relevant maintainer for a given pull request? |
|
| 62 |
+All decisions are pull requests, and the relevant maintainers make |
|
| 63 |
+decisions by accepting or refusing the pull request. Review and acceptance |
|
| 64 |
+by anyone is denoted by adding a comment in the pull request: `LGTM`. |
|
| 65 |
+However, only currently listed `MAINTAINERS` are counted towards the required |
|
| 66 |
+majority. |
|
| 64 | 67 |
|
| 65 | 68 |
Docker follows the timeless, highly efficient and totally unfair system |
| 66 | 69 |
known as [Benevolent dictator for |
| ... | ... |
@@ -70,19 +73,22 @@ decisions are made by default by Solomon. Since making every decision |
| 70 | 70 |
myself would be highly un-scalable, in practice decisions are spread |
| 71 | 71 |
across multiple maintainers. |
| 72 | 72 |
|
| 73 |
-The relevant maintainer for a pull request is assigned in 3 steps: |
|
| 73 |
+The relevant maintainers for a pull request can be worked out in 2 steps: |
|
| 74 | 74 |
|
| 75 |
-* Step 1: Determine the subdirectory affected by the pull request. This |
|
| 75 |
+* Step 1: Determine the subdirectories affected by the pull request. This |
|
| 76 | 76 |
might be `src/registry`, `docs/source/api`, or any other part of the repo. |
| 77 | 77 |
|
| 78 | 78 |
* Step 2: Find the `MAINTAINERS` file which affects this directory. If the |
| 79 | 79 |
directory itself does not have a `MAINTAINERS` file, work your way up |
| 80 | 80 |
the repo hierarchy until you find one. |
| 81 | 81 |
|
| 82 |
-* Step 3: The first maintainer listed is the primary maintainer. The |
|
| 83 |
- pull request is assigned to him. He may assign it to other listed |
|
| 84 |
- maintainers, at his discretion. |
|
| 82 |
+There is also a `hacks/getmaintainers.sh` script that will print out the |
|
| 83 |
+maintainers for a specified directory. |
|
| 85 | 84 |
|
| 85 |
+### I'm a maintainer, and I'm going on holiday |
|
| 86 |
+ |
|
| 87 |
+Please let your co-maintainers and other contributors know by raising a pull |
|
| 88 |
+request that comments out your `MAINTAINERS` file entry using a `#`. |
|
| 86 | 89 |
|
| 87 | 90 |
### I'm a maintainer, should I make pull requests too? |
| 88 | 91 |
|
| ... | ... |
@@ -91,7 +97,7 @@ made through a pull request. |
| 91 | 91 |
|
| 92 | 92 |
### Who assigns maintainers? |
| 93 | 93 |
|
| 94 |
-Solomon. |
|
| 94 |
+Solomon has final `LGTM` approval for all pull requests to `MAINTAINERS` files. |
|
| 95 | 95 |
|
| 96 | 96 |
### How is this process changed? |
| 97 | 97 |
|
| ... | ... |
@@ -1,4 +1,5 @@ |
| 1 |
-#!/bin/sh |
|
| 1 |
+#!/usr/bin/env bash |
|
| 2 |
+set -e |
|
| 2 | 3 |
|
| 3 | 4 |
if [ $# -ne 1 ]; then |
| 4 | 5 |
echo >&2 "Usage: $0 PATH" |
| ... | ... |
@@ -34,6 +35,7 @@ while true; do |
| 34 | 34 |
fi |
| 35 | 35 |
done; |
| 36 | 36 |
} < MAINTAINERS |
| 37 |
+ break |
|
| 37 | 38 |
fi |
| 38 | 39 |
if [ -d .git ]; then |
| 39 | 40 |
break |
| ... | ... |
@@ -46,13 +48,15 @@ done |
| 46 | 46 |
|
| 47 | 47 |
PRIMARY="${MAINTAINERS[0]}"
|
| 48 | 48 |
PRIMARY_FIRSTNAME=$(echo $PRIMARY | cut -d' ' -f1) |
| 49 |
+LGTM_COUNT=${#MAINTAINERS[@]}
|
|
| 50 |
+LGTM_COUNT=$((LGTM_COUNT%2 +1)) |
|
| 49 | 51 |
|
| 50 | 52 |
firstname() {
|
| 51 | 53 |
echo $1 | cut -d' ' -f1 |
| 52 | 54 |
} |
| 53 | 55 |
|
| 54 |
-echo "--- $PRIMARY is the PRIMARY MAINTAINER of $1. Assign pull requests to him." |
|
| 55 |
-echo "$(firstname $PRIMARY) may assign pull requests to the following secondary maintainers:" |
|
| 56 |
+echo "A pull request in $1 will need $LGTM_COUNT LGTM's to be merged." |
|
| 57 |
+echo "--- $PRIMARY is the PRIMARY MAINTAINER of $1." |
|
| 56 | 58 |
for SECONDARY in "${MAINTAINERS[@]:1}"; do
|
| 57 | 59 |
echo "--- $SECONDARY" |
| 58 | 60 |
done |