The name of the repository.
Name of organisation.
async
(params, auths) => {
}
//See the API docs here: https://developer.github.com/v3/repos/#create
const data = {
auto_init: params.auto_init || false,
description: params.description,
gitignore_template: params.gitignore_template,
has_issues: params.has_issues || true,
has_wiki: params.has_wiki || true,
homepage: params.homepage,
name: params.name,
private: params.private,
team_id: params.team_id,
visibility: params.visibility,
has_projects: params.has_projects || true,
is_template: params.is_template || false,
license_template: params.license_template,
allow_squash_merge: params.allow_squash_merge || true,
allow_merge_commit: params.allow_merge_commit || true,
allow_rebase_merge: params.allow_rebase_merge || true
}
return await require("axios")({
method: "post",
url: `https://api.github.com/orgs/${params.org}/repos`,
headers: {
Authorization: `Bearer ${auths.github.oauth_access_token}`,
},
data,
});