MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / listRepos

Function listRepos

packages/web/src/app/api/(client)/client.ts:71–86  ·  view source on GitHub ↗
(queryParams: ListReposQueryParams)

Source from the content-addressed store, hash-verified

69}
70
71export const listRepos = async (queryParams: ListReposQueryParams): Promise<ListReposResponse | ServiceError> => {
72 const url = new URL("/api/repos", window.location.origin);
73 for (const [key, value] of Object.entries(queryParams)) {
74 url.searchParams.set(key, value.toString());
75 }
76
77 const result = await fetch(url, {
78 method: "GET",
79 headers: {
80 "Content-Type": "application/json",
81 "X-Sourcebot-Client-Source": "sourcebot-web-client",
82 },
83 }).then(response => response.json());
84
85 return result as ListReposResponse | ServiceError;
86}
87
88export const getVersion = async (): Promise<GetVersionResponse> => {
89 const result = await fetch("/api/version", {

Callers 1

useSuggestionsDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected