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>2022-08-09 18:11:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 18:11:31 +0300
commit283318c20561cc040b62397060771efa74db0d90 (patch)
tree31b724e53806352b1bff5e1e460e6f4445c4e0a0 /app/models/integrations
parent1f229cdc22b5b32989bcff2037d8925c75703671 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/integrations')
-rw-r--r--app/models/integrations/base_issue_tracker.rb4
-rw-r--r--app/models/integrations/discord.rb4
-rw-r--r--app/models/integrations/jenkins.rb4
-rw-r--r--app/models/integrations/jira.rb10
-rw-r--r--app/models/integrations/packagist.rb4
-rw-r--r--app/models/integrations/pipelines_email.rb4
-rw-r--r--app/models/integrations/prometheus.rb4
7 files changed, 17 insertions, 17 deletions
diff --git a/app/models/integrations/base_issue_tracker.rb b/app/models/integrations/base_issue_tracker.rb
index fe4a2f43b13..a4cec5f927b 100644
--- a/app/models/integrations/base_issue_tracker.rb
+++ b/app/models/integrations/base_issue_tracker.rb
@@ -100,8 +100,8 @@ module Integrations
message = "#{self.type} received response #{response.code} when attempting to connect to #{self.project_url}"
result = true
end
- rescue Gitlab::HTTP::Error, Timeout::Error, SocketError, Errno::ECONNRESET, Errno::ECONNREFUSED, OpenSSL::SSL::SSLError => error
- message = "#{self.type} had an error when trying to connect to #{self.project_url}: #{error.message}"
+ rescue Gitlab::HTTP::Error, Timeout::Error, SocketError, Errno::ECONNRESET, Errno::ECONNREFUSED, OpenSSL::SSL::SSLError => e
+ message = "#{self.type} had an error when trying to connect to #{self.project_url}: #{e.message}"
end
log_info(message)
result
diff --git a/app/models/integrations/discord.rb b/app/models/integrations/discord.rb
index d0067f42bdb..ec8a12e4760 100644
--- a/app/models/integrations/discord.rb
+++ b/app/models/integrations/discord.rb
@@ -88,8 +88,8 @@ module Integrations
embed.timestamp = Time.now.utc
end
end
- rescue RestClient::Exception => error
- log_error(error.message)
+ rescue RestClient::Exception => e
+ log_error(e.message)
false
end
diff --git a/app/models/integrations/jenkins.rb b/app/models/integrations/jenkins.rb
index ab39d1f7b77..c68b5fd2a96 100644
--- a/app/models/integrations/jenkins.rb
+++ b/app/models/integrations/jenkins.rb
@@ -53,8 +53,8 @@ module Integrations
begin
result = execute(data)
return { success: false, result: result[:message] } if result[:http_status] != 200
- rescue StandardError => error
- return { success: false, result: error }
+ rescue StandardError => e
+ return { success: false, result: e }
end
{ success: true, result: result[:message] }
diff --git a/app/models/integrations/jira.rb b/app/models/integrations/jira.rb
index d84029e53c2..3ca514ab1fd 100644
--- a/app/models/integrations/jira.rb
+++ b/app/models/integrations/jira.rb
@@ -364,8 +364,8 @@ module Integrations
)
true
- rescue StandardError => error
- log_exception(error, message: 'Issue transition failed', client_url: client_url)
+ rescue StandardError => e
+ log_exception(e, message: 'Issue transition failed', client_url: client_url)
false
end
@@ -560,9 +560,9 @@ module Integrations
# Handle errors when doing Jira API calls
def jira_request
yield
- rescue StandardError => error
- @error = error
- log_exception(error, message: 'Error sending message', client_url: client_url)
+ rescue StandardError => e
+ @error = e
+ log_exception(e, message: 'Error sending message', client_url: client_url)
nil
end
diff --git a/app/models/integrations/packagist.rb b/app/models/integrations/packagist.rb
index 502e509f7b9..f91404dab23 100644
--- a/app/models/integrations/packagist.rb
+++ b/app/models/integrations/packagist.rb
@@ -56,8 +56,8 @@ module Integrations
begin
result = execute(data)
return { success: false, result: result[:message] } if result[:http_status] != 202
- rescue StandardError => error
- return { success: false, result: error }
+ rescue StandardError => e
+ return { success: false, result: e }
end
{ success: true, result: result[:message] }
diff --git a/app/models/integrations/pipelines_email.rb b/app/models/integrations/pipelines_email.rb
index 77cbba25f2c..55a8ce0be11 100644
--- a/app/models/integrations/pipelines_email.rb
+++ b/app/models/integrations/pipelines_email.rb
@@ -84,8 +84,8 @@ module Integrations
result = execute(data, force: true)
{ success: true, result: result }
- rescue StandardError => error
- { success: false, result: error }
+ rescue StandardError => e
+ { success: false, result: e }
end
def should_pipeline_be_notified?(data)
diff --git a/app/models/integrations/prometheus.rb b/app/models/integrations/prometheus.rb
index e672a985810..142f466018b 100644
--- a/app/models/integrations/prometheus.rb
+++ b/app/models/integrations/prometheus.rb
@@ -70,8 +70,8 @@ module Integrations
prometheus_client.ping
{ success: true, result: 'Checked API endpoint' }
- rescue Gitlab::PrometheusClient::Error => err
- { success: false, result: err }
+ rescue Gitlab::PrometheusClient::Error => e
+ { success: false, result: e }
end
def prometheus_client