/
noopOwners.tmpl
49 lines (36 loc) · 2.52 KB
/
noopOwners.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
### Noop Approval Ownership
{{- if or (gt (len $.NoopOwners.OwnedSourceFiles) 0) (gt (len $.NoopOwners.UnownedSourceFiles) 0) }}
#### Resource Source Files
The owners of the source files affecting this change may approve this noop:
{{- range $file, $owners := $.NoopOwners.OwnedSourceFiles }}
- [{{ $file }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $file }}): {{ $owners | join ", " }}
{{- end }}
{{- range $file := $.NoopOwners.UnownedSourceFiles }}
- [{{ $file }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $file }}): No owner
{{- end }}
{{- end }}
{{- if or (gt (len $.NoopOwners.OwnedModules) 0) (gt (len $.NoopOwners.UnownedModules) 0) }}
#### Resource Modules
The owners of the modules affecting this change may approve this noop:
{{- range $module, $owners := $.NoopOwners.OwnedModules }}
- [{{ $module.Name }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $module.Path }}): {{ $owners | join ", " }}
{{- end }}
{{- range $module := $.NoopOwners.UnownedModules }}
- [{{ $module.Name }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $module.Path }}): No owner
{{- end }}
{{- end }}
#### Node Source Files
{{- if gt (len $.NoopOwners.OwnedNodeFiles) 0 }}
The following node file owners may approve this noop:
{{- range $file, $owners := $.NoopOwners.OwnedNodeFiles }}
- [{{ $file }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $file }}): {{ $owners | join ", " }}
{{- end }}
{{- end }}
{{- if gt (len $.NoopOwners.UnownedNodeFiles) 0 }}
No approvers were found for the following node files affected by this commit. Please update this repository's [CODEOWNERS](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/CODEOWNERS) file with an appropriate reviewer for these node files:
{{- range $file := $.NoopOwners.UnownedNodeFiles }}
- [{{ $file }}](https://{{ $.Conf.GitHubDomain }}/{{ $.Conf.RepoOwner }}/{{ $.Conf.Repo }}/blob/{{ $.Commit.AsObject.Id }}/{{ $file }})
{{- end }}
{{- end }}
#### How to Approve
Anyone from the above approvers list, except for the authors of this commit, may leave a comment with the message "approved" to approve any component of this noop. For compliance reasons authors may not approve their own changes.