Commit 4de89291 authored by Robert Speicher's avatar Robert Speicher

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
parents efaa4e23 f7fdcb95
...@@ -33,6 +33,7 @@ v 8.4.0 (unreleased) ...@@ -33,6 +33,7 @@ v 8.4.0 (unreleased)
- API: Add support for deleting a tag via the API (Robert Schilling) - API: Add support for deleting a tag via the API (Robert Schilling)
v 8.3.3 (unreleased) v 8.3.3 (unreleased)
- Preserve CE behavior with JIRA integration by only calling API if URL is set
- Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running - Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running
- Suppress e-mails on failed builds if allow_failure is set (Stan Hu) - Suppress e-mails on failed builds if allow_failure is set (Stan Hu)
- Fix project transfer e-mail sending incorrect paths in e-mail notification (Stan Hu) - Fix project transfer e-mail sending incorrect paths in e-mail notification (Stan Hu)
......
...@@ -116,6 +116,7 @@ class JiraService < IssueTrackerService ...@@ -116,6 +116,7 @@ class JiraService < IssueTrackerService
end end
def test_settings def test_settings
return unless api_url.present?
result = JiraService.get( result = JiraService.get(
jira_api_test_url, jira_api_test_url,
headers: { headers: {
...@@ -213,6 +214,7 @@ class JiraService < IssueTrackerService ...@@ -213,6 +214,7 @@ class JiraService < IssueTrackerService
end end
def send_message(url, message) def send_message(url, message)
return unless api_url.present?
result = JiraService.post( result = JiraService.post(
url, url,
body: message, body: message,
...@@ -238,6 +240,7 @@ class JiraService < IssueTrackerService ...@@ -238,6 +240,7 @@ class JiraService < IssueTrackerService
end end
def existing_comment?(issue_name, new_comment) def existing_comment?(issue_name, new_comment)
return unless api_url.present?
result = JiraService.get( result = JiraService.get(
comment_url(issue_name), comment_url(issue_name),
headers: { headers: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment