diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 00:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 00:08:59 +0300 |
commit | d466ee5042520ad078fe050cb078d81dc2ebe196 (patch) | |
tree | 5648eb1aee8aeff5b5c5ff4669a184fd7676f778 /app/models | |
parent | 6a9d7c009e4e5975a89bcc3e458da4b3ec484bd1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 4 | ||||
-rw-r--r-- | app/models/repository.rb | 12 |
2 files changed, 5 insertions, 11 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index bc652a19986..a215b6c881c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -901,7 +901,9 @@ class Project < ApplicationRecord if Gitlab::UrlSanitizer.valid?(value) import_url = Gitlab::UrlSanitizer.new(value) super(import_url.sanitized_url) - create_or_update_import_data(credentials: import_url.credentials) + + credentials = import_url.credentials.to_h.transform_values { |value| CGI.unescape(value.to_s) } + create_or_update_import_data(credentials: credentials) else super(value) end diff --git a/app/models/repository.rb b/app/models/repository.rb index c439d0700f1..37aceeae5f8 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -134,15 +134,6 @@ class Repository end end - # the opts are: - # - :path - # - :limit - # - :offset - # - :skip_merges - # - :after - # - :before - # - :all - # - :first_parent def commits(ref = nil, opts = {}) options = { repo: raw_repository, @@ -155,7 +146,8 @@ class Repository after: opts[:after], before: opts[:before], all: !!opts[:all], - first_parent: !!opts[:first_parent] + first_parent: !!opts[:first_parent], + order: opts[:order] } commits = Gitlab::Git::Commit.where(options) |