Commit 51b94860 authored by Phil Hughes's avatar Phil Hughes

fixed conflicts in api.js

parent 15dae8c3
...@@ -24,12 +24,9 @@ const Api = { ...@@ -24,12 +24,9 @@ const Api = {
commitPath: '/api/:version/projects/:id/repository/commits', commitPath: '/api/:version/projects/:id/repository/commits',
branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch', branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch',
createBranchPath: '/api/:version/projects/:id/repository/branches', createBranchPath: '/api/:version/projects/:id/repository/branches',
<<<<<<< HEAD
geoNodesPath: '/api/:version/geo_nodes',
=======
pipelinesPath: '/api/:version/projects/:id/pipelines', pipelinesPath: '/api/:version/projects/:id/pipelines',
pipelineJobsPath: '/api/:version/projects/:id/pipelines/:pipeline_id/jobs', pipelineJobsPath: '/api/:version/projects/:id/pipelines/:pipeline_id/jobs',
>>>>>>> upstream/master geoNodesPath: '/api/:version/geo_nodes',
group(groupId, callback) { group(groupId, callback) {
const url = Api.buildUrl(Api.groupPath).replace(':id', groupId); const url = Api.buildUrl(Api.groupPath).replace(':id', groupId);
...@@ -229,15 +226,33 @@ const Api = { ...@@ -229,15 +226,33 @@ const Api = {
}); });
}, },
<<<<<<< HEAD pipelines(projectPath, params = {}) {
const url = Api.buildUrl(this.pipelinesPath).replace(':id', encodeURIComponent(projectPath));
return axios.get(url, { params });
},
pipelineJobs(projectPath, pipelineId, params = {}) {
const url = Api.buildUrl(this.pipelineJobsPath)
.replace(':id', encodeURIComponent(projectPath))
.replace(':pipeline_id', pipelineId);
return axios.get(url, { params });
},
approverUsers(search, options, callback = $.noop) { approverUsers(search, options, callback = $.noop) {
const url = Api.buildUrl('/autocomplete/users.json'); const url = Api.buildUrl('/autocomplete/users.json');
return axios.get(url, { return axios
params: Object.assign({ .get(url, {
params: Object.assign(
{
search, search,
per_page: 20, per_page: 20,
}, options), },
}).then(({ data }) => { options,
),
})
.then(({ data }) => {
callback(data); callback(data);
return data; return data;
...@@ -246,31 +261,19 @@ const Api = { ...@@ -246,31 +261,19 @@ const Api = {
ldap_groups(query, provider, callback) { ldap_groups(query, provider, callback) {
const url = Api.buildUrl(this.ldapGroupsPath).replace(':provider', provider); const url = Api.buildUrl(this.ldapGroupsPath).replace(':provider', provider);
return axios.get(url, { return axios
.get(url, {
params: { params: {
search: query, search: query,
per_page: 20, per_page: 20,
active: true, active: true,
}, },
}).then(({ data }) => { })
.then(({ data }) => {
callback(data); callback(data);
return data; return data;
}); });
=======
pipelines(projectPath, params = {}) {
const url = Api.buildUrl(this.pipelinesPath).replace(':id', encodeURIComponent(projectPath));
return axios.get(url, { params });
},
pipelineJobs(projectPath, pipelineId, params = {}) {
const url = Api.buildUrl(this.pipelineJobsPath)
.replace(':id', encodeURIComponent(projectPath))
.replace(':pipeline_id', pipelineId);
return axios.get(url, { params });
>>>>>>> upstream/master
}, },
buildUrl(url) { buildUrl(url) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment