Skip to content

Commit

Permalink
Merge pull request #4 from jdalrymple/TestBranch
Browse files Browse the repository at this point in the history
Added Create Issue Link
  • Loading branch information
jdalrymple authored Jul 27, 2017
2 parents 10d3753 + fd09144 commit 93aa534
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Models/ProjectHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions src/Models/ProjectIssues.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 93aa534

Please sign in to comment.