Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath committed Dec 20, 2023
1 parent ff4e138 commit a0f253a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .ci/magician/cmd/mock_github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type mockGithub struct {
userType github.UserType
requestedReviewers []github.User
previousReviewers []github.User
teamMembers []github.User
calledMethods map[string][][]any
}

Expand All @@ -45,6 +46,11 @@ 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, nil
}

func (m *mockGithub) RequestPullRequestReviewer(prNumber string, reviewer string) error {
m.calledMethods["RequestPullRequestReviewer"] = append(m.calledMethods["RequestPullRequestReviewer"], []any{prNumber, reviewer})
return nil
Expand Down
4 changes: 2 additions & 2 deletions .ci/magician/cmd/request_service_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ package cmd
import (
"fmt"
"magician/github"
"math/rand"
"math/rand"
"os"
"strings"

"github.com/spf13/cobra"
"github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler/labeler"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
)

Expand Down

0 comments on commit a0f253a

Please sign in to comment.