summaryrefslogtreecommitdiff
path: root/app/models/project_services
diff options
context:
space:
mode:
authorDrew Blessing <drew@gitlab.com>2016-01-07 15:07:13 -0600
committerDrew Blessing <drew@gitlab.com>2016-01-07 16:23:42 -0600
commitf7fdcb95daf235455effa96d00eb082c147ac49e (patch)
tree774f4f706fa1e1a45c6c6adca2b9c5e130731385 /app/models/project_services
parentb1539116f65c302729ca4130a30169295dcfc07e (diff)
downloadgitlab-ce-f7fdcb95daf235455effa96d00eb082c147ac49e.tar.gz
Do not call API if there is no API URL
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/jira_service.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index a1b77c61576..b6c01c32d9a 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -121,6 +121,7 @@ class JiraService < IssueTrackerService
end
def test_settings
+ return unless api_url.present?
result = JiraService.get(
jira_api_test_url,
headers: {
@@ -218,6 +219,7 @@ class JiraService < IssueTrackerService
end
def send_message(url, message)
+ return unless api_url.present?
result = JiraService.post(
url,
body: message,
@@ -243,6 +245,7 @@ class JiraService < IssueTrackerService
end
def existing_comment?(issue_name, new_comment)
+ return unless api_url.present?
result = JiraService.get(
comment_url(issue_name),
headers: {