[build] cmd/relnote: added markdown summary info from issue and CLs for each TODO

1 view
Skip to first unread message

David Chase (Gerrit)

unread,
Jun 5, 2026, 10:21:43 PM (2 days ago) Jun 5
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Dmitri Shuralyov, Dmitri Shuralyov, Carlos Amedee, Gopher Robot, golang-co...@googlegroups.com

David Chase submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: cmd/relnote/todo.go
Insertions: 12, Deletions: 11.

@@ -103,7 +103,7 @@
return err
}
// Don't recursively process 9-todo.md itself
- if !d.IsDir() && d.Name() != "9-todo.md" {
+ if !d.IsDir() && strings.HasSuffix(path, ".md") && d.Name() != "9-todo.md" {
if err := infoFromFile(fsys, path, mentioned, addToDo); err != nil {
return err
}
@@ -205,6 +205,10 @@
})
}

+func clProvenance(cl *maintner.GerritCL) string {
+ return fmt.Sprintf("RELNOTE comment in [CL %d](/cl/%[1]d)", cl.Number)
+}
+
func todoFromRelnote(ctx context.Context, cl *maintner.GerritCL, gc *gerrit.Client, add func(ToDo)) error {
comments, err := gc.ListChangeComments(ctx, fmt.Sprint(cl.Number))
if err != nil {
@@ -216,7 +220,7 @@
}
add(ToDo{
message: "TODO: " + rn,
- provenance: fmt.Sprintf("RELNOTE comment in https://go.dev/cl/%d", cl.Number),
+ provenance: clProvenance(cl),
summary: cl.Commit.Msg,
})
}
@@ -232,15 +236,16 @@
// Add a TODO for all issues, regardless of when or whether they are closed.
// Any work on an accepted proposal is potentially worthy of a release note.

+ message := fmt.Sprintf("TODO: accepted [proposal %d](/issue/%[1]d)", num)
// This add can create duplicate entries, to be filtered out after sorting.
add(ToDo{
- message: fmt.Sprintf("TODO: accepted [proposal %d](/issue/%[1]d)", num),
+ message: message,
summary: issue.Title,
isIssue: true,
})
add(ToDo{
- message: fmt.Sprintf("TODO: accepted [proposal %d](/issue/%[1]d)", num),
- provenance: fmt.Sprintf("https://go.dev/cl/%d", cl.Number),
+ message: message,
+ provenance: clProvenance(cl),
summary: cl.Commit.Msg,
})
}
@@ -378,13 +383,9 @@
provs = append(provs, fixURL(td.provenance))
}
}
- // rewrite as explicit links because markdown doesn't recognize "/cl/foo" as a link
- var linkedProvs []string
- for _, s := range provs {
- linkedProvs = append(linkedProvs, "["+s+"]("+s+")")
- }
+
// Lead with newline to put some space between the TODO blocks
- if _, err := fmt.Fprintf(w, "\n### %s (from %s)\n", fixURL(msg), strings.Join(linkedProvs, ", ")); err != nil {
+ if _, err := fmt.Fprintf(w, "\n### %s (from %s)\n", fixURL(msg), strings.Join(provs, ", ")); err != nil {
return err
}
for _, s := range summaries {
```

Change information

Commit message:
cmd/relnote: added markdown summary info from issue and CLs for each TODO

Formats into markdown for easy copy-paste into documents.
The issue and CL links are clickable and go.dev-relative.

Explicitly skips 9-todo.md in processing, and ends with
a suggestion that perhaps you'd like to put the output there.
Change-Id: I078488fb913080614818bfee9375ebf87a1bc675
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Files:
  • M cmd/relnote/todo.go
Change size: M
Delta: 1 file changed, 77 insertions(+), 8 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: build
Gerrit-Branch: master
Gerrit-Change-Id: I078488fb913080614818bfee9375ebf87a1bc675
Gerrit-Change-Number: 784620
Gerrit-PatchSet: 5
Gerrit-Owner: David Chase <drc...@google.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages