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-10-16 21:10:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-16 21:10:30 +0300
commit5fcd4e5fbcad7d74d1c5efa09c6785303af2ebd7 (patch)
tree4a7245bc4c4f6fcc7be3c3c4965a60bed541e533 /app/controllers
parent533ad4ac834baef990e3ebf613c2b1fe54f13127 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/import/github_oauth.rb20
-rw-r--r--app/controllers/import/gitea_controller.rb1
-rw-r--r--app/controllers/import/github_controller.rb6
-rw-r--r--app/controllers/projects/mattermosts_controller.rb6
4 files changed, 10 insertions, 23 deletions
diff --git a/app/controllers/concerns/import/github_oauth.rb b/app/controllers/concerns/import/github_oauth.rb
index dc03a132768..ae5a0401155 100644
--- a/app/controllers/concerns/import/github_oauth.rb
+++ b/app/controllers/concerns/import/github_oauth.rb
@@ -54,23 +54,15 @@ module Import
state = SecureRandom.base64(64)
session[auth_state_key] = state
session[:auth_on_failure_path] = "#{new_project_path}#import_project"
- if Feature.enabled?(:remove_legacy_github_client)
- oauth_client.auth_code.authorize_url(
- redirect_uri: callback_import_url,
- scope: 'repo, user, user:email',
- state: state
- )
- else
- client.authorize_url(callback_import_url, state)
- end
+ oauth_client.auth_code.authorize_url(
+ redirect_uri: callback_import_url,
+ scope: 'repo, user, user:email',
+ state: state
+ )
end
def get_token(code)
- if Feature.enabled?(:remove_legacy_github_client)
- oauth_client.auth_code.get_token(code).token
- else
- client.get_token(code)
- end
+ oauth_client.auth_code.get_token(code).token
end
def missing_oauth_config
diff --git a/app/controllers/import/gitea_controller.rb b/app/controllers/import/gitea_controller.rb
index a7497710dc0..4e95c6527c3 100644
--- a/app/controllers/import/gitea_controller.rb
+++ b/app/controllers/import/gitea_controller.rb
@@ -85,7 +85,6 @@ class Import::GiteaController < Import::GithubController
@client ||= Gitlab::LegacyGithubImport::Client.new(session[access_token_key], **client_options)
end
- override :client_options
def client_options
verified_url, provider_hostname = verify_blocked_uri
diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb
index 28732d58484..2b72ceceb5a 100644
--- a/app/controllers/import/github_controller.rb
+++ b/app/controllers/import/github_controller.rb
@@ -192,7 +192,7 @@ class Import::GithubController < Import::BaseController
def client_proxy
@client_proxy ||= Gitlab::GithubImport::Clients::Proxy.new(
- session[access_token_key], client_options
+ session[access_token_key]
)
end
@@ -265,10 +265,6 @@ class Import::GithubController < Import::BaseController
end
# rubocop: enable CodeReuse/ActiveRecord
- def client_options
- { wait_for_rate_limit_reset: false }
- end
-
def rate_limit_threshold_exceeded
head :too_many_requests
end
diff --git a/app/controllers/projects/mattermosts_controller.rb b/app/controllers/projects/mattermosts_controller.rb
index a4091ebdf4b..9a3e7e31d68 100644
--- a/app/controllers/projects/mattermosts_controller.rb
+++ b/app/controllers/projects/mattermosts_controller.rb
@@ -19,10 +19,10 @@ class Projects::MattermostsController < Projects::ApplicationController
result, message = integration.configure(current_user, configure_params)
if result
- flash[:notice] = 'This service is now configured'
+ flash[:notice] = 'This integration is now configured'
redirect_to edit_project_settings_integration_path(@project, integration)
else
- flash[:alert] = message || 'Failed to configure service'
+ flash[:alert] = message || 'Failed to configure integration'
redirect_to new_project_mattermost_path(@project)
end
end
@@ -31,7 +31,7 @@ class Projects::MattermostsController < Projects::ApplicationController
def configure_params
params.require(:mattermost).permit(:trigger, :team_id).merge(
- url: service_trigger_url(integration),
+ url: integration_trigger_url(integration),
icon_url: asset_url('slash-command-logo.png', skip_pipeline: true))
end