Repository: jira-node/node-jira-client (js)

Issue:
Add notify API
https://docs.atlassian.com/jira/REST/latest/#api/2/issue-notify


Pull request description:
Issue notify
Fixes #73 

Patch:
diff --git a/src/jira.js b/src/jira.js
index dd1d132..c111c25 100644
--- a/src/jira.js
+++ b/src/jira.js
@@ -1054,6 +1054,22 @@ export default class JiraApi {
     }));
   }
 
+  /** Notify people related to issue
+   * [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-notify)
+   * @name issueNotify
+   * @function
+   * @param {string} issueId - issue id
+   * @param {object} notificationBody - properly formatted body
+   */
+  issueNotify(issueId, notificationBody) {
+    return this.doRequest(this.makeRequestHeader(this.makeUri({
+      pathname: `/issue/${issueId}/notify`,
+    }), {
+      method: 'POST',
+      body: notificationBody,
+    }));
+  }
+
   /** Get list of possible statuses
    * [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/status-getStatuses)
    * @name listStatus


Test patch:
diff --git a/test/jira-tests.js b/test/jira-tests.js
index f65dc92..dca8ff2 100644
--- a/test/jira-tests.js
+++ b/test/jira-tests.js
@@ -676,5 +676,10 @@ describe('Jira API Tests', () => {
       const result = await dummyURLCall('listStatus');
       result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/status');
     });
+
+    it('issueNotify hits proper url', async () => {
+      const result = await dummyURLCall('issueNotify', ['someIssueId', {}]);
+      result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/issue/someIssueId/notify');
+    });
   });
 });