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.
123 124 125 |
# File 'lib/octokit/client/source_import.rb', line 123 def cancel_source_import(repo, = {}) 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.
110 111 112 113 |
# File 'lib/octokit/client/source_import.rb', line 110 def (, values, = {}) = .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
150 151 152 153 |
# File 'lib/octokit/client/source_import.rb', line 150 def set_source_import_lfs_preference(repo, use_lfs, = {}) = .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
91 92 93 |
# File 'lib/octokit/client/source_import.rb', line 91 def (repo, = {}) get "#{Repository.path repo}/import/authors", end |
#source_import_large_files(repo, options = {}) ⇒ Array<Sawyer::Resource>
List source import large files
137 138 139 |
# File 'lib/octokit/client/source_import.rb', line 137 def source_import_large_files(repo, = {}) get "#{Repository.path repo}/import/large_files", end |
#source_import_progress(repo, options = {}) ⇒ Sawyer::Resource
View the progress of an import.
57 58 59 |
# File 'lib/octokit/client/source_import.rb', line 57 def source_import_progress(repo, = {}) 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 = 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
77 78 79 |
# File 'lib/octokit/client/source_import.rb', line 77 def update_source_import(repo, = {}) patch "#{Repository.path repo}/import", end |