Start a source import to a GitHub repository using GitHub Importer.
PUT /repos/:owner/:repo/import
| Name | Type | Description |
|---|---|---|
vcs_url |
url |
Required. The URL of the originating repository. |
vcs |
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. |
vcs_username |
string |
If authentication is required, the username to provide to vcs_url. |
vcs_password |
string |
If authentication is required, the password to provide to vcs_url. |
tfvc_project |
string |
For a tfvc import, the name of the project that is being imported. |
{
"vcs": "subversion",
"vcs_url": "http://svn.mycompany.com/svn/myproject",
"vcs_username": "octocat",
"vcs_password": "secret"
}
Status: 201 Created
Location: https://api.github.com/repos/spraints/socm/import
{
"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,
"percent": 42,
"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"
}