Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
Update go-github dependency to HEAD master
Browse files Browse the repository at this point in the history
Fixes google/go-github#664
id type changed from int to int64
  • Loading branch information
mspiegel committed Mar 28, 2018
1 parent 594cb40 commit edd21da
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ install:
- go get -u github.com/golang/dep
- go install github.com/golang/dep/cmd/dep
- export PATH=$GOPATH/bin:$PATH
- dep ensure
- dep ensure -v -vendor-only

script: make test
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion model/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

type Review struct {
ID int
ID int64
Author lowercase.String
Body string
SubmittedAt time.Time
Expand Down
16 changes: 9 additions & 7 deletions remote/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func getTeamMembers(ctx context.Context, client *github.Client, org string, team
if err != nil {
return nil, err
}
var id *int
var id *int64
for _, t := range teams {
if strings.EqualFold(t.GetSlug(), team) {
id = t.ID
Expand Down Expand Up @@ -512,15 +512,17 @@ func createProtectionRequest(input *github.Protection) *github.ProtectionRequest
}
inDismissal := inReviews.DismissalRestrictions
if len(inDismissal.Users) > 0 || len(inDismissal.Teams) > 0 {
outDismissal := &github.DismissalRestrictionsRequest{
Users: []string{},
Teams: []string{},
}
users := []string{}
teams := []string{}
for _, user := range inDismissal.Users {
outDismissal.Users = append(outDismissal.Users, user.GetLogin())
users = append(users, user.GetLogin())
}
for _, team := range inDismissal.Teams {
outDismissal.Teams = append(outDismissal.Teams, team.GetSlug())
teams = append(teams, team.GetSlug())
}
outDismissal := &github.DismissalRestrictionsRequest{
Users: &users,
Teams: &teams,
}
outReviews.DismissalRestrictionsRequest = outDismissal
}
Expand Down

0 comments on commit edd21da

Please sign in to comment.