Module: Octokit::Client::SourceImport
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/source_import.rb |
Overview
Methods for the Source Import API
Instance Method Summary
-
#cancel_source_import(repo, options = {}) ⇒ Boolean
Stop an import for a repository.
-
#map_source_import_commit_author(author_url, values, options = {}) ⇒ Sawyer::Resource
Update an author's identity for the import.
-
#set_source_import_lfs_preference(repo, use_lfs, options = {}) ⇒ Sawyer::Resource
Set preference for using Git LFS to import files over 100MB.
-
#source_import_commit_authors(repo, options = {}) ⇒ Array<Sawyer::Resource>
List source import commit authors.
-
#source_import_large_files(repo, options = {}) ⇒ Array<Sawyer::Resource>
List source import large files.
-
#source_import_progress(repo, options = {}) ⇒ Sawyer::Resource
View the progress of an import.
-
#start_source_import(repo, vcs, vcs_url, options = {}) ⇒ Sawyer::Resource
Start a source import to a GitHub repository using GitHub Importer.
-
#update_source_import(repo, options = {}) ⇒ Sawyer::Resource
Update source import with authentication or project choice Restart source import if no options are passed.
Instance Method Details
#cancel_source_import(repo, options = {}) ⇒ Boolean
Stop an import for a repository.
# File 'lib/octokit/client/source_import.rb', line 126
def cancel_source_import(repo, = {}) = ensure_api_media_type(:source_imports, ) boolean_from_response :delete, "#{Repository.path repo}/import", end
#map_source_import_commit_author(author_url, values, options = {}) ⇒ Sawyer::Resource
Update an author's identity for the import.
# File 'lib/octokit/client/source_import.rb', line 113
def (, values, = {}) = ensure_api_media_type(:source_imports, .merge(values)) patch , end
#set_source_import_lfs_preference(repo, use_lfs, options = {}) ⇒ Sawyer::Resource
Set preference for using Git LFS to import files over 100MB
# File 'lib/octokit/client/source_import.rb', line 155
def set_source_import_lfs_preference(repo, use_lfs, = {}) = ensure_api_media_type(:source_imports, .merge(use_lfs: use_lfs)) patch "#{Repository.path repo}/import/lfs", end
#source_import_commit_authors(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
List source import commit authors
# File 'lib/octokit/client/source_import.rb', line 93
def (repo, = {}) = ensure_api_media_type(:source_imports, ) get "#{Repository.path repo}/import/authors", end
#source_import_large_files(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
List source import large files
# File 'lib/octokit/client/source_import.rb', line 141
def source_import_large_files(repo, = {}) = ensure_api_media_type(:source_imports, ) get "#{Repository.path repo}/import/large_files", end
#source_import_progress(repo, options = {}) ⇒ Sawyer::Resource
View the progress of an import.
# File 'lib/octokit/client/source_import.rb', line 57
def source_import_progress(repo, = {}) = ensure_api_media_type(:source_imports, ) get "#{Repository.path repo}/import", end
#start_source_import(repo, vcs, vcs_url, options = {}) ⇒ Sawyer::Resource
#start_source_import(repo, vcs_url, options = {}) ⇒ Sawyer::Resource
Sawyer::Resource
#start_source_import(repo, vcs_url, options = {}) ⇒ Sawyer::Resource
Start a source import to a GitHub repository using GitHub Importer.
# File 'lib/octokit/client/source_import.rb', line 37
def start_source_import(*args) arguments = Octokit::RepoArguments.new(args) vcs_url = arguments.pop vcs = arguments.pop if vcs octokit_warn 'Octokit#start_source_import vcs parameter is now an option, please update your call before the next major Octokit version update.' arguments. .merge!(vcs: vcs) end = ensure_api_media_type(:source_imports, arguments. .merge(vcs_url: vcs_url)) put "#{Repository.path arguments.repo}/import", end
#update_source_import(repo, options = {}) ⇒ Sawyer::Resource
Update source import with authentication or project choice Restart source import if no options are passed
https://developer.github.com/v3/migration/source_imports/#update-existing-import
# File 'lib/octokit/client/source_import.rb', line 78
def update_source_import(repo, = {}) = ensure_api_media_type(:source_imports, ) patch "#{Repository.path repo}/import", end