diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2018-12-05 01:22:00 -0600 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2018-12-05 14:40:08 -0600 |
commit | 8ce8303fa9fe79ba0383b7a708f9e9b5311348c3 (patch) | |
tree | 2c79a21b4799bc15f3e3a941caface4f681b896d /app/assets/javascripts/api.js | |
parent | 83a95a02c230dbb2616df0fd93ff19e5ac61d9ef (diff) | |
download | gitlab-ce-8ce8303fa9fe79ba0383b7a708f9e9b5311348c3.tar.gz |
Add projectRunners to api.js
- This is needed by the Web Terminal to check environment
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index f8dbe412f80..de003e70e61 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -14,6 +14,7 @@ const Api = { projectMergeRequestPath: '/api/:version/projects/:id/merge_requests/:mrid', projectMergeRequestChangesPath: '/api/:version/projects/:id/merge_requests/:mrid/changes', projectMergeRequestVersionsPath: '/api/:version/projects/:id/merge_requests/:mrid/versions', + projectRunnersPath: '/api/:version/projects/:id/runners', mergeRequestsPath: '/api/:version/merge_requests', groupLabelsPath: '/groups/:namespace_path/-/labels', issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key', @@ -124,6 +125,15 @@ const Api = { return axios.get(url); }, + projectRunners(projectPath, config = {}) { + const url = Api.buildUrl(Api.projectRunnersPath).replace( + ':id', + encodeURIComponent(projectPath), + ); + + return axios.get(url, config); + }, + mergeRequests(params = {}) { const url = Api.buildUrl(Api.mergeRequestsPath); |