From 8e45d25f7dde6508839ffee719c0ddc2cf6b12d3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 16 Oct 2019 18:08:01 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/api.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/assets/javascripts/api.js') diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index d57be10f472..908dc730aa4 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -36,6 +36,7 @@ const Api = { branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch', createBranchPath: '/api/:version/projects/:id/repository/branches', releasesPath: '/api/:version/projects/:id/releases', + releasePath: '/api/:version/projects/:id/releases/:tag_name', mergeRequestsPipeline: '/api/:version/projects/:id/merge_requests/:merge_request_iid/pipelines', adminStatisticsPath: 'api/:version/application/statistics', @@ -391,6 +392,22 @@ const Api = { return axios.get(url); }, + release(projectPath, tagName) { + const url = Api.buildUrl(this.releasePath) + .replace(':id', encodeURIComponent(projectPath)) + .replace(':tag_name', encodeURIComponent(tagName)); + + return axios.get(url); + }, + + updateRelease(projectPath, tagName, release) { + const url = Api.buildUrl(this.releasePath) + .replace(':id', encodeURIComponent(projectPath)) + .replace(':tag_name', encodeURIComponent(tagName)); + + return axios.put(url, release); + }, + adminStatistics() { const url = Api.buildUrl(this.adminStatisticsPath); return axios.get(url); -- cgit v1.2.1