summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarahghp <sarah.groff.palermo@gmail.com>2019-05-01 18:19:50 -0400
committerLuke Bennett <lbennett@gitlab.com>2019-05-08 20:01:55 +0100
commit22cce9db3d12c451fe5dba033156aefb2cf9b688 (patch)
treedaf9db51afe8d94196bfb002eae5309f0990a3fe
parent6faefc68f615d41123fec2d936461578dc91dfbd (diff)
downloadgitlab-ce-22cce9db3d12c451fe5dba033156aefb2cf9b688.tar.gz
Update for mr url
-rw-r--r--public/-/visual-review-toolbar.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/-/visual-review-toolbar.js b/public/-/visual-review-toolbar.js
index e9eb27de2ee..12be8bb361c 100644
--- a/public/-/visual-review-toolbar.js
+++ b/public/-/visual-review-toolbar.js
@@ -289,7 +289,7 @@ function addCommentButtonEvent () {
const scriptName = 'ReviewAppToolbar';
const projectId = document.querySelector(`script[data-name='${scriptName}']`).getAttribute('data-project');
const discussionId = document.querySelector(`script[data-name='${scriptName}']`).getAttribute('data-discussion');
- const mrHost = document.querySelector(`script[data-name='${scriptName}']`).getAttribute('data-host');
+ const mrUrl = document.querySelector(`script[data-name='${scriptName}']`).getAttribute('data-mr-url');
const commentButton = document.getElementById('gitlab-comment-button');
const details = {
@@ -301,7 +301,7 @@ function addCommentButtonEvent () {
innerHeight,
projectId,
discussionId,
- mrHost,
+ mrUrl,
};
commentButton.onclick = postComment.bind(null, details);
@@ -461,7 +461,7 @@ function postComment ({
innerHeight,
projectId,
discussionId,
- mrHost,
+ mrUrl,
}) {
// Clear any old errors
@@ -481,7 +481,7 @@ function postComment ({
`
const url = `
- https://${mrHost}/api/v4/projects/${projectId}/issues/${discussionId}/discussions?body=
+ ${mrUrl}/api/v4/projects/${projectId}/issues/${discussionId}/discussions?body=
${encodeURIComponent(commentText)}${encodeURIComponent(detailText)}
`;