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
ac1badb4
Commit
ac1badb4
authored
Nov 27, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display commit ID for commit diff discussion on merge request
parent
33b6ef7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
19 deletions
+51
-19
app/assets/javascripts/notes/components/noteable_discussion.vue
...sets/javascripts/notes/components/noteable_discussion.vue
+34
-19
changelogs/unreleased/winh-merge-request-commit-discussion.yml
...elogs/unreleased/winh-merge-request-commit-discussion.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+12
-0
No files found.
app/assets/javascripts/notes/components/noteable_discussion.vue
View file @
ac1badb4
<
script
>
import
_
from
'
underscore
'
;
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
systemNote
from
'
~/vue_shared/components/notes/system_note.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Flash
from
'
../../flash
'
;
...
...
@@ -156,6 +157,37 @@ export default {
(
!
discussion
.
diff_discussion
&&
resolved
&&
hasReplies
&&
!
isRepliesToggledByUser
)
||
false
);
},
actionText
()
{
const
commitId
=
this
.
discussion
.
commit_id
?
truncateSha
(
this
.
discussion
.
commit_id
)
:
''
;
const
linkStart
=
`<a href="
${
_
.
escape
(
this
.
discussion
.
discussion_path
)}
">`
;
const
linkEnd
=
'
</a>
'
;
let
text
=
s__
(
'
MergeRequests|started a discussion
'
);
if
(
this
.
discussion
.
for_commit
)
{
text
=
s__
(
'
MergeRequests|started a discussion on commit %{linkStart}%{commitId}%{linkEnd}
'
,
);
}
else
if
(
this
.
discussion
.
diff_discussion
)
{
if
(
this
.
discussion
.
active
)
{
text
=
s__
(
'
MergeRequests|started a discussion on %{linkStart}the diff%{linkEnd}
'
);
}
else
{
text
=
s__
(
'
MergeRequests|started a discussion on %{linkStart}an old version of the diff%{linkEnd}
'
,
);
}
}
return
sprintf
(
text
,
{
commitId
,
linkStart
,
linkEnd
,
},
false
,
);
},
},
watch
:
{
isReplying
()
{
...
...
@@ -291,24 +323,7 @@ Please check your network connection and try again.`;
:expanded=
"discussion.expanded"
@
toggleHandler=
"toggleDiscussionHandler"
>
<template
v-if=
"discussion.diff_discussion"
>
started a discussion on
<a
:href=
"discussion.discussion_path"
>
<template
v-if=
"discussion.active"
>
the diff
</
template
>
<
template
v-else
>
an old version of the diff
</
template
>
</a>
</template>
<
template
v-else-if=
"discussion.for_commit"
>
started a discussion on commit
<a
:href=
"discussion.discussion_path"
>
{{
truncateSha
(
discussion
.
commit_id
)
}}
</a>
</
template
>
<
template
v-else
>
started a discussion
</
template
>
<span
v-html=
"actionText"
></span>
</note-header>
<note-edited-text
v-if=
"discussion.resolved"
...
...
changelogs/unreleased/winh-merge-request-commit-discussion.yml
0 → 100644
View file @
ac1badb4
---
title
:
Display commit ID for commit diff discussion on merge request
merge_request
:
23370
author
:
type
:
fixed
locale/gitlab.pot
View file @
ac1badb4
...
...
@@ -4016,6 +4016,18 @@ msgstr ""
msgid "MergeRequests|View replaced file @ %{commitId}"
msgstr ""
msgid "MergeRequests|started a discussion"
msgstr ""
msgid "MergeRequests|started a discussion on %{linkStart}an old version of the diff%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion on %{linkStart}the diff%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion on commit %{linkStart}%{commitId}%{linkEnd}"
msgstr ""
msgid "MergeRequest| %{paragraphStart}changed the description %{descriptionChangedTimes} times %{timeDifferenceMinutes}%{paragraphEnd}"
msgstr ""
...
...
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