Skip to content

cmd/gopherbot, cmd/gopherstats: update the use of github api #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions cmd/gopherbot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ ENV CGO_ENABLED=0

# BEGIN deps (run `make update-deps` to update)

# Repo cloud.google.com/go at ba25346 (2017-10-13)
ENV REV=ba2534604a6c2b8854d680e50f9132cade92d02f
# Repo cloud.google.com/go at d0195c2 (2018-08-16)
ENV REV=d0195c2919dd698efd742e4a4c92cfcab64252a0
RUN go get -d cloud.google.com/go/compute/metadata &&\
(cd /go/src/cloud.google.com/go && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo github.com/golang/protobuf at 130e6b0 (2017-09-20)
ENV REV=130e6b02ab059e7b717a096f397c5b60111cae74
# Repo github.com/golang/protobuf at 89a0c16 (2018-08-04)
ENV REV=89a0c16f4dc2a70c0ed864d8ef64878f24fdaa51
RUN go get -d github.com/golang/protobuf/proto `#and 5 other pkgs` &&\
(cd /go/src/github.com/golang/protobuf && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo github.com/google/go-github at 471e67c (2017-11-16)
ENV REV=471e67c93cdd36a5f7c9bba5d6d11665ba12147d
# Repo github.com/google/go-github at dae5b87 (2018-08-10)
ENV REV=dae5b8767170392dd51fafc89da6605faa51a1c2
RUN go get -d github.com/google/go-github/github &&\
(cd /go/src/github.com/google/go-github && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

Expand All @@ -28,33 +28,33 @@ ENV REV=53e6ce116135b80d037921a7fdd5138cf32d7a8a
RUN go get -d github.com/google/go-querystring/query &&\
(cd /go/src/github.com/google/go-querystring && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo github.com/gregjones/httpcache at 316c5e0 (2017-09-20)
ENV REV=316c5e0ff04e0ce21cfae9fbbb2ab39c7fc74e71
# Repo github.com/gregjones/httpcache at 9cad4c3 (2018-03-06)
ENV REV=9cad4c3443a7200dd6400aef47183728de563a38
RUN go get -d github.com/gregjones/httpcache &&\
(cd /go/src/github.com/gregjones/httpcache && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo go4.org at 034d17a (2017-05-25)
ENV REV=034d17a462f7b2dcd1a4a73553ec5357ff6e6c6e
RUN go get -d go4.org/types &&\
# Repo go4.org at 417644f (2018-08-09)
ENV REV=417644f6feb5ed3a356ca5d6d8e3a3fac7dfd33f
RUN go get -d go4.org/strutil `#and 2 other pkgs` &&\
(cd /go/src/go4.org && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo golang.org/x/net at 01c1902 (2017-11-02)
ENV REV=01c190206fbdffa42f334f4b2bf2220f50e64920
# Repo golang.org/x/net at aaf6012 (2018-08-16)
ENV REV=aaf60122140d3fcf75376d319f0554393160eb50
RUN go get -d golang.org/x/net/context `#and 2 other pkgs` &&\
(cd /go/src/golang.org/x/net && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo golang.org/x/oauth2 at bb50c06 (2017-09-28)
ENV REV=bb50c06baba3d0c76f9d125c0719093e315b5b44
# Repo golang.org/x/oauth2 at 3d292e4 (2018-07-24)
ENV REV=3d292e4d0cdc3a0113e6d207bb137145ef1de42f
RUN go get -d golang.org/x/oauth2 `#and 2 other pkgs` &&\
(cd /go/src/golang.org/x/oauth2 && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo golang.org/x/sync at f52d181 (2017-05-17)
ENV REV=f52d1811a62927559de87708c8913c1650ce4f26
# Repo golang.org/x/sync at 1d60e46 (2018-03-14)
ENV REV=1d60e4601c6fd243af51cc01ddf169918a5407ca
RUN go get -d golang.org/x/sync/errgroup &&\
(cd /go/src/golang.org/x/sync && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

# Repo golang.org/x/time at 26559e0 (2018-03-14)
ENV REV=26559e0f760e39c24d730d3224364aef164ee23f
# Repo golang.org/x/time at fbb02b2 (2018-04-12)
ENV REV=fbb02b2291d28baffd63558aa44b4b56f178d650
RUN go get -d golang.org/x/time/rate &&\
(cd /go/src/golang.org/x/time && (git cat-file -t $REV 2>/dev/null || git fetch -q origin $REV) && git reset --hard $REV)

Expand All @@ -68,6 +68,7 @@ RUN go install cloud.google.com/go/compute/metadata \
github.com/google/go-github/github \
github.com/google/go-querystring/query \
github.com/gregjones/httpcache \
go4.org/strutil \
go4.org/types \
golang.org/x/net/context \
golang.org/x/net/context/ctxhttp \
Expand Down
2 changes: 1 addition & 1 deletion cmd/gopherbot/gopherbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (b *gopherbot) freezeOldIssues(ctx context.Context) error {
if *dryRun {
return nil
}
_, err := b.ghc.Issues.Lock(ctx, "golang", "go", int(gi.Number))
_, err := b.ghc.Issues.Lock(ctx, "golang", "go", int(gi.Number), nil)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gopherstats/gopherstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (sc *statsClient) githubGroups() {

ps := new(personSet)
teams[teamName] = ps
users, _, err := sc.ghc.Organizations.ListTeamMembers(ctx, t.GetID(), &github.OrganizationListTeamMembersOptions{
users, _, err := sc.ghc.Teams.ListTeamMembers(ctx, t.GetID(), &github.TeamListTeamMembersOptions{
ListOptions: github.ListOptions{PerPage: 1000},
})
if err != nil {
Expand Down