Commit f7fdcb95 authored by Drew Blessing's avatar Drew Blessing

Do not call API if there is no API URL

parent b1539116
...@@ -28,6 +28,7 @@ v 8.4.0 (unreleased) ...@@ -28,6 +28,7 @@ v 8.4.0 (unreleased)
- Ajax filter by message for commits page - Ajax filter by message for commits page
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
- 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)
- Enable "Add key" button when user fills in a proper key (Stan Hu) - Enable "Add key" button when user fills in a proper key (Stan Hu)
......
...@@ -121,6 +121,7 @@ class JiraService < IssueTrackerService ...@@ -121,6 +121,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: {
...@@ -218,6 +219,7 @@ class JiraService < IssueTrackerService ...@@ -218,6 +219,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,
...@@ -243,6 +245,7 @@ class JiraService < IssueTrackerService ...@@ -243,6 +245,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