Skip to content

Commit 8f41505

Browse files
authored
Fix collaborators function by using gh_get_paged_json instead of (#181)
gh_get_json
1 parent 5ee0882 commit 8f41505

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/repositories/repositories.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ end
8888
end
8989

9090
@api_default function collaborators(api::GitHubAPI, repo; options...)
91-
results, page_data = gh_get_json(api, "/repos/$(name(repo))/collaborators"; options...)
91+
results, page_data = gh_get_paged_json(api, "/repos/$(name(repo))/collaborators"; options...)
9292
return map(Owner, results), page_data
9393
end
9494

@@ -112,8 +112,8 @@ end
112112
end
113113

114114
@api_default function collaborator_permission(api::GitHubAPI, repo, user; options...)
115-
results, page_data = gh_get_json(api, "/repos/$(name(repo))/collaborators/$(name(user))/permission"; options...)
116-
return results[2]
115+
results, page_data = gh_get_paged_json(api, "/repos/$(name(repo))/collaborators/$(name(user))/permission"; options...)
116+
return results["permission"]
117117
end
118118

119119
# stats #

0 commit comments

Comments
 (0)