diff --git a/dist/index.js b/dist/index.js index ab0fd21..9a865b6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8474,12 +8474,13 @@ function grabTicket(title) { * @returns {string} Updated body string. */ function appendLinkInDescription(context) { - const prevBody = context.payload.pull_request.body; + const prevBody = context.payload.pull_request.body || ''; const ticketNumber = grabTicket(context.payload.pull_request.title); if (!ticketNumber) { return; } + const updatedBody = `${prevBody} \n\n ----- \nJira link: ${ jirProjectUrl + '/' + ticketNumber }`;