Skip to content

Commit

Permalink
feat: Adding support for merge_requests in the Deployments API
Browse files Browse the repository at this point in the history
fix: Fixing incorrect Deployments.show HTTP method #554
  • Loading branch information
Miradorn authored and jdalrymple committed Jan 17, 2020
1 parent 297878e commit 911078b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/services/Deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export class Deployments extends BaseService {
show(projectId: string | number, deploymentId: number, options?: Sudo) {
const [pId, dId] = [projectId, deploymentId].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/deployments/${dId}`, options);
return RequestHelper.get(this, `projects/${pId}/deployments/${dId}`, options);
}

mergeRequests(projectId: string | number, deploymentId: number, options?: Sudo) {
const [pId, dId] = [projectId, deploymentId].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/deployments/${dId}/merge_requests`, options);
}
}

0 comments on commit 911078b

Please sign in to comment.