diff --git a/libs/event-emitter/src/issue-enhancers/calendar-enhancer.ts b/libs/event-emitter/src/issue-enhancers/calendar-enhancer.ts index 92dfc8c..c222a9b 100644 --- a/libs/event-emitter/src/issue-enhancers/calendar-enhancer.ts +++ b/libs/event-emitter/src/issue-enhancers/calendar-enhancer.ts @@ -24,7 +24,7 @@ export const UNKNOWN_CALENDAR_EVENT = 'Unknown calendar event'; @Injectable() export class CalendarEnhancer implements IssueEnhancerInterface { private logger = new Logger(CalendarEnhancer.name); - + name = 'calendar'; constructor( @@ -33,8 +33,15 @@ export class CalendarEnhancer implements IssueEnhancerInterface { public descriptionCalendarParams: DescriptionParserParams, public calendarEventsKey: string, ) { - const initParams = {useForProjects, customFields, descriptionCalendarParams, calendarEventsKey}; - this.logger.debug(`Calendar enhancer init with ${JSON.stringify(initParams)}`); + const initParams = { + useForProjects, + customFields, + descriptionCalendarParams, + calendarEventsKey, + }; + this.logger.debug( + `Calendar enhancer init with ${JSON.stringify(initParams)}`, + ); } async enhance( @@ -49,10 +56,18 @@ export class CalendarEnhancer implements IssueEnhancerInterface { try { res[this.calendarEventsKey] = this.getCalendarEvents(res); } catch (ex) { - this.logger.error(`Error at parsing calendar events, message - ${ex}: ${(ex as Error)?.stack}`); + this.logger.error( + `Error at parsing calendar events, message - ${ex}: ${ + (ex as Error)?.stack + }`, + ); return res; } - this.logger.debug(`Calendar events for #${issue.id}: issue.${this.calendarEventsKey} = ${JSON.stringify(res[this.calendarEventsKey])}`); + this.logger.debug( + `Calendar events for #${issue.id}: issue.${ + this.calendarEventsKey + } = ${JSON.stringify(res[this.calendarEventsKey])}`, + ); return res; } @@ -147,7 +162,9 @@ export class CalendarEnhancer implements IssueEnhancerInterface { const lines = text.split('\n').map((line) => line.trim()); - const calendarStartIndex = lines.indexOf(this.descriptionCalendarParams.title); + const calendarStartIndex = lines.indexOf( + this.descriptionCalendarParams.title, + ); if (calendarStartIndex < 0) return []; let index = calendarStartIndex + 1;