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:
authorRobert Speicher <robert@gitlab.com>2016-01-11 01:12:10 +0300
committerRobert Speicher <robert@gitlab.com>2016-01-11 01:12:10 +0300
commit4de89291a3c487f41ffe6ebd41877ba7a709d243 (patch)
tree8bae99022cce8dc58ec47611857786475ba357fb /app/models/project_services/jira_service.rb
parentefaa4e2386a201b889a099ae351d4eba8aa3c2f8 (diff)
parentf7fdcb95daf235455effa96d00eb082c147ac49e (diff)
Merge branch 'fix_jira_shortterm' into 'master'
Do not call API if there is no API URL Fixes #5878 CE users may not be interested in the new JIRA features. In this case, we should detect they haven't set an API URL and fallback to the behavior pre-8.3. This patch does that very easily. There are planned improvements to JIRA in future releases such as gitlab-org/gitlab-ce#5541 which will make this more configurable. See merge request !2341
Diffstat (limited to 'app/models/project_services/jira_service.rb')
-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 8a43a021819..f6571fc063e 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -116,6 +116,7 @@ class JiraService < IssueTrackerService
end
def test_settings
+ return unless api_url.present?
result = JiraService.get(
jira_api_test_url,
headers: {
@@ -213,6 +214,7 @@ class JiraService < IssueTrackerService
end
def send_message(url, message)
+ return unless api_url.present?
result = JiraService.post(
url,
body: message,
@@ -238,6 +240,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: {