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
016c79ca
Commit
016c79ca
authored
May 23, 2019
by
sarahghp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add changes to match ee
parent
7b5cc7b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
...cripts/vue_merge_request_widget/components/deployment.vue
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue
...equest_widget/components/mr_widget_pipeline_container.vue
+1
-1
public/visual-review-toolbar.js
public/visual-review-toolbar.js
+16
-14
No files found.
app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
View file @
016c79ca
...
...
@@ -49,7 +49,7 @@ export default {
required
:
false
,
default
:
()
=>
({
sourceProjectId
:
''
,
issue
Id
:
''
,
mergeRequest
Id
:
''
,
appUrl
:
''
,
}),
},
...
...
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue
View file @
016c79ca
...
...
@@ -48,7 +48,7 @@ export default {
visualReviewAppMeta
()
{
return
{
appUrl
:
this
.
mr
.
appUrl
,
issue
Id
:
this
.
mr
.
iid
,
mergeRequest
Id
:
this
.
mr
.
iid
,
sourceProjectId
:
this
.
mr
.
sourceProjectId
,
};
},
...
...
public/visual-review-toolbar.js
View file @
016c79ca
...
...
@@ -374,12 +374,12 @@ function clearNote (inputId) {
}
}
function
confirmAndClear
(
discussion
Id
)
{
function
confirmAndClear
(
mergeRequest
Id
)
{
const
commentButton
=
document
.
getElementById
(
'
gitlab-comment-button
'
);
const
note
=
document
.
getElementById
(
'
gitlab-validation-note
'
);
commentButton
.
innerText
=
'
Feedback sent
'
;
note
.
innerText
=
`Your comment was successfully posted to
issue #
${
discussion
Id
}
`
;
note
.
innerText
=
`Your comment was successfully posted to
merge request #
${
mergeRequest
Id
}
`
;
setTimeout
(
resetCommentButton
,
1000
);
}
...
...
@@ -412,7 +412,7 @@ function getProjectDetails () {
const
browser
=
getBrowserId
(
userAgent
);
const
scriptEl
=
document
.
getElementById
(
'
review-app-toolbar-script
'
)
const
{
projectId
,
discussion
Id
,
mrUrl
}
=
scriptEl
.
dataset
;
const
{
projectId
,
mergeRequest
Id
,
mrUrl
}
=
scriptEl
.
dataset
;
return
{
href
,
...
...
@@ -422,7 +422,7 @@ function getProjectDetails () {
innerWidth
,
innerHeight
,
projectId
,
discussion
Id
,
mergeRequest
Id
,
mrUrl
,
};
}
...
...
@@ -449,7 +449,7 @@ function postComment ({
innerWidth
,
innerHeight
,
projectId
,
discussion
Id
,
mergeRequest
Id
,
mrUrl
,
})
{
// Clear any old errors
...
...
@@ -466,18 +466,20 @@ function postComment ({
}
const
detailText
=
`
<details>
\n
<details>
<summary>Metadata</summary>
Posted from
${
href
}
|
${
platform
}
|
${
browser
}
|
${
innerWidth
}
x
${
innerHeight
}
.
<br /><br />
*User agent:
${
userAgent
}
*
</details>
<em>User agent:
${
userAgent
}
</em>
</details>
`
;
const
url
=
`
${
mrUrl
}
/api/v4/projects/
${
projectId
}
/
issues/
${
discussion
Id
}
/discussions`
;
${
mrUrl
}
/api/v4/projects/
${
projectId
}
/
merge_requests/
${
mergeRequest
Id
}
/discussions`
;
const
body
=
`
${
commentText
}${
detailText
}
`
;
const
body
=
`
${
commentText
}
${
detailText
}
`
;
fetch
(
url
,
{
method
:
'
POST
'
,
...
...
@@ -489,7 +491,7 @@ function postComment ({
})
.
then
((
response
)
=>
{
if
(
response
.
ok
)
{
confirmAndClear
(
discussion
Id
);
confirmAndClear
(
mergeRequest
Id
);
return
;
}
...
...
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