Module: Octokit::Client::SourceImport
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/source_import.rb
Overview
Methods for the Source Import API
Instance Method Summary collapse
-
#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(*args) ⇒ 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.
126 127 128 129 |
# 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.
113 114 115 116 |
# 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
155 156 157 158 |
# 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
93 94 95 96 |
# 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
141 142 143 144 |
# 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.
57 58 59 60 |
# 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
Start a source import to a GitHub repository using GitHub Importer.
37 38 39 40 41 42 43 44 45 46 47 |
# 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
developer.github.com/v3/migration/source_imports/#update-existing-import
78 79 80 81 |
# 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 |