@@ -48,16 +48,16 @@ func (s service) List(ctx context.Context, rs string, opt change.ListOptions) ([ repo, err := ghRepoSpec(rs) if err != nil { // TODO: Map to 400 Bad Request HTTP error. return nil, err } var states []githubv4.PullRequestState var states *[]githubv4.PullRequestState switch opt.Filter { case change.FilterOpen: states = []githubv4.PullRequestState{githubv4.PullRequestStateOpen} states = &[]githubv4.PullRequestState{githubv4.PullRequestStateOpen} case change.FilterClosedMerged: states = []githubv4.PullRequestState{githubv4.PullRequestStateClosed, githubv4.PullRequestStateMerged} states = &[]githubv4.PullRequestState{githubv4.PullRequestStateClosed, githubv4.PullRequestStateMerged} case change.FilterAll: states = nil // No states to filter the PRs by. default: // TODO: Map to 400 Bad Request HTTP error. return nil, fmt.Errorf("invalid change.ListOptions.Filter value: %q", opt.Filter) @@ -119,16 +119,16 @@ func (s service) Count(ctx context.Context, rs string, opt change.ListOptions) ( repo, err := ghRepoSpec(rs) if err != nil { // TODO: Map to 400 Bad Request HTTP error. return 0, err } var states []githubv4.PullRequestState var states *[]githubv4.PullRequestState switch opt.Filter { case change.FilterOpen: states = []githubv4.PullRequestState{githubv4.PullRequestStateOpen} states = &[]githubv4.PullRequestState{githubv4.PullRequestStateOpen} case change.FilterClosedMerged: states = []githubv4.PullRequestState{githubv4.PullRequestStateClosed, githubv4.PullRequestStateMerged} states = &[]githubv4.PullRequestState{githubv4.PullRequestStateClosed, githubv4.PullRequestStateMerged} case change.FilterAll: states = nil // No states to filter the PRs by. default: // TODO: Map to 400 Bad Request HTTP error. return 0, fmt.Errorf("invalid change.ListOptions.Filter value: %q", opt.Filter)