From 17005fa3e8c55a490a22544951658a395f3aa98f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dragomir=20=C8=9Aurcanu?= <dragomirt22@gmail.com>
Date: Wed, 27 Jun 2018 11:15:15 +0300
Subject: [PATCH] fix: Shortened the URLs in the GitLab wrapper (#2184)

fix: Shortened the URLs in the GitLab wrapper
---
 lib/platform/gitlab/index.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js
index 2c81d114b3..f695c56d83 100644
--- a/lib/platform/gitlab/index.js
+++ b/lib/platform/gitlab/index.js
@@ -440,9 +440,9 @@ function addReviewers(iid, reviewers) {
 }
 
 async function getComments(issueNo) {
-  // GET /api/v4/projects/:owner/:repo/merge_requests/:number/notes
+  // GET projects/:owner/:repo/merge_requests/:number/notes
   logger.debug(`Getting comments for #${issueNo}`);
-  const url = `/api/v4/projects/${
+  const url = `projects/${
     config.repository
   }/merge_requests/${issueNo}/notes`;
   const comments = (await get(url, { paginate: true })).body;
@@ -451,9 +451,9 @@ async function getComments(issueNo) {
 }
 
 async function addComment(issueNo, body) {
-  // POST /api/v4/projects/:owner/:repo/merge_requests/:number/notes
+  // POST projects/:owner/:repo/merge_requests/:number/notes
   await get.post(
-    `/api/v4/projects/${config.repository}/merge_requests/${issueNo}/notes`,
+    `projects/${config.repository}/merge_requests/${issueNo}/notes`,
     {
       body: { body },
     }
@@ -461,9 +461,9 @@ async function addComment(issueNo, body) {
 }
 
 async function editComment(issueNo, commentId, body) {
-  // PATCH /api/v4/projects/:owner/:repo/merge_requests/:number/notes/:id
+  // PATCH projects/:owner/:repo/merge_requests/:number/notes/:id
   await get.patch(
-    `/api/v4/projects/${
+    `projects/${
       config.repository
     }/merge_requests/${issueNo}/notes/${commentId}`,
     {
@@ -473,9 +473,9 @@ async function editComment(issueNo, commentId, body) {
 }
 
 async function deleteComment(issueNo, commentId) {
-  // DELETE /api/v4/projects/:owner/:repo/merge_requests/:number/notes/:id
+  // DELETE projects/:owner/:repo/merge_requests/:number/notes/:id
   await get.delete(
-    `/api/v4/projects/${
+    `projects/${
       config.repository
     }/merge_requests/${issueNo}/notes/${commentId}`
   );
-- 
GitLab