diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-18 19:44:24 +0300 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-22 08:35:52 +0300 |
commit | 589d1797d8dfdced2c6257597264bce0e2072c35 (patch) | |
tree | dd48ebd58932f2d2fab0725556db50298eea7aac /app/models/project_services | |
parent | 695f4bb17d157ba2c7653a6aefa9bf09ecc2c583 (diff) |
Handle trailing slashes when generating Jira URLs
Applies to issues_url and new_issue_url
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/jira_service.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index e571700fd02..7ab79242cc3 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -54,7 +54,7 @@ class JiraService < IssueTrackerService username: self.username, password: self.password, site: URI.join(url, '/').to_s, # Intended to find the root - context_path: url.path.chomp('/'), + context_path: url.path, auth_type: :basic, read_timeout: 120, use_cookies: true, @@ -103,6 +103,12 @@ class JiraService < IssueTrackerService "#{url}/secure/CreateIssue.jspa" end + alias_method :original_url, :url + + def url + original_url&.chomp('/') + end + def execute(push) # This method is a no-op, because currently JiraService does not # support any events. |