Skip to content

Commit 1615165

Browse files
committed
godash: reset GoReleaseCycle on each refresh
Otherwise, it will never be incremented. Change-Id: Ie58a6fb08970cb592f7dfc791a4578d394001f40 Reviewed-on: https://go-review.googlesource.com/27084 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 8e9299f commit 1615165

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

godash/godash.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ type Item struct {
4444

4545
// Data represents all the data needed to compute the dashboard
4646
type Data struct {
47-
Issues map[int]*Issue
48-
CLs []*CL
49-
Milestones []*github.Milestone
47+
Issues map[int]*Issue
48+
CLs []*CL
49+
Milestones []*github.Milestone
50+
// GoReleaseCycle is the minor version of the current
51+
// under-development Go release. Issues and CLs for versions
52+
// greater than the current Go release will be hidden.
5053
GoReleaseCycle int
5154
Now time.Time
5255

@@ -65,6 +68,10 @@ func (d *Data) FetchData(gh *github.Client, ger *gerrit.Client, days int, clOnly
6568
}
6669
d.Milestones = m
6770

71+
// Find the lowest-numbered open release milestone. We assume
72+
// that is the currently-in-development release, and anything
73+
// later should be hidden.
74+
d.GoReleaseCycle = 0
6875
for _, m := range d.Milestones {
6976
if matches := releaseRE.FindStringSubmatch(*m.Title); matches != nil {
7077
n, _ := strconv.Atoi(matches[1])

0 commit comments

Comments
 (0)