Skip to content

Commit

Permalink
Revert "Added service team review request support (#9681)"
Browse files Browse the repository at this point in the history
This reverts commit 89656df.
  • Loading branch information
melinath authored Dec 22, 2023
1 parent a7305c8 commit fc91a4a
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 347 deletions.
8 changes: 0 additions & 8 deletions .ci/gcb-generate-diffs-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,6 @@ steps:
- $PROJECT_ID
- "22" # Build step

- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["diff"]
args:
- 'request-service-reviewers'
- $_PR_NUMBER

# Long timeout to enable waiting on VCR test
timeout: 20000s
options:
Expand Down
1 change: 0 additions & 1 deletion .ci/magician/cmd/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type GithubClient interface {
GetPullRequestRequestedReviewers(prNumber string) ([]github.User, error)
GetPullRequestPreviousReviewers(prNumber string) ([]github.User, error)
GetUserType(user string) github.UserType
GetTeamMembers(organization, team string) ([]github.User, error)
PostBuildStatus(prNumber, title, state, targetURL, commitSha string) error
PostComment(prNumber, comment string) error
RequestPullRequestReviewer(prNumber, assignee string) error
Expand Down
6 changes: 0 additions & 6 deletions .ci/magician/cmd/mock_github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type mockGithub struct {
userType github.UserType
requestedReviewers []github.User
previousReviewers []github.User
teamMembers map[string][]github.User
calledMethods map[string][][]any
}

Expand All @@ -46,11 +45,6 @@ func (m *mockGithub) GetPullRequestPreviousReviewers(prNumber string) ([]github.
return m.previousReviewers, nil
}

func (m *mockGithub) GetTeamMembers(organization, team string) ([]github.User, error) {
m.calledMethods["GetTeamMembers"] = append(m.calledMethods["GetTeamMembers"], []any{organization, team})
return m.teamMembers[team], nil
}

func (m *mockGithub) RequestPullRequestReviewer(prNumber string, reviewer string) error {
m.calledMethods["RequestPullRequestReviewer"] = append(m.calledMethods["RequestPullRequestReviewer"], []any{prNumber, reviewer})
return nil
Expand Down
149 changes: 0 additions & 149 deletions .ci/magician/cmd/request_service_reviewers.go

This file was deleted.

147 changes: 0 additions & 147 deletions .ci/magician/cmd/request_service_reviewers_test.go

This file was deleted.

11 changes: 0 additions & 11 deletions .ci/magician/github/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,3 @@ func (gh *Client) GetPullRequestPreviousReviewers(prNumber string) ([]User, erro

return result, nil
}

func (gh *Client) GetTeamMembers(organization, team string) ([]User, error) {
url := fmt.Sprintf("https://api.github.com/orgs/%s/teams/%s/members", organization, team)

var members []User
_, err := utils.RequestCall(url, "GET", gh.token, &members, nil)
if err != nil {
return nil, err
}
return members, nil
}
11 changes: 1 addition & 10 deletions .ci/magician/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ module magician

go 1.20

replace github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler => ../../tools/issue-labeler

require (
github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler v0.0.0-00010101000000-000000000000
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad
golang.org/x/exp v0.0.0-20230314191032-db074128a8ec
google.golang.org/api v0.112.0
)

Expand All @@ -18,15 +15,11 @@ require github.com/otiai10/copy v1.12.0
require (
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/glog v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
Expand All @@ -36,6 +29,4 @@ require (
google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit fc91a4a

Please sign in to comment.