回答我自己的问题:只需要删除
issue:
对象
/**
* Creates a JIRA Issue
* @param {*} jira The jira client.
* @param {string} summary The summary of the ticket.
*/
function createIssueInJira(jira, issueSummary) {
console.log(`Creating JIRA Release Readiness ticket for ${issueSummary}...`)
return new Promise((resolve, reject) => {
jira.issue.createIssue({
fields: { project: { id: '11111' }, summary: issueSummary, issuetype: { id: '22222' }
},
(error, issue) => {
if (error) {
console.log(error);
return reject(error);
}
});
});
}