MCPcopy Create free account
hub / github.com/CodeFox-Repo/codefox / createUserRepo

Method createUserRepo

backend/src/github/github.service.ts:142–174  ·  view source on GitHub ↗

* Create a new repository under the *user's* account. * If you need an org-level repo, use POST /orgs/{org}/repos.

(
    repoName: string,
    isPublic: boolean,
    userOAuthToken: string,
  )

Source from the content-addressed store, hash-verified

140// * If you need an org-level repo, use POST /orgs/{org}/repos.
141// */
142// async createUserRepo(
143// repoName: string,
144// isPublic: boolean,
145// userOAuthToken: string,
146// ): Promise<{
147// owner: string;
148// repo: string;
149// htmlUrl: string;
150// }> {
151// const url = `https://api.github.com/user/repos`;
152
153// const response = await axios.post(
154// url,
155// {
156// name: repoName,
157// private: !isPublic, // false => public, true => private
158// },
159// {
160// headers: {
161// Authorization: `token ${userOAuthToken}`,
162// Accept: 'application/vnd.github.v3+json',
163// },
164// },
165// );
166
167// // The response will have data about the new repo
168// const data = response.data;
169// return {
170// owner: data.owner.login, // e.g. "octocat"
171// repo: data.name, // e.g. "my-new-repo"
172// htmlUrl: data.html_url, // e.g. "https://github.com/octocat/my-new-repo"
173// };
174// }
175
176// async pushMultipleFiles(
177// installationToken: string,

Callers 1

syncProjectToGitHubMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected