Skip to content

Commit e09023c

Browse files
committed
add remotelink to support the /issue/{issuekey}/remotelink api
1 parent 9334abc commit e09023c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

lib/jira.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,37 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
600600
});
601601
};
602602

603+
this.remoteLink = function remoteLink(issueNumber, callback) {
604+
605+
var options = {
606+
rejectUnauthorized: this.strictSSL,
607+
uri: this.makeUri('/issue/' + issueNumber + '/remoteLink'),
608+
method: 'GET'
609+
};
610+
611+
this.doRequest(options, function(error, response) {
612+
613+
if (error) {
614+
callback(error, null);
615+
return;
616+
}
617+
618+
if (response.statusCode === 404) {
619+
callback('Invalid issue.');
620+
return;
621+
}
622+
623+
if (response.statusCode !== 200) {
624+
callback(response.statusCode + ': Unable to connect to JIRA during issueLink.');
625+
return;
626+
}
627+
628+
callback(null);
629+
630+
});
631+
}
632+
633+
603634
// ## Get Versions for a project ##
604635
// ### Takes ###
605636
// * project: A project key

0 commit comments

Comments
 (0)