Skip to content
Merged
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
6 changes: 6 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type GithubridgeClient interface {
AddLabel(ctx context.Context, req *pb.AddLabelRequest) (*pb.AddLabelResponse, error)
DeleteLabel(ctx context.Context, req *pb.DeleteLabelRequest) (*pb.DeleteLabelResponse, error)
GetComments(ctx context.Context, req *pb.GetCommentsRequest) (*pb.GetCommentsResponse, error)
GetRepos(ctx context.Context, req *pb.GetReposRequest) (*pb.GetReposResponse, error)
}

type rClient struct {
Expand Down Expand Up @@ -81,3 +82,8 @@ func (c *rClient) DeleteLabel(ctx context.Context, req *pb.DeleteLabelRequest) (
nctx := metadata.AppendToOutgoingContext(context.Background(), "auth-token", string(c.passkey))
return c.gClient.DeleteLabel(nctx, req)
}

func (c *rClient) GetRepos(ctx context.Context, req *pb.GetReposRequest) (*pb.GetReposResponse, error) {
nctx := metadata.AppendToOutgoingContext(context.Background(), "auth-token", string(c.passkey))
return c.gClient.GetRepos(nctx, req)
}
4 changes: 4 additions & 0 deletions client/testclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func (c *TestClient) GetIssue(ctx context.Context, req *pb.GetIssueRequest) (*pb
return &pb.GetIssueResponse{}, nil
}

func (c *TestClient) GetRepos(ctx context.Context, req *pb.GetReposRequest) (*pb.GetReposResponse, error) {
return &pb.GetReposResponse{}, nil
}

func (c *TestClient) GetLabels(ctx context.Context, req *pb.GetLabelsRequest) (*pb.GetLabelsResponse, error) {
return &pb.GetLabelsResponse{Labels: c.labels[fmt.Sprintf("%v-%v-%v", req.GetUser(), req.GetRepo(), req.GetId())]}, nil
}
Expand Down
Loading