Skip to content

Commit b318793

Browse files
committed
fix: add organization param to GetAllPullRequests
1 parent 4c4a021 commit b318793

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

provider/describer/pull_request.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ import (
1212
)
1313

1414
func GetAllPullRequests(ctx context.Context, githubClient GitHubClient, organizationName string, stream *models.StreamSender) ([]models.Resource, error) {
15+
org := ctx.Value("organization")
16+
if org != nil {
17+
orgName := org.(string)
18+
if orgName != "" {
19+
organizationName = orgName
20+
}
21+
}
22+
1523
repositories, err := getRepositories(ctx, githubClient.RestClient, organizationName)
1624
if err != nil {
1725
return nil, nil

0 commit comments

Comments
 (0)