From 61fc80349580137615da325c86a66eafeca6e60e Mon Sep 17 00:00:00 2001 From: Alena Holligan Date: Wed, 24 Mar 2021 11:01:43 -0700 Subject: [PATCH 1/2] jira.reporter not required. Ignore finding user instead (#22) --- src/Jira.js | 2 ++ src/template.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Jira.js b/src/Jira.js index fc54106..8ff2376 100644 --- a/src/Jira.js +++ b/src/Jira.js @@ -239,6 +239,8 @@ export default class Jira { return this.jira.findIssue(ticketId).then((origTicket) => { const ticket = Object.assign({}, origTicket); + if (!this.config.slack.api || !ticket.fields.reporter) + return ticket; return this.slack.findUser(ticket.fields.reporter.emailAddress, ticket.fields.reporter.displayName) .then((slackUser) => { ticket.slackUser = slackUser; diff --git a/src/template.js b/src/template.js index 1a81c97..0fa11ee 100644 --- a/src/template.js +++ b/src/template.js @@ -86,7 +86,7 @@ export function getTicketReporters(tickets) { const reporters = {}; tickets.forEach((ticket) => { - const { email, displayName } = ticket.fields.reporter; + const { email, displayName } = ticket.fields.reporter || []; if (!reporters[email]) { reporters[email] = { email, From 6ca281230ce13043500e8fcaa9a62f277fb87144 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Mar 2021 11:02:06 -0700 Subject: [PATCH 2/2] Bump node-fetch from 2.6.0 to 2.6.1 (#18) Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9d9f5b..488e505 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5951,9 +5951,9 @@ "dev": true }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-int64": { "version": "0.4.0",