Skip to content

Commit 58ba60d

Browse files
committed
cmd/gopherbot: correctly use milestone numbers instead of IDs
Fixes golang/go#25024 Change-Id: I5bd9dc01d798852a57e72f332c28056510c81e38 Reviewed-on: https://go-review.googlesource.com/108975 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent b977f68 commit 58ba60d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cmd/gopherbot/gopherbot.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
frozenDueToAge = "FrozenDueToAge"
5656
)
5757

58-
// GitHub Milestone IDs for the golang/go repo.
58+
// GitHub Milestone numbers for the golang/go repo.
5959
var (
6060
proposal = milestone{30, "Proposal"}
6161
unreleased = milestone{22, "Unreleased"}
@@ -64,8 +64,8 @@ var (
6464
)
6565

6666
type milestone struct {
67-
ID int64
68-
Name string
67+
Number int
68+
Name string
6969
}
7070

7171
func getGithubToken() (string, error) {
@@ -297,7 +297,7 @@ func (b *gopherbot) setMilestone(ctx context.Context, gi *maintner.GitHubIssue,
297297
return nil
298298
}
299299
_, _, err := b.ghc.Issues.Edit(ctx, "golang", "go", int(gi.Number), &github.IssueRequest{
300-
Milestone: github.Int(int(m.ID)),
300+
Milestone: github.Int(m.Number),
301301
})
302302
return err
303303
}
@@ -1127,8 +1127,8 @@ func (b *gopherbot) getMinorMilestoneForMajor(ctx context.Context, majorRel stri
11271127
}
11281128
if n > minorVers {
11291129
res = milestone{
1130-
ID: m.ID,
1131-
Name: m.Title,
1130+
Number: int(m.Number),
1131+
Name: m.Title,
11321132
}
11331133
minorVers = n
11341134
}

0 commit comments

Comments
 (0)