summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/api.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-11 10:37:10 +0100
committerPhil Hughes <me@iamphill.com>2018-05-25 12:55:37 +0100
commita57e43dd8cf29b7574fcab63948fa2aaca1c00b7 (patch)
treef1c7fe9289659459d243876c73c0b6b7f1b0d622 /app/assets/javascripts/api.js
parentd6a7a111ff3cc0bd4681615fc97c7b2a90729444 (diff)
downloadgitlab-ce-a57e43dd8cf29b7574fcab63948fa2aaca1c00b7.tar.gz
Show merge requests in web IDE
Closes #45184
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r--app/assets/javascripts/api.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js
index ce1069276ab..4aa52c446ff 100644
--- a/app/assets/javascripts/api.js
+++ b/app/assets/javascripts/api.js
@@ -11,6 +11,7 @@ const Api = {
projectPath: '/api/:version/projects/:id',
projectLabelsPath: '/:namespace_path/:project_path/labels',
mergeRequestPath: '/api/:version/projects/:id/merge_requests/:mrid',
+ mergeRequestsPath: '/api/:version/merge_requests',
mergeRequestChangesPath: '/api/:version/projects/:id/merge_requests/:mrid/changes',
mergeRequestVersionsPath: '/api/:version/projects/:id/merge_requests/:mrid/versions',
groupLabelsPath: '/groups/:namespace_path/-/labels',
@@ -109,6 +110,12 @@ const Api = {
return axios.get(url);
},
+ mergeRequests(params = {}) {
+ const url = Api.buildUrl(Api.mergeRequestsPath);
+
+ return axios.get(url, { params });
+ },
+
mergeRequestChanges(projectPath, mergeRequestId) {
const url = Api.buildUrl(Api.mergeRequestChangesPath)
.replace(':id', encodeURIComponent(projectPath))