build/api/repos/create.js
async function create(options) {
  const {
    org,
    name,
    description,
    homepage,
    license_template,
    gitignore_template,
    auto_init = false,
  } = options
  const p = org ? `orgs/${org}` : 'user'
  const endpoint = `/${p}/repos`
  const { body } = await this._request({
    data: {
      name,
      description,
      homepage,
      gitignore_template,
      license_template,
      auto_init,
    },
    endpoint,
  })
  /** @type {Repository} */
  const r = body
  return r
}
async function create(options) {
  const {
    org,
    name,
    description,
    homepage,
    license_template,
    gitignore_template,
    auto_init = false,
  } = options
  const p = org ? `orgs/${org}` : 'user'
  const endpoint = `/${p}/repos`
  const { body } = await this._request({
    data: {
      name,
      description,
      homepage,
      gitignore_template,
      license_template,
      auto_init,
    },
    endpoint,
  })
  /** @type {Repository} */
  const r = body
  return r
}
async function create ( options ) { const { org , name , description , homepage , license_template , gitignore_template , auto_init = false , } = options const p = org ? ` ${ org } ` : 'user' const endpoint = ` ${ p } ` const { body } = await this . _request ( { data : { name , description , homepage , gitignore_template , license_template , auto_init , } , endpoint , } ) /** @type {Repository} */ const r = body return r }
Create a new repository for the authenticated user.
@param {CreateRepository} options Options to create a repository.
@param {string} [options.org] The organisation on which to create the repository (if not adding to the user account).
@param {string} options.name The name of the repository.
@param {string} [options.description] A short description of the repository.
@param {string} [options.homepage] A URL with more information about the repository.
@param {string} [options.license_template] Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the license_template string. For example, "mit" or "mpl-2.0".
@param {string} [options.gitignore_template] Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, "Haskell".
@param {boolean} [options.auto_init=false] Pass `true` to create an initial commit with empty README. Default `false`.
Create a new repository for the authenticated user .