diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:48 +0300 |
commit | 180cd023a11c0eb413ad0de124d9758ea25672bd (patch) | |
tree | 63d77be00a22dc637daa0b6d5b644e230f5f4890 /app/assets | |
parent | be3e24ea3c9f497efde85900df298ce9bc42fce8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/api.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index bee079c6643..6de9ab9efb3 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -44,6 +44,7 @@ const Api = { releasePath: '/api/:version/projects/:id/releases/:tag_name', mergeRequestsPipeline: '/api/:version/projects/:id/merge_requests/:merge_request_iid/pipelines', adminStatisticsPath: '/api/:version/application/statistics', + pipelineSinglePath: '/api/:version/projects/:id/pipelines/:pipeline_id', group(groupId, callback) { const url = Api.buildUrl(Api.groupPath).replace(':id', groupId); @@ -448,6 +449,14 @@ const Api = { return axios.get(url); }, + pipelineSingle(id, pipelineId) { + const url = Api.buildUrl(this.pipelineSinglePath) + .replace(':id', encodeURIComponent(id)) + .replace(':pipeline_id', encodeURIComponent(pipelineId)); + + return axios.get(url); + }, + buildUrl(url) { return joinPaths(gon.relative_url_root || '', url.replace(':version', gon.api_version)); }, |