diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-15 17:26:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-15 17:26:39 +0300 |
commit | 915f1bcdaf56c5633bf3bbb8c8989298dd2685e9 (patch) | |
tree | 4e31e6020af0b082e61ffd0a06c2e69dd0f2b512 /lib | |
parent | db46475821c4546438797a5580a479ca73a862ba (diff) | |
parent | 851a8b1f739d045076767497db5f89d99034183e (diff) |
Merge branch 'fix-github-import' into 'master'
Fix token interpolation when setting the Github remote
See merge request !11311
Diffstat (limited to 'lib')
-rw-r--r-- | lib/github/import.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb index 06beb607a3e..9c7eb965f93 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -1,4 +1,5 @@ require_relative 'error' + module Github class Import include Gitlab::ShellAdapter @@ -6,6 +7,7 @@ module Github class MergeRequest < ::MergeRequest self.table_name = 'merge_requests' + self.reset_callbacks :create self.reset_callbacks :save self.reset_callbacks :commit self.reset_callbacks :update @@ -16,6 +18,7 @@ module Github self.table_name = 'issues' self.reset_callbacks :save + self.reset_callbacks :create self.reset_callbacks :commit self.reset_callbacks :update self.reset_callbacks :validate @@ -79,7 +82,7 @@ module Github def fetch_repository begin project.create_repository unless project.repository.exists? - project.repository.add_remote('github', "https://{options.fetch(:token)}@github.com/#{repo}.git") + project.repository.add_remote('github', "https://#{options.fetch(:token)}@github.com/#{repo}.git") project.repository.set_remote_as_mirror('github') project.repository.fetch_remote('github', forced: true) rescue Gitlab::Shell::Error => e |