Skip to content

Commit 2f4a953

Browse files
authored
add nil check (#12)
1 parent a741b44 commit 2f4a953

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

github_client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ func (c *GithubClient) FetchPullRequests(ctx context.Context, prNumbers []int) (
7575
return nil, err
7676
}
7777

78-
pullRequests = append(pullRequests, *pr)
78+
if pr.MergedAt != nil {
79+
pullRequests = append(pullRequests, *pr)
80+
}
7981
}
8082

8183
slices.SortFunc(pullRequests, func(a, b github.PullRequest) int {

0 commit comments

Comments
 (0)