diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2018-08-07 15:15:56 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-08-07 15:15:56 +0000 |
commit | 0d6e50d54270a973647f828047828b80fdf8d013 (patch) | |
tree | 9bf41acf27d039f673f45520187daff9d47cb04f /app/assets/javascripts/api.js | |
parent | 0e90f27ff79d1743d8ec5e49e003d4c68a689f78 (diff) | |
download | gitlab-ce-0d6e50d54270a973647f828047828b80fdf8d013.tar.gz |
Create Web IDE MR and branch picker
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 422becb7db8..25fe2ae553e 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -244,6 +244,18 @@ const Api = { }); }, + branches(id, query = '', options = {}) { + const url = Api.buildUrl(this.createBranchPath).replace(':id', encodeURIComponent(id)); + + return axios.get(url, { + params: { + search: query, + per_page: 20, + ...options, + }, + }); + }, + createBranch(id, { ref, branch }) { const url = Api.buildUrl(this.createBranchPath).replace(':id', encodeURIComponent(id)); |