octokit.rest

Start an import

Start a source import to a GitHub repository using GitHub Importer.

Parameters

string The token will be passed in the authorization header.

string

string

string The URL of the originating repository.

string The originating VCS type. Can be one of subversion, git, mercurial, or tfvc. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.

string If authentication is required, the username to provide to vcs_url.

string If authentication is required, the password to provide to vcs_url.

string For a tfvc import, the name of the project that is being imported.

Request

PUT https://api.github.com/repos///import
authorization: bearer undefined
accept: application/vnd.github.v3+json
user-agent: octokit.rest
content-length: 0


Example Response

Status: 201
{
  "vcs": "subversion",
  "use_lfs": "undecided",
  "vcs_url": "http://svn.mycompany.com/svn/myproject",
  "status": "importing",
  "status_text": "Importing...",
  "has_large_files": false,
  "large_files_size": 0,
  "large_files_count": 0,
  "authors_count": 0,
  "commit_count": 1042,
  "url": "https://api.github.com/repos/octocat/socm/import",
  "html_url": "https://import.github.com/octocat/socm/import",
  "authors_url": "https://api.github.com/repos/octocat/socm/import/authors",
  "repository_url": "https://api.github.com/repos/octocat/socm"
}

See documentation on GitHub developer guides