diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-04 18:09:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-04 18:09:49 +0000 |
commit | 2ecc6e22e3517a2e0d9a5bd0d4297c74e2f338d4 (patch) | |
tree | 39e5264a6ea6467910471ed5e98eb379d66a6982 /app/assets/javascripts/api.js | |
parent | aca89cb7e933eca98b794cbd5457ffabd54b43f7 (diff) | |
download | gitlab-ce-2ecc6e22e3517a2e0d9a5bd0d4297c74e2f338d4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index dc70cc61014..b49259a09f9 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -57,6 +57,8 @@ const Api = { pipelinesPath: '/api/:version/projects/:id/pipelines/', createPipelinePath: '/api/:version/projects/:id/pipeline', environmentsPath: '/api/:version/projects/:id/environments', + contextCommitsPath: + '/api/:version/projects/:id/merge_requests/:merge_request_iid/context_commits', rawFilePath: '/api/:version/projects/:id/repository/files/:path/raw', issuePath: '/api/:version/projects/:id/issues/:issue_iid', tagsPath: '/api/:version/projects/:id/repository/tags', @@ -598,6 +600,30 @@ const Api = { return axios.get(url); }, + createContextCommits(id, mergeRequestIid, data) { + const url = Api.buildUrl(this.contextCommitsPath) + .replace(':id', encodeURIComponent(id)) + .replace(':merge_request_iid', mergeRequestIid); + + return axios.post(url, data); + }, + + allContextCommits(id, mergeRequestIid) { + const url = Api.buildUrl(this.contextCommitsPath) + .replace(':id', encodeURIComponent(id)) + .replace(':merge_request_iid', mergeRequestIid); + + return axios.get(url); + }, + + removeContextCommits(id, mergeRequestIid, data) { + const url = Api.buildUrl(this.contextCommitsPath) + .replace(':id', id) + .replace(':merge_request_iid', mergeRequestIid); + + return axios.delete(url, { data }); + }, + getRawFile(id, path, params = { ref: 'master' }) { const url = Api.buildUrl(this.rawFilePath) .replace(':id', encodeURIComponent(id)) |