MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / getRepoCollaborators

Function getRepoCollaborators

packages/backend/src/github.ts:221–236  ·  view source on GitHub ↗
(owner: string, repo: string, octokit: Octokit)

Source from the content-addressed store, hash-verified

219}
220
221export const getRepoCollaborators = async (owner: string, repo: string, octokit: Octokit) => {
222 try {
223 const fetchFn = () => octokit.paginate(octokit.repos.listCollaborators, {
224 owner,
225 repo,
226 per_page: 100,
227 });
228
229 const collaborators = await fetchWithRetry(fetchFn, `repo ${owner}/${repo}`, logger);
230 return collaborators;
231 } catch (error) {
232 Sentry.captureException(error);
233 logger.error(`Failed to fetch collaborators for repo ${owner}/${repo}.`, error);
234 throw error;
235 }
236}
237
238/**
239 * Lists repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access.

Callers 1

runJobMethod · 0.85

Calls 1

fetchWithRetryFunction · 0.70

Tested by

no test coverage detected