Skip to content

Commit 6153db5

Browse files
committed
generator: make subproject owners links useful
reduce the visual noise, and make the links go to githubs UI so: https://raw.githubusercontent.com/org/repo/branch/path/to/OWNERS becomes: - link text: org/repo/path/to - link target: https://github.com/org/repo/blob/branch/path/to/ORWNERS note: this does assume/imply we don't need to model the complexity of subprojects owning different branches... but, we haven't found a reason to do so in 5 years, seems a safe assumption
1 parent 3468415 commit 6153db5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

generator/app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ func getExistingContent(path string, fileFormat string) (string, error) {
374374
var funcMap = template.FuncMap{
375375
"tzUrlEncode": tzURLEncode,
376376
"trimSpace": strings.TrimSpace,
377+
"trimSuffix": strings.TrimSuffix,
377378
"githubURL": githubURL,
378379
"orgRepoPath": orgRepoPath,
379380
}

generator/committee_readme.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following [subprojects][subproject-definition] are owned by the {{.Name}} Co
6666
{{- end }}
6767
- **Owners:**
6868
{{- range .Owners }}
69-
- {{.}}
69+
- [{{trimSuffix (orgRepoPath .) "/OWNERS"}}]({{githubURL .}})
7070
{{- end }}
7171
{{- if .Contact }}
7272
- **Contact:**

generator/sig_readme.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The following [subprojects][subproject-definition] are owned by sig-{{.Label}}:
7676
{{- end }}
7777
- **Owners:**
7878
{{- range .Owners }}
79-
- {{.}}
79+
- [{{trimSuffix (orgRepoPath .) "/OWNERS"}}]({{githubURL .}})
8080
{{- end }}
8181
{{- if .Contact }}
8282
- **Contact:**

0 commit comments

Comments
 (0)