You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/populate-owners/README.md
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,15 @@
1
1
# Populating `OWNERS` and `OWNERS_ALIASES`
2
2
3
-
This utility pulls `OWNERS` and `OWNERS_ALIASES` from upstream OpenShift repositories.
3
+
This utility updates the OWNERS files from remote Openshift repositories.
4
+
4
5
Usage:
6
+
populate-owners [repo-name-regex]
7
+
8
+
Args:
9
+
[repo-name-regex] A go regex which which matches the repos to update, by default all repos are selected
5
10
6
11
```console
7
-
$ go run main.go
12
+
$ go run main.go [repo-name-regex]
8
13
```
9
14
10
15
Or, equivalently, execute [`populate-owners.sh`](../../ci-operator/populate-owners.sh) from anywhere in this repository.
@@ -15,13 +20,9 @@ For example, the presence of [`ci-operator/jobs/openshift/origin`](../../ci-oper
15
20
The `HEAD` branch for each upstream repository is pulled to extract its `OWNERS` and `OWNERS_ALIASES`.
16
21
If `OWNERS` is missing, the utility will ignore `OWNERS_ALIASES`, even if it is present upstream.
17
22
18
-
Once all the upstream content has been fetched, the utility namespaces any colliding upstream aliases.
19
-
Collisions only occur if multiple upstreams define the same alias with different member sets.
20
-
When that happens, the utility replaces the upstream alias with a `{organization}-{repository}-{upstream-alias}`.
21
-
For example, if [openshift/origin][] and [openshift/installer][] both defined an alias for `security` with different member sets, the utility would rename them to `openshift-origin-security` and `openshift-installer-security` respectively.
22
-
23
-
After namespacing aliases, the utility writes `OWNERS_ALIASES` to the root of this repository.
24
-
If no upstreams define aliases, then the utility removes `OWNER_ALIASES` from the root of this repository.
23
+
Any aliases present in the upstream `OWNERS` file will be resolved to the set of usernames they represent in the associated
24
+
`OWNERS_ALIASES` file. The local `OWNERS` files will therefore not contain any alias names. This avoids any conflicts between
25
+
upstream alias names coming from different repos.
25
26
26
27
The utility also iterates through the `ci-operator/{type}/{organization}/{repository}` for `{type}` in `config`, `jobs`, and `templates`, writing `OWNERS` to reflect the upstream configuration.
27
28
If the upstream did not have an `OWNERS` file, the utility removes the associated `ci-operator/*/{organization}/{repository}/OWNERS`.
0 commit comments