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

Issue:
issueLinkType not supported
``GET /rest/api/2/issueLinkType``
https://docs.atlassian.com/software/jira/docs/api/REST/8.5.0/#api/2/issueLinkType-getIssueLinkTypes

Pull request description:
Add support for listIssueLinkTypes
Fixes #265

Patch:
diff --git a/src/jira.js b/src/jira.js
index 057b155..f2d9c44 100644
--- a/src/jira.js
+++ b/src/jira.js
@@ -458,6 +458,17 @@ export default class JiraApi {
     }));
   }
 
+  /** List all issue link types jira knows about
+   * [Jira Doc](https://docs.atlassian.com/software/jira/docs/api/REST/8.5.0/#api/2/issueLinkType-getIssueLinkTypes)
+   * @name listIssueLinkTypes
+   * @function
+   */
+  listIssueLinkTypes() {
+    return this.doRequest(this.makeRequestHeader(this.makeUri({
+      pathname: '/issueLinkType',
+    })));
+  }
+
   /** Retrieves the remote links associated with the given issue.
    * @name getRemoteLinks
    * @function


Test patch:
diff --git a/test/jira-tests.js b/test/jira-tests.js
index 4db0398..db37c73 100644
--- a/test/jira-tests.js
+++ b/test/jira-tests.js
@@ -746,6 +746,11 @@ describe('Jira API Tests', () => {
       result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/issuetype');
     });
 
+    it('listIssueLinkTypes hits proper url', async () => {
+      const result = await dummyURLCall('listIssueLinkTypes', []);
+      result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/issueLinkType');
+    });
+
     it('registerWebhook hits proper url', async () => {
       const result = await dummyURLCall('registerWebhook', ['someWebhook']);
       result.should.eql('http://jira.somehost.com:8080/rest/webhooks/1.0/webhook');