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
path: root/app
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-07-22 09:31:48 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-07-22 09:31:48 +0300
commitc5fac1034f43d81a17242d8ade2d7eb8741a72e2 (patch)
treeac4711e1b6f563a7c9899b02c4fc8f15fe0a0056 /app
parentab5185e888fc02058a0d55ddf7fb5d1f6938c851 (diff)
parent589d1797d8dfdced2c6257597264bce0e2072c35 (diff)
Merge branch '63833-fix-jira-issues-url' into 'master'
Handle trailing slashes when generating issue URLs See merge request gitlab-org/gitlab-ce!30911
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/jira_service.rb8
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.