Added Create an Issue Link

This commit is contained in:
Dylan DesRosier 2017-07-27 10:57:46 -04:00
parent 6b9037977c
commit fd09144068
2 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class ProjectHooks extends BaseModel {
}
edit(projectId, hookId, url, options) {
options.url = url;
const [pId, hId] = [projectId, hookId].map(Utils.parse);
return this.put(`projects/${pId}/hooks/${hId}`, options);

View File

@ -52,6 +52,15 @@ class ProjectIssues extends BaseModel {
return this.delete(`projects/${pId}/issues/${iId}/unsubscribe`);
}
link(projectId, issueIId, targetProjectId, targetIssueId, options = {}) {
const [pId, iId] = [projectId, issueIId].map(Utils.parse);
const [targetpId, targetIId] = [targetProjectId, targetIssueId].map(Utils.parse);
options.target_project_id = targetpId;
options.target_issue_id = targetIId;
return this.post(`projects/${pId}/issues/${iId}/links`, options);
}
}
module.exports = ProjectIssues;