Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
36a0f6aa
Commit
36a0f6aa
authored
Mar 05, 2018
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use host URL to build JIRA remote link icon
parent
5656a1d6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+5
-1
changelogs/unreleased/issue_31081.yml
changelogs/unreleased/issue_31081.yml
+5
-0
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+1
-2
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+3
-3
No files found.
app/models/project_services/jira_service.rb
View file @
36a0f6aa
class
JiraService
<
IssueTrackerService
include
Gitlab
::
Routing
include
ApplicationHelper
include
ActionView
::
Helpers
::
AssetUrlHelper
validates
:url
,
url:
true
,
presence:
true
,
if: :activated?
validates
:api_url
,
url:
true
,
allow_blank:
true
...
...
@@ -268,7 +270,9 @@ class JiraService < IssueTrackerService
url:
url
,
title:
title
,
status:
status
,
icon:
{
title:
'GitLab'
,
url16x16:
'https://gitlab.com/favicon.ico'
}
icon:
{
title:
'GitLab'
,
url16x16:
asset_url
(
'favicon.ico'
,
host:
gitlab_config
.
url
)
}
}
}
end
...
...
changelogs/unreleased/issue_31081.yml
0 → 100644
View file @
36a0f6aa
---
title
:
Use host URL to build JIRA remote link icon
merge_request
:
author
:
type
:
other
spec/models/project_services/jira_service_spec.rb
View file @
36a0f6aa
...
...
@@ -166,7 +166,6 @@ describe JiraService do
# Creates comment
expect
(
WebMock
).
to
have_requested
(
:post
,
@comment_url
)
# Creates Remote Link in JIRA issue fields
expect
(
WebMock
).
to
have_requested
(
:post
,
@remote_link_url
).
with
(
body:
hash_including
(
...
...
@@ -174,7 +173,7 @@ describe JiraService do
object:
{
url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
full_path
}
/commit/
#{
merge_request
.
diff_head_sha
}
"
,
title:
"GitLab: Solved by commit
#{
merge_request
.
diff_head_sha
}
."
,
icon:
{
title:
"GitLab"
,
url16x16:
"http
s://gitlab.com
/favicon.ico"
},
icon:
{
title:
"GitLab"
,
url16x16:
"http
://localhost
/favicon.ico"
},
status:
{
resolved:
true
}
}
)
...
...
spec/services/system_note_service_spec.rb
View file @
36a0f6aa
...
...
@@ -789,7 +789,7 @@ describe SystemNoteService do
object:
{
url:
project_commit_url
(
project
,
commit
),
title:
"GitLab: Mentioned on commit -
#{
commit
.
title
}
"
,
icon:
{
title:
"GitLab"
,
url16x16:
"http
s://gitlab.com
/favicon.ico"
},
icon:
{
title:
"GitLab"
,
url16x16:
"http
://localhost
/favicon.ico"
},
status:
{
resolved:
false
}
}
)
...
...
@@ -815,7 +815,7 @@ describe SystemNoteService do
object:
{
url:
project_issue_url
(
project
,
issue
),
title:
"GitLab: Mentioned on issue -
#{
issue
.
title
}
"
,
icon:
{
title:
"GitLab"
,
url16x16:
"http
s://gitlab.com
/favicon.ico"
},
icon:
{
title:
"GitLab"
,
url16x16:
"http
://localhost
/favicon.ico"
},
status:
{
resolved:
false
}
}
)
...
...
@@ -841,7 +841,7 @@ describe SystemNoteService do
object:
{
url:
project_snippet_url
(
project
,
snippet
),
title:
"GitLab: Mentioned on snippet -
#{
snippet
.
title
}
"
,
icon:
{
title:
"GitLab"
,
url16x16:
"http
s://gitlab.com
/favicon.ico"
},
icon:
{
title:
"GitLab"
,
url16x16:
"http
://localhost
/favicon.ico"
},
status:
{
resolved:
false
}
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment