Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-01 21:12:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-01 21:12:39 +0300
commit68ce709bef9bc89bbb9869e24508777bbe0a1a1d (patch)
tree65dc0fd3693312debb7f40586c5682162081dc6c /lib/gitlab
parentb21334799a5226cdef52d4fb3b148f08af209f1a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/bitbucket_import/importers/repository_importer.rb11
-rw-r--r--lib/gitlab/ci/config/header/input.rb1
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/bitbucket_import/importers/repository_importer.rb b/lib/gitlab/bitbucket_import/importers/repository_importer.rb
index b8c0ba69d37..9be7ed99436 100644
--- a/lib/gitlab/bitbucket_import/importers/repository_importer.rb
+++ b/lib/gitlab/bitbucket_import/importers/repository_importer.rb
@@ -19,6 +19,7 @@ module Gitlab
validate_repository_size!
+ set_default_branch
update_clone_time
end
@@ -76,6 +77,16 @@ module Gitlab
def validate_repository_size!
# Defined in EE
end
+
+ def set_default_branch
+ default_branch = client.repo(project.import_source).default_branch
+
+ project.change_head(default_branch) if default_branch
+ end
+
+ def client
+ Bitbucket::Client.new(project.import_data.credentials)
+ end
end
end
end
diff --git a/lib/gitlab/ci/config/header/input.rb b/lib/gitlab/ci/config/header/input.rb
index 2d124f24c87..08ee70b6290 100644
--- a/lib/gitlab/ci/config/header/input.rb
+++ b/lib/gitlab/ci/config/header/input.rb
@@ -19,7 +19,6 @@ module Gitlab
validations do
validates :config, type: Hash, allowed_keys: ALLOWED_KEYS
validates :key, alphanumeric: true
- validates :input_default, alphanumeric: true, allow_nil: true
validates :input_description, alphanumeric: true, allow_nil: true
validates :input_regex, type: String, allow_nil: true
validates :input_type, allow_nil: true, allowed_values: Interpolation::Inputs.input_types